@mrgrain/cdk-esbuild 2.0.0-alpha.1 → 2.0.0-rc.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 CHANGED
@@ -969,7 +969,7 @@
969
969
  },
970
970
  "name": "@mrgrain/cdk-esbuild",
971
971
  "readme": {
972
- "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) | [Upgrading from 1.x](#upgrading-from-1x) |\n[Documentation](#documentation) | [API Reference](./API.md) | [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**⚠️ Regarding stability**\n\nThis package is generally stable. However _esbuild_ is still on major version zero, which you should consider. Please check their guide on [production readiness](https://esbuild.github.io/faq/#production-readiness).\n\nNotably upgrades of the _esbuild_ 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\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 esbuild @aws-cdk/core @aws-cdk/aws-lambda @aws-cdk/aws-s3-assets @aws-cdk/aws-s3-deployment @aws-cdk/aws-synthetics\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/latest/docs/@aws-cdk_aws-lambda.Function.html#code):\n\n```ts\nimport * as lambda from \"@aws-cdk/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/aws-s3\";\nimport * as s3deploy from \"@aws-cdk/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```ts\nimport * as synthetics from \"@aws-cdk/aws-synthetics\";\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/latest/docs/@aws-cdk_aws-lambda.Code.html)) and `synthetics.Code` ([reference](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-synthetics.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 the 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/latest/docs/@aws-cdk_aws-s3-assets.Asset.html)) \\\n creates an asset uploaded to S3 which can be referenced by other constructs\n\n- `EsbuildBundling` implements `core.BundlingOptions` ([reference](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.BundlingOptions.html)) \\\n provides a _esbuild_ bundling interface wherever needed\n\n## [API Reference](./API.md)\n\nAuto-generated reference for all classes and structs. This information is also available within the code completion of your IDE.\n\n## Upgrading from 1.x\n\ntbd\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\nAlthough great care is taken to avoid this, all features marked as `@unstable` may change with minor versions. Please note that the unstable flag is applied to all new or experimental features and internal classes.\n\n## Future releases\n\n### AWS CDK v2\n\nThe monolithic version 2 of CDK (aka Mono-CDK) is on the horizon. A new major release of this package will be marked alongside CDK. Support for AWS CDK v1.x.x will be continued, however no new features will be added.\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"
972
+ "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 v2](#migrating-to-v2) |\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**⚠️ A note on stability**\n\nThis package is generally stable and ready to be used in production as many do. However _esbuild_ is still on major version zero, which you should consider. Please check their guide on [production readiness](https://esbuild.github.io/faq/#production-readiness).\n\nNotably upgrades of the _esbuild_ 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\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 esbuild @aws-cdk/core @aws-cdk/aws-lambda @aws-cdk/aws-s3-assets @aws-cdk/aws-s3-deployment @aws-cdk/aws-synthetics\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/latest/docs/@aws-cdk_aws-lambda.Function.html#code):\n\n```ts\nimport * as lambda from \"@aws-cdk/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/aws-s3\";\nimport * as s3deploy from \"@aws-cdk/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```ts\nimport * as synthetics from \"@aws-cdk/aws-synthetics\";\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/latest/docs/@aws-cdk_aws-lambda.Code.html)) and `synthetics.Code` ([reference](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-synthetics.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/latest/docs/@aws-cdk_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/latest/docs/@aws-cdk_core.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## Migrating to v2\n\nThe main changes in cdk-esbuild v2 are:\n\n- The package is now `jsii` compliant and published in the [Construct Hub](https://constructs.dev/). This will also enable a possible feature release for other languages.\n- Deprecated properties and classes have been removed, most notably the previous support for bundling via a Docker container. The implementation had a few issues that cannot be easily resolved. However more generic support for custom executables might arrive in later versions.\n- `esbuild` is now installed as an optional dependency. It's not optional at all, but this is a ramification of using `jsii`. In practice this will have no impact on most people.\n- Interfaces have been streamlined and the names and setup of internal types have been changed. In the unlikely case that someone was relying on these, upgrading will be straight forward.\n\n### Upgrading\n\n- Update the package dependency to v2: `npm install --save @mrgrain/cdk-esbuild@^2.0.0`\n- `esbuild` is now installed as an optional dependency. If your setup does not automatically install optional dependencies, add it as an explicit dependency.\n- Remove any use of `bundlerPriority`.\n- Unstable construct `EsbuildBundling` has been renamed to `EsbuildBundler` and its interface has slightly changed. Like most other constructs, it now takes `entryPoints` as first parameter, with an optional `props` object as the second.\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\nAlthough great care is taken to avoid this, all features marked as `@unstable` may change with minor versions. Please note that the unstable flag is applied to all new or experimental features and internal classes.\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### AWS CDK v2\n\nThe monolithic version 2 of CDK (aka Mono-CDK) is on the horizon. A new major release of this package will be marked alongside CDK. Support for AWS CDK v1.x.x will be continued, however no new features will be added.\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"
973
973
  },
974
974
  "repository": {
975
975
  "type": "git",
@@ -982,44 +982,6 @@
982
982
  }
983
983
  },
984
984
  "types": {
985
- "@mrgrain/cdk-esbuild.AssetBaseProps": {
986
- "assembly": "@mrgrain/cdk-esbuild",
987
- "datatype": true,
988
- "docs": {
989
- "stability": "stable"
990
- },
991
- "fqn": "@mrgrain/cdk-esbuild.AssetBaseProps",
992
- "interfaces": [
993
- "@mrgrain/cdk-esbuild.BundlerProps"
994
- ],
995
- "kind": "interface",
996
- "locationInModule": {
997
- "filename": "src/asset.ts",
998
- "line": 6
999
- },
1000
- "name": "AssetBaseProps",
1001
- "properties": [
1002
- {
1003
- "abstract": true,
1004
- "docs": {
1005
- "remarks": "As this is a plain string, it\ncan be used in construct IDs in order to enforce creation of a new resource when the content\nhash has changed.",
1006
- "stability": "stable",
1007
- "summary": "A hash of this asset, which is available at construction time."
1008
- },
1009
- "immutable": true,
1010
- "locationInModule": {
1011
- "filename": "src/asset.ts",
1012
- "line": 14
1013
- },
1014
- "name": "assetHash",
1015
- "optional": true,
1016
- "type": {
1017
- "primitive": "string"
1018
- }
1019
- }
1020
- ],
1021
- "symbolId": "src/asset:AssetBaseProps"
1022
- },
1023
985
  "@mrgrain/cdk-esbuild.AssetProps": {
1024
986
  "assembly": "@mrgrain/cdk-esbuild",
1025
987
  "datatype": true,
@@ -1028,25 +990,26 @@
1028
990
  },
1029
991
  "fqn": "@mrgrain/cdk-esbuild.AssetProps",
1030
992
  "interfaces": [
1031
- "@mrgrain/cdk-esbuild.AssetBaseProps"
993
+ "@mrgrain/cdk-esbuild.BundlerProps"
1032
994
  ],
1033
995
  "kind": "interface",
1034
996
  "locationInModule": {
1035
997
  "filename": "src/asset.ts",
1036
- "line": 17
998
+ "line": 22
1037
999
  },
1038
1000
  "name": "AssetProps",
1039
1001
  "properties": [
1040
1002
  {
1041
1003
  "abstract": true,
1042
1004
  "docs": {
1005
+ "remarks": "E.g. `src/index.ts`.",
1043
1006
  "stability": "stable",
1044
- "summary": "Relative paths to the entrypoints of your code, e.g. `src/index.ts`."
1007
+ "summary": "A relative path or list or map of relative paths to the entry points of your code from the root of the project."
1045
1008
  },
1046
1009
  "immutable": true,
1047
1010
  "locationInModule": {
1048
1011
  "filename": "src/asset.ts",
1049
- "line": 21
1012
+ "line": 28
1050
1013
  },
1051
1014
  "name": "entryPoints",
1052
1015
  "type": {
@@ -1074,6 +1037,24 @@
1074
1037
  ]
1075
1038
  }
1076
1039
  }
1040
+ },
1041
+ {
1042
+ "abstract": true,
1043
+ "docs": {
1044
+ "remarks": "As this is a plain string, it can be used in construct IDs in order to enforce creation of a new resource when the content hash has changed.\n\nDefaults to a hash of all files in the resulting bundle.",
1045
+ "stability": "stable",
1046
+ "summary": "A hash of this asset, which is available at construction time."
1047
+ },
1048
+ "immutable": true,
1049
+ "locationInModule": {
1050
+ "filename": "src/asset.ts",
1051
+ "line": 19
1052
+ },
1053
+ "name": "assetHash",
1054
+ "optional": true,
1055
+ "type": {
1056
+ "primitive": "string"
1057
+ }
1077
1058
  }
1078
1059
  ],
1079
1060
  "symbolId": "src/asset:AssetProps"
