@mrgrain/cdk-esbuild 2.0.0-alpha.4 → 2.0.0-alpha.5
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 +298 -139
- package/API.md +241 -105
- package/CHANGELOG.md +7 -0
- package/README.md +46 -5
- package/SECURITY.md +5 -5
- package/lib/asset.d.ts +21 -8
- package/lib/asset.js +17 -6
- package/lib/bundler.d.ts +52 -11
- package/lib/bundler.js +20 -6
- package/lib/code.d.ts +58 -5
- package/lib/code.js +57 -6
- package/lib/inline-code.d.ts +88 -4
- package/lib/inline-code.js +93 -9
- package/lib/source.js +2 -2
- package/package.json +1 -1
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) | [
|
|
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.
|
|
993
|
+
"@mrgrain/cdk-esbuild.BundlerProps"
|
|
1032
994
|
],
|
|
1033
995
|
"kind": "interface",
|
|
1034
996
|
"locationInModule": {
|
|
1035
997
|
"filename": "src/asset.ts",
|
|
1036
|
-
"line":
|
|
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": "
|
|
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":
|
|
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"
|
|
@@ -1982,26 +1963,28 @@
|
|
|
1982
1963
|
"assembly": "@mrgrain/cdk-esbuild",
|
|
1983
1964
|
"datatype": true,
|
|
1984
1965
|
"docs": {
|
|
1985
|
-
"stability": "
|
|
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":
|
|
1972
|
+
"line": 22
|
|
1992
1973
|
},
|
|
1993
1974
|
"name": "BundlerProps",
|
|
1994
1975
|
"properties": [
|
|
1995
1976
|
{
|
|
1996
1977
|
"abstract": true,
|
|
1997
1978
|
"docs": {
|
|
1998
|
-
"
|
|
1999
|
-
"
|
|
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":
|
|
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
|
-
"
|
|
2016
|
-
"
|
|
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":
|
|
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":
|
|
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
|
-
"
|
|
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":
|
|
2063
|
+
"line": 76
|
|
2077
2064
|
},
|
|
2078
2065
|
"parameters": [
|
|
2079
2066
|
{
|
|
2080
2067
|
"docs": {
|
|
2081
|
-
"
|
|
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":
|
|
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": "
|
|
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":
|
|
2127
|
+
"line": 83
|
|
2134
2128
|
},
|
|
2135
2129
|
"name": "entryPoints",
|
|
2136
2130
|
"type": {
|
|
@@ -2161,12 +2155,13 @@
|
|
|
2161
2155
|
},
|
|
2162
2156
|
{
|
|
2163
2157
|
"docs": {
|
|
2164
|
-
"
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
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
|
-
"
|
|
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": "
|
|
2414
|
+
"stability": "stable"
|
|
2372
2415
|
},
|
|
2373
2416
|
"locationInModule": {
|
|
2374
2417
|
"filename": "src/asset.ts",
|
|
2375
|
-
"line":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
2524
|
+
"line": 73
|
|
2471
2525
|
},
|
|
2472
2526
|
"name": "bind",
|
|
2473
2527
|
"parameters": [
|
|
@@ -2486,11 +2540,13 @@
|
|
|
2486
2540
|
},
|
|
2487
2541
|
{
|
|
2488
2542
|
"docs": {
|
|
2489
|
-
"
|
|
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":
|
|
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":
|
|
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
|
-
"
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
"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"
|
|
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."
|
|
2554
2614
|
},
|
|
2555
2615
|
"locationInModule": {
|
|
2556
2616
|
"filename": "src/code.ts",
|
|
2557
|
-
"line":
|
|
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":
|
|
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.
|
|
2649
|
+
"@mrgrain/cdk-esbuild.BundlerProps"
|
|
2590
2650
|
],
|
|
2591
2651
|
"kind": "interface",
|
|
2592
2652
|
"locationInModule": {
|
|
2593
2653
|
"filename": "src/code.ts",
|
|
2594
|
-
"line":
|
|
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.
|
|
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": {
|
|
@@ -3264,16 +3364,18 @@
|
|
|
3264
3364
|
"@mrgrain/cdk-esbuild.TypeScriptAsset": {
|
|
3265
3365
|
"assembly": "@mrgrain/cdk-esbuild",
|
|
3266
3366
|
"docs": {
|
|
3267
|
-
"
|
|
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": "
|
|
3374
|
+
"stability": "stable"
|
|
3273
3375
|
},
|
|
3274
3376
|
"locationInModule": {
|
|
3275
3377
|
"filename": "src/asset.ts",
|
|
3276
|
-
"line":
|
|
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":
|
|
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":
|
|
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":
|
|
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":
|
|
3484
|
+
"line": 73
|
|
3372
3485
|
},
|
|
3373
3486
|
"name": "bind",
|
|
3374
3487
|
"parameters": [
|
|
@@ -3387,11 +3500,13 @@
|
|
|
3387
3500
|
},
|
|
3388
3501
|
{
|
|
3389
3502
|
"docs": {
|
|
3390
|
-
"
|
|
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":
|
|
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":
|
|
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
|
-
"
|
|
3442
|
-
|
|
3443
|
-
|
|
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":
|
|
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":
|
|
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.
|
|
3609
|
+
"@mrgrain/cdk-esbuild.BundlerProps"
|
|
3491
3610
|
],
|
|
3492
3611
|
"kind": "interface",
|
|
3493
3612
|
"locationInModule": {
|
|
3494
3613
|
"filename": "src/code.ts",
|
|
3495
|
-
"line":
|
|
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.
|
|
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.
|
|
3669
|
-
"fingerprint": "
|
|
3827
|
+
"version": "2.0.0-alpha.5",
|
|
3828
|
+
"fingerprint": "AdL6hJY8jZk+fh5n+ST+KSygY3qF3N0pEjQ75LE0OcQ="
|
|
3670
3829
|
}
|