@@ -1088,7 +1069,7 @@
1088
1069
  "kind": "interface",
1089
1070
  "locationInModule": {
1090
1071
  "filename": "src/esbuild-types.ts",
1091
- "line": 38
1072
+ "line": 40
1092
1073
  },
1093
1074
  "name": "BuildOptions",
1094
1075
  "properties": [
@@ -1100,7 +1081,7 @@
1100
1081
  "immutable": true,
1101
1082
  "locationInModule": {
1102
1083
  "filename": "src/esbuild-types.ts",
1103
- "line": 64
1084
+ "line": 66
1104
1085
  },
1105
1086
  "name": "absWorkingDir",
1106
1087
  "optional": true,
@@ -1116,7 +1097,7 @@
1116
1097
  "immutable": true,
1117
1098
  "locationInModule": {
1118
1099
  "filename": "src/esbuild-types.ts",
1119
- "line": 53
1100
+ "line": 55
1120
1101
  },
1121
1102
  "name": "allowOverwrite",
1122
1103
  "optional": true,
@@ -1132,7 +1113,7 @@
1132
1113
  "immutable": true,
1133
1114
  "locationInModule": {
1134
1115
  "filename": "src/esbuild-types.ts",
1135
- "line": 59
1116
+ "line": 61
1136
1117
  },
1137
1118
  "name": "assetNames",
1138
1119
  "optional": true,
@@ -1148,7 +1129,7 @@
1148
1129
  "immutable": true,
1149
1130
  "locationInModule": {
1150
1131
  "filename": "src/esbuild-types.ts",
1151
- "line": 61
1132
+ "line": 63
1152
1133
  },
1153
1134
  "name": "banner",
1154
1135
  "optional": true,
@@ -1169,7 +1150,7 @@
1169
1150
  "immutable": true,
1170
1151
  "locationInModule": {
1171
1152
  "filename": "src/esbuild-types.ts",
1172
- "line": 39
1153
+ "line": 41
1173
1154
  },
1174
1155
  "name": "bundle",
1175
1156
  "optional": true,
@@ -1185,7 +1166,7 @@
1185
1166
  "immutable": true,
1186
1167
  "locationInModule": {
1187
1168
  "filename": "src/esbuild-types.ts",
1188
- "line": 21
1169
+ "line": 23
1189
1170
  },
1190
1171
  "name": "charset",
1191
1172
  "optional": true,
@@ -1201,7 +1182,7 @@
1201
1182
  "immutable": true,
1202
1183
  "locationInModule": {
1203
1184
  "filename": "src/esbuild-types.ts",
1204
- "line": 58
1185
+ "line": 60
1205
1186
  },
1206
1187
  "name": "chunkNames",
1207
1188
  "optional": true,
@@ -1217,7 +1198,7 @@
1217
1198
  "immutable": true,
1218
1199
  "locationInModule": {
1219
1200
  "filename": "src/esbuild-types.ts",
1220
- "line": 33
1201
+ "line": 35
1221
1202
  },
1222
1203
  "name": "color",
1223
1204
  "optional": true,
@@ -1233,7 +1214,7 @@
1233
1214
  "immutable": true,
1234
1215
  "locationInModule": {
1235
1216
  "filename": "src/esbuild-types.ts",
1236
- "line": 51
1217
+ "line": 53
1237
1218
  },
1238
1219
  "name": "conditions",
1239
1220
  "optional": true,
@@ -1254,7 +1235,7 @@
1254
1235
  "immutable": true,
1255
1236
  "locationInModule": {
1256
1237
  "filename": "src/esbuild-types.ts",
1257
- "line": 29
1238
+ "line": 31
1258
1239
  },
1259
1240
  "name": "define",
1260
1241
  "optional": true,
@@ -1275,7 +1256,7 @@
1275
1256
  "immutable": true,
1276
1257
  "locationInModule": {
1277
1258
  "filename": "src/esbuild-types.ts",
1278
- "line": 57
1259
+ "line": 59
1279
1260
  },
1280
1261
  "name": "entryNames",
1281
1262
  "optional": true,
@@ -1291,7 +1272,7 @@
1291
1272
  "immutable": true,
1292
1273
  "locationInModule": {
1293
1274
  "filename": "src/esbuild-types.ts",
1294
- "line": 47
1275
+ "line": 49
1295
1276
  },
1296
1277
  "name": "external",
1297
1278
  "optional": true,
@@ -1312,7 +1293,7 @@
1312
1293
  "immutable": true,
1313
1294
  "locationInModule": {
1314
1295
  "filename": "src/esbuild-types.ts",
1315
- "line": 62
1296
+ "line": 64
1316
1297
  },
1317
1298
  "name": "footer",
1318
1299
  "optional": true,
@@ -1333,7 +1314,7 @@
1333
1314
  "immutable": true,
1334
1315
  "locationInModule": {
1335
1316
  "filename": "src/esbuild-types.ts",
1336
- "line": 13
1317
+ "line": 15
1337
1318
  },
1338
1319
  "name": "format",
1339
1320
  "optional": true,
@@ -1349,7 +1330,7 @@
1349
1330
  "immutable": true,
1350
1331
  "locationInModule": {
1351
1332
  "filename": "src/esbuild-types.ts",
1352
- "line": 14
1333
+ "line": 16
1353
1334
  },
1354
1335
  "name": "globalName",
1355
1336
  "optional": true,
@@ -1365,7 +1346,7 @@
1365
1346
  "immutable": true,
1366
1347
  "locationInModule": {
1367
1348
  "filename": "src/esbuild-types.ts",
1368
- "line": 23
1349
+ "line": 25
1369
1350
  },
1370
1351
  "name": "ignoreAnnotations",
1371
1352
  "optional": true,
@@ -1381,7 +1362,7 @@
1381
1362
  "immutable": true,
1382
1363
  "locationInModule": {
1383
1364
  "filename": "src/esbuild-types.ts",
1384
- "line": 63
1365
+ "line": 65
1385
1366
  },
1386
1367
  "name": "incremental",
1387
1368
  "optional": true,
@@ -1397,7 +1378,7 @@
1397
1378
  "immutable": true,
1398
1379
  "locationInModule": {
1399
1380
  "filename": "src/esbuild-types.ts",
1400
- "line": 60
1381
+ "line": 62
1401
1382
  },
1402
1383
  "name": "inject",
1403
1384
  "optional": true,
@@ -1418,7 +1399,7 @@
1418
1399
  "immutable": true,
1419
1400
  "locationInModule": {
1420
1401
  "filename": "src/esbuild-types.ts",
1421
- "line": 25
1402
+ "line": 27
1422
1403
  },
1423
1404
  "name": "jsx",
1424
1405
  "optional": true,
@@ -1434,7 +1415,7 @@
1434
1415
  "immutable": true,
1435
1416
  "locationInModule": {
1436
1417
  "filename": "src/esbuild-types.ts",
1437
- "line": 26
1418
+ "line": 28
1438
1419
  },
1439
1420
  "name": "jsxFactory",
1440
1421
  "optional": true,
@@ -1450,7 +1431,7 @@
1450
1431
  "immutable": true,
1451
1432
  "locationInModule": {
1452
1433
  "filename": "src/esbuild-types.ts",
1453
- "line": 27
1434
+ "line": 29
1454
1435
  },
1455
1436
  "name": "jsxFragment",
1456
1437
  "optional": true,
@@ -1466,7 +1447,7 @@
1466
1447
  "immutable": true,
1467
1448
  "locationInModule": {
1468
1449
  "filename": "src/esbuild-types.ts",
1469
- "line": 31
1450
+ "line": 33
1470
1451
  },
1471
1452
  "name": "keepNames",
1472
1453
  "optional": true,
@@ -1482,7 +1463,7 @@
1482
1463
  "immutable": true,
1483
1464
  "locationInModule": {
1484
1465
  "filename": "src/esbuild-types.ts",
1485
- "line": 9
1466
+ "line": 11
1486
1467
  },
1487
1468
  "name": "legalComments",
1488
1469
  "optional": true,
@@ -1498,7 +1479,7 @@
1498
1479
  "immutable": true,
1499
1480
  "locationInModule": {
1500
1481
  "filename": "src/esbuild-types.ts",
1501
- "line": 48
1482
+ "line": 50
1502
1483
  },
1503
1484
  "name": "loader",
1504
1485
  "optional": true,
@@ -1519,7 +1500,7 @@
1519
1500
  "immutable": true,
1520
1501
  "locationInModule": {
1521
1502
  "filename": "src/esbuild-types.ts",
1522
- "line": 34
1503
+ "line": 36
1523
1504
  },
1524
1505
  "name": "logLevel",
1525
1506
  "optional": true,
@@ -1535,7 +1516,7 @@
1535
1516
  "immutable": true,
1536
1517
  "locationInModule": {
1537
1518
  "filename": "src/esbuild-types.ts",
1538
- "line": 35
1519
+ "line": 37
1539
1520
  },
1540
1521
  "name": "logLimit",
1541
1522
  "optional": true,
@@ -1551,7 +1532,7 @@
1551
1532
  "immutable": true,
1552
1533
  "locationInModule": {
1553
1534
  "filename": "src/esbuild-types.ts",
1554
- "line": 50
1535
+ "line": 52
1555
1536
  },
1556
1537
  "name": "mainFields",
1557
1538
  "optional": true,
@@ -1572,7 +1553,7 @@
1572
1553
  "immutable": true,
1573
1554
  "locationInModule": {
1574
1555
  "filename": "src/esbuild-types.ts",
1575
- "line": 43
1556
+ "line": 45
1576
1557
  },
1577
1558
  "name": "metafile",
1578
1559
  "optional": true,
@@ -1588,7 +1569,7 @@
1588
1569
  "immutable": true,
1589
1570
  "locationInModule": {
1590
1571
  "filename": "src/esbuild-types.ts",
1591
- "line": 17
1572
+ "line": 19
1592
1573
  },
1593
1574
  "name": "minify",
1594
1575
  "optional": true,
@@ -1604,7 +1585,7 @@
1604
1585
  "immutable": true,
1605
1586
  "locationInModule": {
1606
1587
  "filename": "src/esbuild-types.ts",
1607
- "line": 19
1588
+ "line": 21
1608
1589
  },
1609
1590
  "name": "minifyIdentifiers",
1610
1591
  "optional": true,
@@ -1620,7 +1601,7 @@
1620
1601
  "immutable": true,
1621
1602
  "locationInModule": {
1622
1603
  "filename": "src/esbuild-types.ts",
1623
- "line": 20
1604
+ "line": 22
1624
1605
  },
1625
1606
  "name": "minifySyntax",
1626
1607
  "optional": true,
@@ -1636,7 +1617,7 @@
1636
1617
  "immutable": true,
1637
1618
  "locationInModule": {
1638
1619
  "filename": "src/esbuild-types.ts",
1639
- "line": 18
1620
+ "line": 20
1640
1621
  },
1641
1622
  "name": "minifyWhitespace",
1642
1623
  "optional": true,
@@ -1652,7 +1633,7 @@
1652
1633
  "immutable": true,
1653
1634
  "locationInModule": {
1654
1635
  "filename": "src/esbuild-types.ts",
1655
- "line": 65
1636
+ "line": 67
1656
1637
  },
1657
1638
  "name": "nodePaths",
1658
1639
  "optional": true,
@@ -1673,7 +1654,7 @@
1673
1654
  "immutable": true,
1674
1655
  "locationInModule": {
1675
1656
  "filename": "src/esbuild-types.ts",
1676
- "line": 45
1657
+ "line": 47
1677
1658
  },
1678
1659
  "name": "outbase",
1679
1660
  "optional": true,
@@ -1689,7 +1670,7 @@
1689
1670
  "immutable": true,
1690
1671
  "locationInModule": {
1691
1672
  "filename": "src/esbuild-types.ts",
1692
- "line": 44
1673
+ "line": 46
1693
1674
  },
1694
1675
  "name": "outdir",
1695
1676
  "optional": true,
@@ -1705,7 +1686,7 @@
1705
1686
  "immutable": true,
1706
1687
  "locationInModule": {
1707
1688
  "filename": "src/esbuild-types.ts",
1708
- "line": 55
1689
+ "line": 57
1709
1690
  },
1710
1691
  "name": "outExtension",
1711
1692
  "optional": true,
@@ -1726,7 +1707,7 @@
1726
1707
  "immutable": true,
1727
1708
  "locationInModule": {
1728
1709
  "filename": "src/esbuild-types.ts",
1729
- "line": 42
1710
+ "line": 44
1730
1711
  },
1731
1712
  "name": "outfile",
1732
1713
  "optional": true,
@@ -1742,7 +1723,7 @@
1742
1723
  "immutable": true,
1743
1724
  "locationInModule": {
1744
1725
  "filename": "src/esbuild-types.ts",
1745
- "line": 46
1726
+ "line": 48
1746
1727
  },
1747
1728
  "name": "platform",
1748
1729
  "optional": true,
@@ -1758,7 +1739,7 @@
1758
1739
  "immutable": true,
1759
1740
  "locationInModule": {
1760
1741
  "filename": "src/esbuild-types.ts",
1761
- "line": 41
1742
+ "line": 43
1762
1743
  },
1763
1744
  "name": "preserveSymlinks",
1764
1745
  "optional": true,
@@ -1774,7 +1755,7 @@
1774
1755
  "immutable": true,
1775
1756
  "locationInModule": {
1776
1757
  "filename": "src/esbuild-types.ts",
1777
- "line": 56
1758
+ "line": 58
1778
1759
  },
1779
1760
  "name": "publicPath",
1780
1761
  "optional": true,
@@ -1790,7 +1771,7 @@
1790
1771
  "immutable": true,
1791
1772
  "locationInModule": {
1792
1773
  "filename": "src/esbuild-types.ts",
1793
- "line": 30
1774
+ "line": 32
1794
1775
  },
1795
1776
  "name": "pure",
1796
1777
  "optional": true,
@@ -1811,7 +1792,7 @@
1811
1792
  "immutable": true,
1812
1793
  "locationInModule": {
1813
1794
  "filename": "src/esbuild-types.ts",
1814
- "line": 49
1795
+ "line": 51
1815
1796
  },
1816
1797
  "name": "resolveExtensions",
1817
1798
  "optional": true,
@@ -1832,7 +1813,7 @@
1832
1813
  "immutable": true,
1833
1814
  "locationInModule": {
1834
1815
  "filename": "src/esbuild-types.ts",
1835
- "line": 8
1816
+ "line": 10
1836
1817
  },
1837
1818
  "name": "sourcemap",
1838
1819
  "optional": true,
@@ -1857,7 +1838,7 @@
1857
1838
  "immutable": true,
1858
1839
  "locationInModule": {
1859
1840
  "filename": "src/esbuild-types.ts",
1860
- "line": 10
1841
+ "line": 12
1861
1842
  },
1862
1843
  "name": "sourceRoot",
1863
1844
  "optional": true,
@@ -1873,7 +1854,7 @@
1873
1854
  "immutable": true,
1874
1855
  "locationInModule": {
1875
1856
  "filename": "src/esbuild-types.ts",
1876
- "line": 11
1857
+ "line": 13
1877
1858
  },
1878
1859
  "name": "sourcesContent",
1879
1860
  "optional": true,
@@ -1889,7 +1870,7 @@
1889
1870
  "immutable": true,
1890
1871
  "locationInModule": {
1891
1872
  "filename": "src/esbuild-types.ts",
1892
- "line": 40
1873
+ "line": 42
1893
1874
  },
1894
1875
  "name": "splitting",
1895
1876
  "optional": true,
@@ -1905,7 +1886,7 @@
1905
1886
  "immutable": true,
1906
1887
  "locationInModule": {
1907
1888
  "filename": "src/esbuild-types.ts",
1908
- "line": 15
1889
+ "line": 17
1909
1890
  },
1910
1891
  "name": "target",
1911
1892
  "optional": true,
@@ -1935,7 +1916,7 @@
1935
1916
  "immutable": true,
1936
1917
  "locationInModule": {
1937
1918
  "filename": "src/esbuild-types.ts",
1938
- "line": 22
1919
+ "line": 24
1939
1920
  },
1940
1921
  "name": "treeShaking",
1941
1922
  "optional": true,
@@ -1951,7 +1932,7 @@
1951
1932
  "immutable": true,
1952
1933
  "locationInModule": {
1953
1934
  "filename": "src/esbuild-types.ts",
1954
- "line": 54
1935
+ "line": 56
1955
1936
  },
1956
1937
  "name": "tsconfig",
1957
1938
  "optional": true,
@@ -1967,7 +1948,7 @@
1967
1948
  "immutable": true,
1968
1949
  "locationInModule": {
1969
1950
  "filename": "src/esbuild-types.ts",
1970
- "line": 52
1951
+ "line": 54
1971
1952
  },
1972
1953
  "name": "write",
1973
1954
  "optional": true,
@@ -1982,26 +1963,28 @@
1982
1963
  "assembly": "@mrgrain/cdk-esbuild",
1983
1964
  "datatype": true,
1984
1965
  "docs": {
1985
- "stability": "experimental"
1966
+ "stability": "stable"
1986
1967
  },
1987
1968
  "fqn": "@mrgrain/cdk-esbuild.BundlerProps",
1988
1969
  "kind": "interface",
1989
1970
  "locationInModule": {
1990
1971
  "filename": "src/bundler.ts",
1991
- "line": 20
1972
+ "line": 22
1992
1973
  },
1993
1974
  "name": "BundlerProps",
1994
1975
  "properties": [
1995
1976
  {
1996
1977
  "abstract": true,
1997
1978
  "docs": {
1998
- "stability": "experimental",
1999
- "summary": "Options passed on to esbuild."
1979
+ "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).",
1980
+ "see": "https://esbuild.github.io/api/#build-api",
1981
+ "stability": "stable",
1982
+ "summary": "Build options passed on to esbuild. Please refer to the esbuild Build API docs for details."
2000
1983
  },
2001
1984
  "immutable": true,
2002
1985
  "locationInModule": {
2003
1986
  "filename": "src/bundler.ts",
2004
- "line": 24
1987
+ "line": 41
2005
1988
  },
2006
1989
  "name": "buildOptions",
2007
1990
  "optional": true,
@@ -2012,13 +1995,14 @@
2012
1995
  {
2013
1996
  "abstract": true,
2014
1997
  "docs": {
2015
- "stability": "experimental",
2016
- "summary": "Relative path to a directory copied to the output BEFORE esbuild is run (i.e esbuild will overwrite existing files)."
1998
+ "remarks": "Files copied like this will be overwritten by esbuild if they share the same name as any of the outputs.",
1999
+ "stability": "stable",
2000
+ "summary": "Copy additional files to the output directory, before the build runs."
2017
2001
  },
2018
2002
  "immutable": true,
2019
2003
  "locationInModule": {
2020
2004
  "filename": "src/bundler.ts",
2021
- "line": 29
2005
+ "line": 49
2022
2006
  },
2023
2007
  "name": "copyDir",
2024
2008
  "optional": true,
@@ -2046,12 +2030,13 @@
2046
2030
  {
2047
2031
  "abstract": true,
2048
2032
  "docs": {
2049
- "stability": "stable"
2033
+ "stability": "stable",
2034
+ "summary": "The location of the code in S3."
2050
2035
  },
2051
2036
  "immutable": true,
2052
2037
  "locationInModule": {
2053
2038
  "filename": "src/code.ts",
2054
- "line": 18
2039
+ "line": 23
2055
2040
  },
2056
2041
  "name": "s3Location",
2057
2042
  "type": {
@@ -2064,7 +2049,9 @@
2064
2049
  "@mrgrain/cdk-esbuild.EsbuildBundler": {
2065
2050
  "assembly": "@mrgrain/cdk-esbuild",
2066
2051
  "docs": {
2067
- "stability": "experimental"
2052
+ "remarks": "This class directly interfaces with esbuild and provides almost no configuration safeguards.",
2053
+ "stability": "experimental",
2054
+ "summary": "Low-level construct that can be used where `BundlingOptions` are required."
2068
2055
  },
2069
2056
  "fqn": "@mrgrain/cdk-esbuild.EsbuildBundler",
2070
2057
  "initializer": {
@@ -2073,12 +2060,14 @@
2073
2060
  },
2074
2061
  "locationInModule": {
2075
2062
  "filename": "src/bundler.ts",
2076
- "line": 40
2063
+ "line": 76
2077
2064
  },
2078
2065
  "parameters": [
2079
2066
  {
2080
2067
  "docs": {
2081
- "summary": "Relative paths to the entrypoints of your code, e.g. `src/index.ts`."
2068
+ "remarks": "E.g. `src/index.ts`.",
2069
+ "stability": "experimental",
2070
+ "summary": "A relative path or list or map of relative paths to the entry points of your code from the root of the project."
2082
2071
  },
2083
2072
  "name": "entryPoints",
2084
2073
  "type": {
@@ -2108,6 +2097,10 @@
2108
2097
  }
2109
2098
  },
2110
2099
  {
2100
+ "docs": {
2101
+ "stability": "experimental",
2102
+ "summary": "Props to change the behaviour of the bundler."
2103
+ },
2111
2104
  "name": "props",
2112
2105
  "type": {
2113
2106
  "fqn": "@mrgrain/cdk-esbuild.BundlerProps"
@@ -2118,19 +2111,20 @@
2118
2111
  "kind": "class",
2119
2112
  "locationInModule": {
2120
2113
  "filename": "src/bundler.ts",
2121
- "line": 35
2114
+ "line": 58
2122
2115
  },
2123
2116
  "name": "EsbuildBundler",
2124
2117
  "properties": [
2125
2118
  {
2126
2119
  "docs": {
2120
+ "remarks": "E.g. `src/index.ts`.",
2127
2121
  "stability": "experimental",
2128
- "summary": "Relative paths to the entrypoints of your code, e.g. `src/index.ts`."
2122
+ "summary": "A relative path or list or map of relative paths to the entry points of your code from the root of the project."
2129
2123
  },
2130
2124
  "immutable": true,
2131
2125
  "locationInModule": {
2132
2126
  "filename": "src/bundler.ts",
2133
- "line": 44
2127
+ "line": 83
2134
2128
  },
2135
2129
  "name": "entryPoints",
2136
2130
  "type": {
@@ -2161,12 +2155,13 @@
2161
2155
  },
2162
2156
  {
2163
2157
  "docs": {
2164
- "stability": "experimental"
2158
+ "deprecated": "This value is ignored since the bundler is always using a locally installed version of esbuild. However the property is required to comply with the `BundlingOptions` interface.",
2159
+ "stability": "deprecated"
2165
2160
  },
2166
2161
  "immutable": true,
2167
2162
  "locationInModule": {
2168
2163
  "filename": "src/bundler.ts",
2169
- "line": 38
2164
+ "line": 71
2170
2165
  },
2171
2166
  "name": "image",
2172
2167
  "type": {
@@ -2175,12 +2170,13 @@
2175
2170
  },
2176
2171
  {
2177
2172
  "docs": {
2178
- "stability": "experimental"
2173
+ "stability": "experimental",
2174
+ "summary": "Implementation of `ILocalBundling` interface, responsible for calling esbuild functions."
2179
2175
  },
2180
2176
  "immutable": true,
2181
2177
  "locationInModule": {
2182
2178
  "filename": "src/bundler.ts",
2183
- "line": 36
2179
+ "line": 64
2184
2180
  },
2185
2181
  "name": "local",
2186
2182
  "type": {
@@ -2189,12 +2185,13 @@
2189
2185
  },
2190
2186
  {
2191
2187
  "docs": {
2192
- "stability": "experimental"
2188
+ "stability": "experimental",
2189
+ "summary": "Props to change the behaviour of the bundler."
2193
2190
  },
2194
2191
  "immutable": true,
2195
2192
  "locationInModule": {
2196
2193
  "filename": "src/bundler.ts",
2197
- "line": 45
2194
+ "line": 90
2198
2195
  },
2199
2196
  "name": "props",
2200
2197
  "type": {
@@ -2208,7 +2205,8 @@
2208
2205
  "assembly": "@mrgrain/cdk-esbuild",
2209
2206
  "base": "@aws-cdk/aws-lambda.InlineCode",
2210
2207
  "docs": {
2211
- "stability": "experimental"
2208
+ "stability": "experimental",
2209
+ "summary": "An implementation of `lambda.InlineCode` using the esbuild Transform API. Inline function code is limited to 4 KiB after transformation."
2212
2210
  },
2213
2211
  "fqn": "@mrgrain/cdk-esbuild.InlineJavaScriptCode",
2214
2212
  "initializer": {
@@ -2217,16 +2215,26 @@
2217
2215
  },
2218
2216
  "locationInModule": {
2219
2217
  "filename": "src/inline-code.ts",
2220
- "line": 32
2218
+ "line": 34
2221
2219
  },
2222
2220
  "parameters": [
2223
2221
  {
2222
+ "docs": {
2223
+ "stability": "experimental",
2224
+ "summary": "The inline code to be transformed."
2225
+ },
2224
2226
  "name": "code",
2225
2227
  "type": {
2226
2228
  "primitive": "string"
2227
2229
  }
2228
2230
  },
2229
2231
  {
2232
+ "docs": {
2233
+ "remarks": "Please refer to the esbuild Transform API docs for details. \\\nDefault values for `transformOptions`:\n- `loader='js'`",
2234
+ "see": "https://esbuild.github.io/api/#transform-api",
2235
+ "stability": "experimental",
2236
+ "summary": "Transform options passed on to esbuild."
2237
+ },
2230
2238
  "name": "transformOptions",
2231
2239
  "optional": true,
2232
2240
  "type": {
@@ -2238,7 +2246,7 @@
2238
2246
  "kind": "class",
2239
2247
  "locationInModule": {
2240
2248
  "filename": "src/inline-code.ts",
2241
- "line": 31
2249
+ "line": 33
2242
2250
  },
2243
2251
  "name": "InlineJavaScriptCode",
2244
2252
  "symbolId": "src/inline-code:InlineJavaScriptCode"
@@ -2247,7 +2255,8 @@
2247
2255
  "assembly": "@mrgrain/cdk-esbuild",
2248
2256
  "base": "@aws-cdk/aws-lambda.InlineCode",
2249
2257
  "docs": {
2250
- "stability": "experimental"
2258
+ "stability": "experimental",
2259
+ "summary": "An implementation of `lambda.InlineCode` using the esbuild Transform API. Inline function code is limited to 4 KiB after transformation."
2251
2260
  },
2252
2261
  "fqn": "@mrgrain/cdk-esbuild.InlineJsxCode",
2253
2262
  "initializer": {
@@ -2256,16 +2265,26 @@
2256
2265
  },
2257
2266
  "locationInModule": {
2258
2267
  "filename": "src/inline-code.ts",
2259
- "line": 41
2268
+ "line": 63
2260
2269
  },
2261
2270
  "parameters": [
2262
2271
  {
2272
+ "docs": {
2273
+ "stability": "experimental",
2274
+ "summary": "The inline code to be transformed."
2275
+ },
2263
2276
  "name": "code",
2264
2277
  "type": {
2265
2278
  "primitive": "string"
2266
2279
  }
2267
2280
  },
2268
2281
  {
2282
+ "docs": {
2283
+ "remarks": "Please refer to the esbuild Transform API docs for details. \\\nDefault values for `transformOptions`:\n- `loader='jsx'`",
2284
+ "see": "https://esbuild.github.io/api/#transform-api",
2285
+ "stability": "experimental",
2286
+ "summary": "Transform options passed on to esbuild."
2287
+ },
2269
2288
  "name": "transformOptions",
2270
2289
  "optional": true,
2271
2290
  "type": {
@@ -2277,7 +2296,7 @@
2277
2296
  "kind": "class",
2278
2297
  "locationInModule": {
2279
2298
  "filename": "src/inline-code.ts",
2280
- "line": 40
2299
+ "line": 62
2281
2300
  },
2282
2301
  "name": "InlineJsxCode",
2283
2302
  "symbolId": "src/inline-code:InlineJsxCode"
@@ -2286,7 +2305,8 @@
2286
2305
  "assembly": "@mrgrain/cdk-esbuild",
2287
2306
  "base": "@aws-cdk/aws-lambda.InlineCode",
2288
2307
  "docs": {
2289
- "stability": "experimental"
2308
+ "stability": "experimental",
2309
+ "summary": "An implementation of `lambda.InlineCode` using the esbuild Transform API. Inline function code is limited to 4 KiB after transformation."
2290
2310
  },
2291
2311
  "fqn": "@mrgrain/cdk-esbuild.InlineTsxCode",
2292
2312
  "initializer": {
@@ -2295,16 +2315,26 @@
2295
2315
  },
2296
2316
  "locationInModule": {
2297
2317
  "filename": "src/inline-code.ts",
2298
- "line": 59
2318
+ "line": 121
2299
2319
  },
2300
2320
  "parameters": [
2301
2321
  {
2322
+ "docs": {
2323
+ "stability": "experimental",
2324
+ "summary": "The inline code to be transformed."
2325
+ },
2302
2326
  "name": "code",
2303
2327
  "type": {
2304
2328
  "primitive": "string"
2305
2329
  }
2306
2330
  },
2307
2331
  {
2332
+ "docs": {
2333
+ "remarks": "Please refer to the esbuild Transform API docs for details. \\\nDefault values for `transformOptions`:\n- `loader='tsx'`",
2334
+ "see": "https://esbuild.github.io/api/#transform-api",
2335
+ "stability": "experimental",
2336
+ "summary": "Transform options passed on to esbuild."
2337
+ },
2308
2338
  "name": "transformOptions",
2309
2339
  "optional": true,
2310
2340
  "type": {
@@ -2316,7 +2346,7 @@
2316
2346
  "kind": "class",
2317
2347
  "locationInModule": {
2318
2348
  "filename": "src/inline-code.ts",
2319
- "line": 58
2349
+ "line": 120
2320
2350
  },
2321
2351
  "name": "InlineTsxCode",
2322
2352
  "symbolId": "src/inline-code:InlineTsxCode"
@@ -2325,7 +2355,8 @@
2325
2355
  "assembly": "@mrgrain/cdk-esbuild",
2326
2356
  "base": "@aws-cdk/aws-lambda.InlineCode",
2327
2357
  "docs": {
2328
- "stability": "experimental"
2358
+ "stability": "experimental",
2359
+ "summary": "An implementation of `lambda.InlineCode` using the esbuild Transform API. Inline function code is limited to 4 KiB after transformation."
2329
2360
  },
2330
2361
  "fqn": "@mrgrain/cdk-esbuild.InlineTypeScriptCode",
2331
2362
  "initializer": {
@@ -2334,16 +2365,26 @@
2334
2365
  },
2335
2366
  "locationInModule": {
2336
2367
  "filename": "src/inline-code.ts",
2337
- "line": 50
2368
+ "line": 92
2338
2369
  },
2339
2370
  "parameters": [
2340
2371
  {
2372
+ "docs": {
2373
+ "stability": "experimental",
2374
+ "summary": "The inline code to be transformed."
2375
+ },
2341
2376
  "name": "code",
2342
2377
  "type": {
2343
2378
  "primitive": "string"
2344
2379
  }
2345
2380
  },
2346
2381
  {
2382
+ "docs": {
2383
+ "remarks": "Please refer to the esbuild Transform API docs for details. \\\nDefault values for `transformOptions`:\n- `loader='ts'`",
2384
+ "see": "https://esbuild.github.io/api/#transform-api",
2385
+ "stability": "experimental",
2386
+ "summary": "Transform options passed on to esbuild."
2387
+ },
2347
2388
  "name": "transformOptions",
2348
2389
  "optional": true,
2349
2390
  "type": {
@@ -2355,7 +2396,7 @@
2355
2396
  "kind": "class",
2356
2397
  "locationInModule": {
2357
2398
  "filename": "src/inline-code.ts",
2358
- "line": 49
2399
+ "line": 91
2359
2400
  },
2360
2401
  "name": "InlineTypeScriptCode",
2361
2402
  "symbolId": "src/inline-code:InlineTypeScriptCode"
@@ -2363,16 +2404,18 @@
2363
2404
  "@mrgrain/cdk-esbuild.JavaScriptAsset": {
2364
2405
  "assembly": "@mrgrain/cdk-esbuild",
2365
2406
  "docs": {
2366
- "stability": "experimental"
2407
+ "remarks": "The asset can be used by other constructs.",
2408
+ "stability": "stable",
2409
+ "summary": "Bundles the entry points and creates a CDK asset which is uploaded to the bootstrapped CDK S3 bucket during deployment."
2367
2410
  },
2368
2411
  "fqn": "@mrgrain/cdk-esbuild.JavaScriptAsset",
2369
2412
  "initializer": {
2370
2413
  "docs": {
2371
- "stability": "experimental"
2414
+ "stability": "stable"
2372
2415
  },
2373
2416
  "locationInModule": {
2374
2417
  "filename": "src/asset.ts",
2375
- "line": 28
2418
+ "line": 41
2376
2419
  },
2377
2420
  "parameters": [
2378
2421
  {
@@ -2398,7 +2441,7 @@
2398
2441
  "kind": "class",
2399
2442
  "locationInModule": {
2400
2443
  "filename": "src/asset.ts",
2401
- "line": 77
2444
+ "line": 94
2402
2445
  },
2403
2446
  "name": "JavaScriptAsset",
2404
2447
  "symbolId": "src/asset:JavaScriptAsset"
@@ -2406,7 +2449,8 @@
2406
2449
  "@mrgrain/cdk-esbuild.JavaScriptCode": {
2407
2450
  "assembly": "@mrgrain/cdk-esbuild",
2408
2451
  "docs": {
2409
- "stability": "stable"
2452
+ "stability": "stable",
2453
+ "summary": "Represents the deployed JavaScript Code."
2410
2454
  },
2411
2455
  "fqn": "@mrgrain/cdk-esbuild.JavaScriptCode",
2412
2456
  "initializer": {
@@ -2415,10 +2459,15 @@
2415
2459
  },
2416
2460
  "locationInModule": {
2417
2461
  "filename": "src/code.ts",
2418
- "line": 100
2462
+ "line": 123
2419
2463
  },
2420
2464
  "parameters": [
2421
2465
  {
2466
+ "docs": {
2467
+ "remarks": "E.g. `src/index.ts`.",
2468
+ "stability": "stable",
2469
+ "summary": "A relative path or list or map of relative paths to the entry points of your code from the root of the project."
2470
+ },
2422
2471
  "name": "entryPoints",
2423
2472
  "type": {
2424
2473
  "union": {
@@ -2447,6 +2496,11 @@
2447
2496
  }
2448
2497
  },
2449
2498
  {
2499
+ "docs": {
2500
+ "remarks": "Default values for `props.buildOptions`:\n- `bundle=true`\n- `platform=node`\n- `target=nodeX` with X being the major node version running locally",
2501
+ "stability": "stable",
2502
+ "summary": "Props to change the behavior of the bundler."
2503
+ },
2450
2504
  "name": "props",
2451
2505
  "optional": true,
2452
2506
  "type": {
@@ -2458,7 +2512,7 @@
2458
2512
  "kind": "class",
2459
2513
  "locationInModule": {
2460
2514
  "filename": "src/code.ts",
2461
- "line": 97
2515
+ "line": 120
2462
2516
  },
2463
2517
  "methods": [
2464
2518
  {
@@ -2467,7 +2521,7 @@
2467
2521
  },
2468
2522
  "locationInModule": {
2469
2523
  "filename": "src/code.ts",
2470
- "line": 63
2524
+ "line": 73
2471
2525
  },
2472
2526
  "name": "bind",
2473
2527
  "parameters": [
@@ -2486,11 +2540,13 @@
2486
2540
  },
2487
2541
  {
2488
2542
  "docs": {
2489
- "stability": "stable"
2543
+ "remarks": "Specifically it's required to allow assets to add\nmetadata for tooling like SAM CLI to be able to find their origins.",
2544
+ "stability": "stable",
2545
+ "summary": "Called after the CFN function resource has been created to allow the code class to bind to it."
2490
2546
  },
2491
2547
  "locationInModule": {
2492
2548
  "filename": "src/code.ts",
2493
- "line": 87
2549
+ "line": 105
2494
2550
  },
2495
2551
  "name": "bindToResource",
2496
2552
  "parameters": [
@@ -2516,9 +2572,24 @@
2516
2572
  "docs": {
2517
2573
  "stability": "stable"
2518
2574
  },
2575
+ "immutable": true,
2519
2576
  "locationInModule": {
2520
2577
  "filename": "src/code.ts",
2521
- "line": 36
2578
+ "line": 121
2579
+ },
2580
+ "name": "assetClass",
2581
+ "protected": true,
2582
+ "type": {
2583
+ "fqn": "@mrgrain/cdk-esbuild.JavaScriptAsset"
2584
+ }
2585
+ },
2586
+ {
2587
+ "docs": {
2588
+ "stability": "stable"
2589
+ },
2590
+ "locationInModule": {
2591
+ "filename": "src/code.ts",
2592
+ "line": 41
2522
2593
  },
2523
2594
  "name": "asset",
2524
2595
  "protected": true,
@@ -2537,24 +2608,13 @@
2537
2608
  },
2538
2609
  {
2539
2610
  "docs": {
2540
- "stability": "stable"
2611
+ "deprecated": "this value is ignored since inline is now determined based on the the inlineCode field of CodeConfig returned from bind().",
2612
+ "stability": "deprecated",
2613
+ "summary": "Determines whether this Code is inline code or not."
2541
2614
  },
2542
2615
  "locationInModule": {
2543
2616
  "filename": "src/code.ts",
2544
- "line": 98
2545
- },
2546
- "name": "assetClass",
2547
- "type": {
2548
- "fqn": "@mrgrain/cdk-esbuild.JavaScriptAsset"
2549
- }
2550
- },
2551
- {
2552
- "docs": {
2553
- "stability": "stable"
2554
- },
2555
- "locationInModule": {
2556
- "filename": "src/code.ts",
2557
- "line": 38
2617
+ "line": 48
2558
2618
  },
2559
2619
  "name": "isInline",
2560
2620
  "type": {
@@ -2567,7 +2627,7 @@
2567
2627
  },
2568
2628
  "locationInModule": {
2569
2629
  "filename": "src/code.ts",
2570
- "line": 34
2630
+ "line": 39
2571
2631
  },
2572
2632
  "name": "props",
2573
2633
  "protected": true,
@@ -2586,14 +2646,34 @@
2586
2646
  },
2587
2647
  "fqn": "@mrgrain/cdk-esbuild.JavaScriptCodeProps",
2588
2648
  "interfaces": [
2589
- "@mrgrain/cdk-esbuild.AssetBaseProps"
2649
+ "@mrgrain/cdk-esbuild.BundlerProps"
2590
2650
  ],
2591
2651
  "kind": "interface",
2592
2652
  "locationInModule": {
2593
2653
  "filename": "src/code.ts",
2594
- "line": 21
2654
+ "line": 26
2595
2655
  },
2596
2656
  "name": "JavaScriptCodeProps",
2657
+ "properties": [
2658
+ {
2659
+ "abstract": true,
2660
+ "docs": {
2661
+ "remarks": "As this is a plain string, it can be used in construct IDs in order to enforce creation of a new resource when the content hash has changed.\n\nDefaults to a hash of all files in the resulting bundle.",
2662
+ "stability": "stable",
2663
+ "summary": "A hash of this asset, which is available at construction time."
2664
+ },
2665
+ "immutable": true,
2666
+ "locationInModule": {
2667
+ "filename": "src/asset.ts",
2668
+ "line": 19
2669
+ },
2670
+ "name": "assetHash",
2671
+ "optional": true,
2672
+ "type": {
2673
+ "primitive": "string"
2674
+ }
2675
+ }
2676
+ ],
2597
2677
  "symbolId": "src/code:JavaScriptCodeProps"
2598
2678
  },
2599
2679
  "@mrgrain/cdk-esbuild.JavaScriptSource": {
@@ -2753,7 +2833,7 @@
2753
2833
  },
2754
2834
  "fqn": "@mrgrain/cdk-esbuild.JavaScriptSourceProps",
2755
2835
  "interfaces": [
2756
- "@mrgrain/cdk-esbuild.AssetBaseProps"
2836
+ "@mrgrain/cdk-esbuild.BundlerProps"
2757
2837
  ],
2758
2838
  "kind": "interface",
2759
2839
  "locationInModule": {
@@ -2761,6 +2841,26 @@
2761
2841
  "line": 11
2762
2842
  },
2763
2843
  "name": "JavaScriptSourceProps",
2844
+ "properties": [
2845
+ {
2846
+ "abstract": true,
2847
+ "docs": {
2848
+ "remarks": "As this is a plain string, it can be used in construct IDs in order to enforce creation of a new resource when the content hash has changed.\n\nDefaults to a hash of all files in the resulting bundle.",
2849
+ "stability": "stable",
2850
+ "summary": "A hash of this asset, which is available at construction time."
2851
+ },
2852
+ "immutable": true,
2853
+ "locationInModule": {
2854
+ "filename": "src/asset.ts",
2855
+ "line": 19
2856
+ },
2857
+ "name": "assetHash",
2858
+ "optional": true,
2859
+ "type": {
2860
+ "primitive": "string"
2861
+ }
2862
+ }
2863
+ ],
2764
2864
  "symbolId": "src/source:JavaScriptSourceProps"
2765
2865
  },
2766
2866
  "@mrgrain/cdk-esbuild.TransformOptions": {
@@ -2773,7 +2873,7 @@
2773
2873
  "kind": "interface",
2774
2874
  "locationInModule": {
2775
2875
  "filename": "src/esbuild-types.ts",
2776
- "line": 156
2876
+ "line": 158
2777
2877
  },
2778
2878
  "name": "TransformOptions",
2779
2879
  "properties": [
@@ -2785,7 +2885,7 @@
2785
2885
  "immutable": true,
2786
2886
  "locationInModule": {
2787
2887
  "filename": "src/esbuild-types.ts",
2788
- "line": 160
2888
+ "line": 163
2789
2889
  },
2790
2890
  "name": "banner",
2791
2891
  "optional": true,
@@ -2801,7 +2901,7 @@
2801
2901
  "immutable": true,
2802
2902
  "locationInModule": {
2803
2903
  "filename": "src/esbuild-types.ts",
2804
- "line": 21
2904
+ "line": 23
2805
2905
  },
2806
2906
  "name": "charset",
2807
2907
  "optional": true,
@@ -2817,7 +2917,7 @@
2817
2917
  "immutable": true,
2818
2918
  "locationInModule": {
2819
2919
  "filename": "src/esbuild-types.ts",
2820
- "line": 33
2920
+ "line": 35
2821
2921
  },
2822
2922
  "name": "color",
2823
2923
  "optional": true,
@@ -2833,7 +2933,7 @@
2833
2933
  "immutable": true,
2834
2934
  "locationInModule": {
2835
2935
  "filename": "src/esbuild-types.ts",
2836
- "line": 29
2936
+ "line": 31
2837
2937
  },
2838
2938
  "name": "define",
2839
2939
  "optional": true,
@@ -2854,7 +2954,7 @@
2854
2954
  "immutable": true,
2855
2955
  "locationInModule": {
2856
2956
  "filename": "src/esbuild-types.ts",
2857
- "line": 161
2957
+ "line": 164
2858
2958
  },
2859
2959
  "name": "footer",
2860
2960
  "optional": true,
@@ -2870,7 +2970,7 @@
2870
2970
  "immutable": true,
2871
2971
  "locationInModule": {
2872
2972
  "filename": "src/esbuild-types.ts",
2873
- "line": 13
2973
+ "line": 15
2874
2974
  },
2875
2975
  "name": "format",
2876
2976
  "optional": true,
@@ -2886,7 +2986,7 @@
2886
2986
  "immutable": true,
2887
2987
  "locationInModule": {
2888
2988
  "filename": "src/esbuild-types.ts",
2889
- "line": 14
2989
+ "line": 16
2890
2990
  },
2891
2991
  "name": "globalName",
2892
2992
  "optional": true,
@@ -2902,7 +3002,7 @@
2902
3002
  "immutable": true,
2903
3003
  "locationInModule": {
2904
3004
  "filename": "src/esbuild-types.ts",
2905
- "line": 23
3005
+ "line": 25
2906
3006
  },
2907
3007
  "name": "ignoreAnnotations",
2908
3008
  "optional": true,
@@ -2918,7 +3018,7 @@
2918
3018
  "immutable": true,
2919
3019
  "locationInModule": {
2920
3020
  "filename": "src/esbuild-types.ts",
2921
- "line": 25
3021
+ "line": 27
2922
3022
  },
2923
3023
  "name": "jsx",
2924
3024
  "optional": true,
@@ -2934,7 +3034,7 @@
2934
3034
  "immutable": true,
2935
3035
  "locationInModule": {
2936
3036
  "filename": "src/esbuild-types.ts",
2937
- "line": 26
3037
+ "line": 28
2938
3038
  },
2939
3039
  "name": "jsxFactory",
2940
3040
  "optional": true,
@@ -2950,7 +3050,7 @@
2950
3050
  "immutable": true,
2951
3051
  "locationInModule": {
2952
3052
  "filename": "src/esbuild-types.ts",
2953
- "line": 27
3053
+ "line": 29
2954
3054
  },
2955
3055
  "name": "jsxFragment",
2956
3056
  "optional": true,
@@ -2966,7 +3066,7 @@
2966
3066
  "immutable": true,
2967
3067
  "locationInModule": {
2968
3068
  "filename": "src/esbuild-types.ts",
2969
- "line": 31
3069
+ "line": 33
2970
3070
  },
2971
3071
  "name": "keepNames",
2972
3072
  "optional": true,
@@ -2982,7 +3082,7 @@
2982
3082
  "immutable": true,
2983
3083
  "locationInModule": {
2984
3084
  "filename": "src/esbuild-types.ts",
2985
- "line": 9
3085
+ "line": 11
2986
3086
  },
2987
3087
  "name": "legalComments",
2988
3088
  "optional": true,
@@ -2998,7 +3098,7 @@
2998
3098
  "immutable": true,
2999
3099
  "locationInModule": {
3000
3100
  "filename": "src/esbuild-types.ts",
3001
- "line": 159
3101
+ "line": 162
3002
3102
  },
3003
3103
  "name": "loader",
3004
3104
  "optional": true,
@@ -3014,7 +3114,7 @@
3014
3114
  "immutable": true,
3015
3115
  "locationInModule": {
3016
3116
  "filename": "src/esbuild-types.ts",
3017
- "line": 34
3117
+ "line": 36
3018
3118
  },
3019
3119
  "name": "logLevel",
3020
3120
  "optional": true,
@@ -3030,7 +3130,7 @@
3030
3130
  "immutable": true,
3031
3131
  "locationInModule": {
3032
3132
  "filename": "src/esbuild-types.ts",
3033
- "line": 35
3133
+ "line": 37
3034
3134
  },
3035
3135
  "name": "logLimit",
3036
3136
  "optional": true,
@@ -3046,7 +3146,7 @@
3046
3146
  "immutable": true,
3047
3147
  "locationInModule": {
3048
3148
  "filename": "src/esbuild-types.ts",
3049
- "line": 17
3149
+ "line": 19
3050
3150
  },
3051
3151
  "name": "minify",
3052
3152
  "optional": true,
@@ -3062,7 +3162,7 @@
3062
3162
  "immutable": true,
3063
3163
  "locationInModule": {
3064
3164
  "filename": "src/esbuild-types.ts",
3065
- "line": 19
3165
+ "line": 21
3066
3166
  },
3067
3167
  "name": "minifyIdentifiers",
3068
3168
  "optional": true,
@@ -3078,7 +3178,7 @@
3078
3178
  "immutable": true,
3079
3179
  "locationInModule": {
3080
3180
  "filename": "src/esbuild-types.ts",
3081
- "line": 20
3181
+ "line": 22
3082
3182
  },
3083
3183
  "name": "minifySyntax",
3084
3184
  "optional": true,
@@ -3094,7 +3194,7 @@
3094
3194
  "immutable": true,
3095
3195
  "locationInModule": {
3096
3196
  "filename": "src/esbuild-types.ts",
3097
- "line": 18
3197
+ "line": 20
3098
3198
  },
3099
3199
  "name": "minifyWhitespace",
3100
3200
  "optional": true,
@@ -3110,7 +3210,7 @@
3110
3210
  "immutable": true,
3111
3211
  "locationInModule": {
3112
3212
  "filename": "src/esbuild-types.ts",
3113
- "line": 30
3213
+ "line": 32
3114
3214
  },
3115
3215
  "name": "pure",
3116
3216
  "optional": true,
@@ -3131,7 +3231,7 @@
3131
3231
  "immutable": true,
3132
3232
  "locationInModule": {
3133
3233
  "filename": "src/esbuild-types.ts",
3134
- "line": 158
3234
+ "line": 161
3135
3235
  },
3136
3236
  "name": "sourcefile",
3137
3237
  "optional": true,
@@ -3147,7 +3247,7 @@
3147
3247
  "immutable": true,
3148
3248
  "locationInModule": {
3149
3249
  "filename": "src/esbuild-types.ts",
3150
- "line": 8
3250
+ "line": 10
3151
3251
  },
3152
3252
  "name": "sourcemap",
3153
3253
  "optional": true,
@@ -3172,7 +3272,7 @@
3172
3272
  "immutable": true,
3173
3273
  "locationInModule": {
3174
3274
  "filename": "src/esbuild-types.ts",
3175
- "line": 10
3275
+ "line": 12
3176
3276
  },
3177
3277
  "name": "sourceRoot",
3178
3278
  "optional": true,
@@ -3188,7 +3288,7 @@
3188
3288
  "immutable": true,
3189
3289
  "locationInModule": {
3190
3290
  "filename": "src/esbuild-types.ts",
3191
- "line": 11
3291
+ "line": 13
3192
3292
  },
3193
3293
  "name": "sourcesContent",
3194
3294
  "optional": true,
@@ -3204,7 +3304,7 @@
3204
3304
  "immutable": true,
3205
3305
  "locationInModule": {
3206
3306
  "filename": "src/esbuild-types.ts",
3207
- "line": 15
3307
+ "line": 17
3208
3308
  },
3209
3309
  "name": "target",
3210
3310
  "optional": true,
@@ -3234,7 +3334,7 @@
3234
3334
  "immutable": true,
3235
3335
  "locationInModule": {
3236
3336
  "filename": "src/esbuild-types.ts",
3237
- "line": 22
3337
+ "line": 24
3238
3338
  },
3239
3339
  "name": "treeShaking",
3240
3340
  "optional": true,
@@ -3250,7 +3350,7 @@
3250
3350
  "immutable": true,
3251
3351
  "locationInModule": {
3252
3352
  "filename": "src/esbuild-types.ts",
3253
- "line": 157
3353
+ "line": 159
3254
3354
  },
3255
3355
  "name": "tsconfigRaw",
3256
3356
  "optional": true,
@@ -3264,16 +3364,18 @@
3264
3364
  "@mrgrain/cdk-esbuild.TypeScriptAsset": {
3265
3365
  "assembly": "@mrgrain/cdk-esbuild",
3266
3366
  "docs": {
3267
- "stability": "experimental"
3367
+ "remarks": "The asset can be used by other constructs.",
3368
+ "stability": "stable",
3369
+ "summary": "Bundles the entry points and creates a CDK asset which is uploaded to the bootstrapped CDK S3 bucket during deployment."
3268
3370
  },
3269
3371
  "fqn": "@mrgrain/cdk-esbuild.TypeScriptAsset",
3270
3372
  "initializer": {
3271
3373
  "docs": {
3272
- "stability": "experimental"
3374
+ "stability": "stable"
3273
3375
  },
3274
3376
  "locationInModule": {
3275
3377
  "filename": "src/asset.ts",
3276
- "line": 28
3378
+ "line": 41
3277
3379
  },
3278
3380
  "parameters": [
3279
3381
  {
@@ -3299,7 +3401,7 @@
3299
3401
  "kind": "class",
3300
3402
  "locationInModule": {
3301
3403
  "filename": "src/asset.ts",
3302
- "line": 82
3404
+ "line": 103
3303
3405
  },
3304
3406
  "name": "TypeScriptAsset",
3305
3407
  "symbolId": "src/asset:TypeScriptAsset"
@@ -3307,7 +3409,8 @@
3307
3409
  "@mrgrain/cdk-esbuild.TypeScriptCode": {
3308
3410
  "assembly": "@mrgrain/cdk-esbuild",
3309
3411
  "docs": {
3310
- "stability": "stable"
3412
+ "stability": "stable",
3413
+ "summary": "Represents the deployed TypeScript Code."
3311
3414
  },
3312
3415
  "fqn": "@mrgrain/cdk-esbuild.TypeScriptCode",
3313
3416
  "initializer": {
@@ -3316,10 +3419,15 @@
3316
3419
  },
3317
3420
  "locationInModule": {
3318
3421
  "filename": "src/code.ts",
3319
- "line": 110
3422
+ "line": 155
3320
3423
  },
3321
3424
  "parameters": [
3322
3425
  {
3426
+ "docs": {
3427
+ "remarks": "E.g. `src/index.ts`.",
3428
+ "stability": "stable",
3429
+ "summary": "A relative path or list or map of relative paths to the entry points of your code from the root of the project."
3430
+ },
3323
3431
  "name": "entryPoints",
3324
3432
  "type": {
3325
3433
  "union": {
@@ -3348,6 +3456,11 @@
3348
3456
  }
3349
3457
  },
3350
3458
  {
3459
+ "docs": {
3460
+ "remarks": "Default values for `props.buildOptions`:\n- `bundle=true`\n- `platform=node`\n- `target=nodeX` with X being the major node version running locally",
3461
+ "stability": "stable",
3462
+ "summary": "Props to change the behavior of the bundler."
3463
+ },
3351
3464
  "name": "props",
3352
3465
  "optional": true,
3353
3466
  "type": {
@@ -3359,7 +3472,7 @@
3359
3472
  "kind": "class",
3360
3473
  "locationInModule": {
3361
3474
  "filename": "src/code.ts",
3362
- "line": 107
3475
+ "line": 152
3363
3476
  },
3364
3477
  "methods": [
3365
3478
  {
@@ -3368,7 +3481,7 @@
3368
3481
  },
3369
3482
  "locationInModule": {
3370
3483
  "filename": "src/code.ts",
3371
- "line": 63
3484
+ "line": 73
3372
3485
  },
3373
3486
  "name": "bind",
3374
3487
  "parameters": [
@@ -3387,11 +3500,13 @@
3387
3500
  },
3388
3501
  {
3389
3502
  "docs": {
3390
- "stability": "stable"
3503
+ "remarks": "Specifically it's required to allow assets to add\nmetadata for tooling like SAM CLI to be able to find their origins.",
3504
+ "stability": "stable",
3505
+ "summary": "Called after the CFN function resource has been created to allow the code class to bind to it."
3391
3506
  },
3392
3507
  "locationInModule": {
3393
3508
  "filename": "src/code.ts",
3394
- "line": 87
3509
+ "line": 105
3395
3510
  },
3396
3511
  "name": "bindToResource",
3397
3512
  "parameters": [
@@ -3417,9 +3532,24 @@
3417
3532
  "docs": {
3418
3533
  "stability": "stable"
3419
3534
  },
3535
+ "immutable": true,
3420
3536
  "locationInModule": {
3421
3537
  "filename": "src/code.ts",
3422
- "line": 36
3538
+ "line": 153
3539
+ },
3540
+ "name": "assetClass",
3541
+ "protected": true,
3542
+ "type": {
3543
+ "fqn": "@mrgrain/cdk-esbuild.TypeScriptAsset"
3544
+ }
3545
+ },
3546
+ {
3547
+ "docs": {
3548
+ "stability": "stable"
3549
+ },
3550
+ "locationInModule": {
3551
+ "filename": "src/code.ts",
3552
+ "line": 41
3423
3553
  },
3424
3554
  "name": "asset",
3425
3555
  "protected": true,
@@ -3438,24 +3568,13 @@
3438
3568
  },
3439
3569
  {
3440
3570
  "docs": {
3441
- "stability": "stable"
3442
- },
3443
- "locationInModule": {
3444
- "filename": "src/code.ts",
3445
- "line": 108
3446
- },
3447
- "name": "assetClass",
3448
- "type": {
3449
- "fqn": "@mrgrain/cdk-esbuild.TypeScriptAsset"
3450
- }
3451
- },
3452
- {
3453
- "docs": {
3454
- "stability": "stable"
3571
+ "deprecated": "this value is ignored since inline is now determined based on the the inlineCode field of CodeConfig returned from bind().",
3572
+ "stability": "deprecated",
3573
+ "summary": "Determines whether this Code is inline code or not."
3455
3574
  },
3456
3575
  "locationInModule": {
3457
3576
  "filename": "src/code.ts",
3458
- "line": 38
3577
+ "line": 48
3459
3578
  },
3460
3579
  "name": "isInline",
3461
3580
  "type": {
@@ -3468,7 +3587,7 @@
3468
3587
  },
3469
3588
  "locationInModule": {
3470
3589
  "filename": "src/code.ts",
3471
- "line": 34
3590
+ "line": 39
3472
3591
  },
3473
3592
  "name": "props",
3474
3593
  "protected": true,
@@ -3487,14 +3606,34 @@
3487
3606
  },
3488
3607
  "fqn": "@mrgrain/cdk-esbuild.TypeScriptCodeProps",
3489
3608
  "interfaces": [
3490
- "@mrgrain/cdk-esbuild.AssetBaseProps"
3609
+ "@mrgrain/cdk-esbuild.BundlerProps"
3491
3610
  ],
3492
3611
  "kind": "interface",
3493
3612
  "locationInModule": {
3494
3613
  "filename": "src/code.ts",
3495
- "line": 22
3614
+ "line": 27
3496
3615
  },
3497
3616
  "name": "TypeScriptCodeProps",
3617
+ "properties": [
3618
+ {
3619
+ "abstract": true,
3620
+ "docs": {
3621
+ "remarks": "As this is a plain string, it can be used in construct IDs in order to enforce creation of a new resource when the content hash has changed.\n\nDefaults to a hash of all files in the resulting bundle.",
3622
+ "stability": "stable",
3623
+ "summary": "A hash of this asset, which is available at construction time."
3624
+ },
3625
+ "immutable": true,
3626
+ "locationInModule": {
3627
+ "filename": "src/asset.ts",
3628
+ "line": 19
3629
+ },
3630
+ "name": "assetHash",
3631
+ "optional": true,
3632
+ "type": {
3633
+ "primitive": "string"
3634
+ }
3635
+ }
3636
+ ],
3498
3637
  "symbolId": "src/code:TypeScriptCodeProps"
3499
3638
  },
3500
3639
  "@mrgrain/cdk-esbuild.TypeScriptSource": {
@@ -3654,7 +3793,7 @@
3654
3793
  },
3655
3794
  "fqn": "@mrgrain/cdk-esbuild.TypeScriptSourceProps",
3656
3795
  "interfaces": [
3657
- "@mrgrain/cdk-esbuild.AssetBaseProps"
3796
+ "@mrgrain/cdk-esbuild.BundlerProps"
3658
3797
  ],
3659
3798
  "kind": "interface",
3660
3799
  "locationInModule": {
@@ -3662,9 +3801,29 @@
3662
3801
  "line": 12
3663
3802
  },
3664
3803
  "name": "TypeScriptSourceProps",
3804
+ "properties": [
3805
+ {
3806
+ "abstract": true,
3807
+ "docs": {
3808
+ "remarks": "As this is a plain string, it can be used in construct IDs in order to enforce creation of a new resource when the content hash has changed.\n\nDefaults to a hash of all files in the resulting bundle.",
3809
+ "stability": "stable",
3810
+ "summary": "A hash of this asset, which is available at construction time."
3811
+ },
3812
+ "immutable": true,
3813
+ "locationInModule": {
3814
+ "filename": "src/asset.ts",
3815
+ "line": 19
3816
+ },
3817
+ "name": "assetHash",
3818
+ "optional": true,
3819
+ "type": {
3820
+ "primitive": "string"
3821
+ }
3822
+ }
3823
+ ],
3665
3824
  "symbolId": "src/source:TypeScriptSourceProps"
3666
3825
  }
3667
3826
  },
3668
- "version": "2.0.0-alpha.1",
3669
- "fingerprint": "WH3An5giTSfLdKUycPXKt1mG/a9A5swf7NuTkG1DHEY="
3827
+ "version": "2.0.0-rc.0",
3828
+ "fingerprint": "mey3tjuALJueRwEzfybW1xl1ivwlTONiqWoQvgaypK8="
3670
3829
  }