@mrgrain/cdk-esbuild 2.2.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +22 -21
- package/.jsii +2819 -968
- package/.projenrc.ts +47 -47
- package/API.md +37 -17
- package/CHANGELOG.md +6 -22
- package/LICENSE +1 -1
- package/README.md +35 -29
- package/SECURITY.md +6 -5
- package/lib/asset.d.ts +2 -2
- package/lib/asset.js +8 -7
- package/lib/bundler.d.ts +1 -1
- package/lib/bundler.js +5 -5
- package/lib/code.d.ts +4 -3
- package/lib/code.js +6 -6
- package/lib/esbuild-types.d.ts +50 -0
- package/lib/esbuild-types.js +1 -1
- package/lib/inline-code.d.ts +1 -1
- package/lib/inline-code.js +6 -6
- package/lib/source.d.ts +2 -2
- package/lib/source.js +6 -6
- package/package.json +36 -50
- package/projenrc/TypeScriptSourceFile.ts +1 -1
- package/releasetag.txt +1 -0
- package/version.txt +1 -0
package/.projenrc.ts
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
awscdk,
|
|
3
|
+
javascript,
|
|
4
4
|
JsonFile,
|
|
5
|
-
NodePackageManager,
|
|
6
5
|
release,
|
|
7
6
|
vscode,
|
|
8
7
|
} from 'projen';
|
|
9
8
|
import { SourceFile } from 'ts-morph';
|
|
10
9
|
import { TypeScriptSourceFile } from './projenrc/TypeScriptSourceFile';
|
|
11
10
|
|
|
12
|
-
const project = new AwsCdkConstructLibrary({
|
|
11
|
+
const project = new awscdk.AwsCdkConstructLibrary({
|
|
13
12
|
projenrcTs: true,
|
|
14
13
|
projenrcTsOptions: {
|
|
15
14
|
filename: '.projenrc.ts',
|
|
16
15
|
},
|
|
17
|
-
eslintOptions: {
|
|
18
|
-
lintProjenRc: false,
|
|
19
|
-
dirs: ['src', 'projenrc', '.projenrc.ts'],
|
|
20
|
-
},
|
|
21
16
|
depsUpgradeOptions: {
|
|
22
17
|
workflow: false,
|
|
23
18
|
},
|
|
@@ -54,40 +49,52 @@ const project = new AwsCdkConstructLibrary({
|
|
|
54
49
|
},
|
|
55
50
|
},
|
|
56
51
|
},
|
|
52
|
+
jestOptions: {
|
|
53
|
+
jestConfig: {
|
|
54
|
+
testPathIgnorePatterns: ['/node_modules/', '/examples/'],
|
|
55
|
+
coveragePathIgnorePatterns: ['/node_modules/', '/examples/'],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
eslintOptions: {
|
|
59
|
+
lintProjenRc: false,
|
|
60
|
+
dirs: ['src', 'projenrc', '.projenrc.ts'],
|
|
61
|
+
ignorePatterns: [
|
|
62
|
+
'*.js',
|
|
63
|
+
'*.d.ts',
|
|
64
|
+
'node_modules/',
|
|
65
|
+
'*.generated.ts',
|
|
66
|
+
'coverage',
|
|
67
|
+
'examples/',
|
|
68
|
+
],
|
|
69
|
+
},
|
|
57
70
|
|
|
58
71
|
// Release
|
|
59
|
-
packageManager: NodePackageManager.NPM,
|
|
72
|
+
packageManager: javascript.NodePackageManager.NPM,
|
|
60
73
|
npmDistTag: 'latest',
|
|
61
74
|
defaultReleaseBranch: 'main',
|
|
62
|
-
majorVersion:
|
|
75
|
+
majorVersion: 3,
|
|
63
76
|
releaseTrigger: release.ReleaseTrigger.manual(),
|
|
64
77
|
catalog: {
|
|
65
78
|
twitter: '@mrgrain',
|
|
66
79
|
},
|
|
67
80
|
workflowContainerImage: 'jsii/superchain:1-buster-slim-node14',
|
|
81
|
+
workflowBootstrapSteps: [{
|
|
82
|
+
name: 'Update npm',
|
|
83
|
+
run: 'sudo npm i -g npm',
|
|
84
|
+
}],
|
|
68
85
|
|
|
69
86
|
// Dependencies
|
|
70
|
-
cdkVersion: '
|
|
71
|
-
|
|
72
|
-
'
|
|
73
|
-
'@aws-cdk/aws-s3',
|
|
74
|
-
'@aws-cdk/aws-s3-assets',
|
|
75
|
-
'@aws-cdk/aws-s3-deployment',
|
|
76
|
-
'@aws-cdk/aws-synthetics',
|
|
77
|
-
'@aws-cdk/core',
|
|
78
|
-
],
|
|
79
|
-
cdkTestDependencies: [
|
|
80
|
-
'@aws-cdk/assert',
|
|
81
|
-
'@aws-cdk/aws-lambda',
|
|
82
|
-
'@aws-cdk/aws-s3',
|
|
83
|
-
'@aws-cdk/aws-s3-assets',
|
|
84
|
-
'@aws-cdk/aws-s3-deployment',
|
|
85
|
-
'@aws-cdk/aws-synthetics',
|
|
86
|
-
'@aws-cdk/core',
|
|
87
|
+
cdkVersion: '2.0.0',
|
|
88
|
+
peerDeps: [
|
|
89
|
+
'aws-cdk-lib@^2.0.0',
|
|
87
90
|
],
|
|
88
91
|
devDeps: [
|
|
92
|
+
'@aws-cdk/aws-synthetics-alpha',
|
|
89
93
|
'@types/eslint',
|
|
94
|
+
'aws-cdk-lib@2.0.0',
|
|
95
|
+
'constructs@10.0.5',
|
|
90
96
|
'esbuild@^0.14.0',
|
|
97
|
+
'jest-mock',
|
|
91
98
|
'ts-morph',
|
|
92
99
|
],
|
|
93
100
|
|
|
@@ -100,6 +107,7 @@ const project = new AwsCdkConstructLibrary({
|
|
|
100
107
|
'.cdk.staging',
|
|
101
108
|
'examples/template',
|
|
102
109
|
'!/.github/workflows/manual-release.yml',
|
|
110
|
+
'!/examples/**',
|
|
103
111
|
],
|
|
104
112
|
npmignore: [
|
|
105
113
|
'.npmrc',
|
|
@@ -116,27 +124,8 @@ const project = new AwsCdkConstructLibrary({
|
|
|
116
124
|
],
|
|
117
125
|
});
|
|
118
126
|
|
|
119
|
-
const packageJson = project.tryFindObjectFile('package.json');
|
|
120
|
-
packageJson?.addOverride('optionalDependencies', {
|
|
121
|
-
esbuild: '^0.14.0',
|
|
122
|
-
});
|
|
123
|
-
packageJson?.addOverride('jest.testPathIgnorePatterns.1', '/examples/');
|
|
124
|
-
|
|
125
|
-
const eslintRc = project.tryFindObjectFile('.eslintrc.json');
|
|
126
|
-
eslintRc?.addOverride('ignorePatterns', [
|
|
127
|
-
'*.js',
|
|
128
|
-
'*.d.ts',
|
|
129
|
-
'node_modules/',
|
|
130
|
-
'examples/',
|
|
131
|
-
'*.generated.ts',
|
|
132
|
-
'coverage',
|
|
133
|
-
'!.projenrc.ts',
|
|
134
|
-
]);
|
|
135
|
-
|
|
136
|
-
(project.tryFindFile('.gitignore') as IgnoreFile).addPatterns(
|
|
137
|
-
'!/examples/**',
|
|
138
|
-
);
|
|
139
127
|
|
|
128
|
+
// VSCode config
|
|
140
129
|
new JsonFile(project, '.vscode/extensions.json', {
|
|
141
130
|
readonly: false,
|
|
142
131
|
marker: false,
|
|
@@ -173,6 +162,15 @@ new vscode.VsCode(project).launchConfiguration.addConfiguration({
|
|
|
173
162
|
});
|
|
174
163
|
|
|
175
164
|
|
|
165
|
+
// esbuild
|
|
166
|
+
project.tryFindObjectFile('package.json')?.addOverride('optionalDependencies', {
|
|
167
|
+
esbuild: '^0.14.0',
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
project.eslint?.addRules({
|
|
171
|
+
'@typescript-eslint/member-ordering': 'off',
|
|
172
|
+
});
|
|
173
|
+
|
|
176
174
|
new TypeScriptSourceFile(project, 'src/esbuild-types.ts', {
|
|
177
175
|
source: 'node_modules/esbuild/lib/main.d.ts',
|
|
178
176
|
editGitignore: false,
|
|
@@ -194,4 +192,6 @@ new TypeScriptSourceFile(project, 'src/esbuild-types.ts', {
|
|
|
194
192
|
},
|
|
195
193
|
});
|
|
196
194
|
|
|
195
|
+
|
|
196
|
+
// Synth project
|
|
197
197
|
project.synth();
|
package/API.md
CHANGED
|
@@ -229,6 +229,16 @@ Documentation: https://esbuild.github.io/api/#define.
|
|
|
229
229
|
|
|
230
230
|
---
|
|
231
231
|
|
|
232
|
+
##### `drop`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.BuildOptions.property.drop"></a>
|
|
233
|
+
|
|
234
|
+
```typescript
|
|
235
|
+
public readonly drop: string[];
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
- *Type:* `string`[]
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
232
242
|
##### `entryNames`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.BuildOptions.property.entryNames"></a>
|
|
233
243
|
|
|
234
244
|
```typescript
|
|
@@ -791,7 +801,7 @@ const codeConfig: CodeConfig = { ... }
|
|
|
791
801
|
public readonly s3Location: Location;
|
|
792
802
|
```
|
|
793
803
|
|
|
794
|
-
- *Type:* [
|
|
804
|
+
- *Type:* [`aws-cdk-lib.aws_s3.Location`](#aws-cdk-lib.aws_s3.Location)
|
|
795
805
|
|
|
796
806
|
The location of the code in S3.
|
|
797
807
|
|
|
@@ -1059,6 +1069,16 @@ Documentation: https://esbuild.github.io/api/#define.
|
|
|
1059
1069
|
|
|
1060
1070
|
---
|
|
1061
1071
|
|
|
1072
|
+
##### `drop`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.TransformOptions.property.drop"></a>
|
|
1073
|
+
|
|
1074
|
+
```typescript
|
|
1075
|
+
public readonly drop: string[];
|
|
1076
|
+
```
|
|
1077
|
+
|
|
1078
|
+
- *Type:* `string`[]
|
|
1079
|
+
|
|
1080
|
+
---
|
|
1081
|
+
|
|
1062
1082
|
##### `footer`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.TransformOptions.property.footer"></a>
|
|
1063
1083
|
|
|
1064
1084
|
```typescript
|
|
@@ -1563,7 +1583,7 @@ E.g. `src/index.ts`.
|
|
|
1563
1583
|
public readonly image: DockerImage;
|
|
1564
1584
|
```
|
|
1565
1585
|
|
|
1566
|
-
- *Type:* [
|
|
1586
|
+
- *Type:* [`aws-cdk-lib.DockerImage`](#aws-cdk-lib.DockerImage)
|
|
1567
1587
|
|
|
1568
1588
|
---
|
|
1569
1589
|
|
|
@@ -1573,7 +1593,7 @@ public readonly image: DockerImage;
|
|
|
1573
1593
|
public readonly local: ILocalBundling;
|
|
1574
1594
|
```
|
|
1575
1595
|
|
|
1576
|
-
- *Type:* [
|
|
1596
|
+
- *Type:* [`aws-cdk-lib.ILocalBundling`](#aws-cdk-lib.ILocalBundling)
|
|
1577
1597
|
|
|
1578
1598
|
Implementation of `ILocalBundling` interface, responsible for calling esbuild functions.
|
|
1579
1599
|
|
|
@@ -1764,7 +1784,7 @@ new JavaScriptAsset(scope: Construct, id: string, props: AssetProps)
|
|
|
1764
1784
|
|
|
1765
1785
|
##### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptAsset.parameter.scope"></a>
|
|
1766
1786
|
|
|
1767
|
-
- *Type:* [
|
|
1787
|
+
- *Type:* [`constructs.Construct`](#constructs.Construct)
|
|
1768
1788
|
|
|
1769
1789
|
---
|
|
1770
1790
|
|
|
@@ -1829,7 +1849,7 @@ public bind(scope: Construct)
|
|
|
1829
1849
|
|
|
1830
1850
|
###### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptCode.parameter.scope"></a>
|
|
1831
1851
|
|
|
1832
|
-
- *Type:* [
|
|
1852
|
+
- *Type:* [`constructs.Construct`](#constructs.Construct)
|
|
1833
1853
|
|
|
1834
1854
|
---
|
|
1835
1855
|
|
|
@@ -1841,13 +1861,13 @@ public bindToResource(resource: CfnResource, options?: ResourceBindOptions)
|
|
|
1841
1861
|
|
|
1842
1862
|
###### `resource`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptCode.parameter.resource"></a>
|
|
1843
1863
|
|
|
1844
|
-
- *Type:* [
|
|
1864
|
+
- *Type:* [`aws-cdk-lib.CfnResource`](#aws-cdk-lib.CfnResource)
|
|
1845
1865
|
|
|
1846
1866
|
---
|
|
1847
1867
|
|
|
1848
1868
|
###### `options`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptCode.parameter.options"></a>
|
|
1849
1869
|
|
|
1850
|
-
- *Type:* [
|
|
1870
|
+
- *Type:* [`aws-cdk-lib.aws_lambda.ResourceBindOptions`](#aws-cdk-lib.aws_lambda.ResourceBindOptions)
|
|
1851
1871
|
|
|
1852
1872
|
---
|
|
1853
1873
|
|
|
@@ -1871,7 +1891,7 @@ Determines whether this Code is inline code or not.
|
|
|
1871
1891
|
|
|
1872
1892
|
### JavaScriptSource <a name="@mrgrain/cdk-esbuild.JavaScriptSource"></a>
|
|
1873
1893
|
|
|
1874
|
-
- *Implements:* [
|
|
1894
|
+
- *Implements:* [`aws-cdk-lib.aws_s3_deployment.ISource`](#aws-cdk-lib.aws_s3_deployment.ISource)
|
|
1875
1895
|
|
|
1876
1896
|
#### Initializers <a name="@mrgrain/cdk-esbuild.JavaScriptSource.Initializer"></a>
|
|
1877
1897
|
|
|
@@ -1903,13 +1923,13 @@ public bind(scope: Construct, context?: DeploymentSourceContext)
|
|
|
1903
1923
|
|
|
1904
1924
|
###### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptSource.parameter.scope"></a>
|
|
1905
1925
|
|
|
1906
|
-
- *Type:* [
|
|
1926
|
+
- *Type:* [`constructs.Construct`](#constructs.Construct)
|
|
1907
1927
|
|
|
1908
1928
|
---
|
|
1909
1929
|
|
|
1910
1930
|
###### `context`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.JavaScriptSource.parameter.context"></a>
|
|
1911
1931
|
|
|
1912
|
-
- *Type:* [
|
|
1932
|
+
- *Type:* [`aws-cdk-lib.aws_s3_deployment.DeploymentSourceContext`](#aws-cdk-lib.aws_s3_deployment.DeploymentSourceContext)
|
|
1913
1933
|
|
|
1914
1934
|
---
|
|
1915
1935
|
|
|
@@ -1943,7 +1963,7 @@ new TypeScriptAsset(scope: Construct, id: string, props: AssetProps)
|
|
|
1943
1963
|
|
|
1944
1964
|
##### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptAsset.parameter.scope"></a>
|
|
1945
1965
|
|
|
1946
|
-
- *Type:* [
|
|
1966
|
+
- *Type:* [`constructs.Construct`](#constructs.Construct)
|
|
1947
1967
|
|
|
1948
1968
|
---
|
|
1949
1969
|
|
|
@@ -2008,7 +2028,7 @@ public bind(scope: Construct)
|
|
|
2008
2028
|
|
|
2009
2029
|
###### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptCode.parameter.scope"></a>
|
|
2010
2030
|
|
|
2011
|
-
- *Type:* [
|
|
2031
|
+
- *Type:* [`constructs.Construct`](#constructs.Construct)
|
|
2012
2032
|
|
|
2013
2033
|
---
|
|
2014
2034
|
|
|
@@ -2020,13 +2040,13 @@ public bindToResource(resource: CfnResource, options?: ResourceBindOptions)
|
|
|
2020
2040
|
|
|
2021
2041
|
###### `resource`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptCode.parameter.resource"></a>
|
|
2022
2042
|
|
|
2023
|
-
- *Type:* [
|
|
2043
|
+
- *Type:* [`aws-cdk-lib.CfnResource`](#aws-cdk-lib.CfnResource)
|
|
2024
2044
|
|
|
2025
2045
|
---
|
|
2026
2046
|
|
|
2027
2047
|
###### `options`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptCode.parameter.options"></a>
|
|
2028
2048
|
|
|
2029
|
-
- *Type:* [
|
|
2049
|
+
- *Type:* [`aws-cdk-lib.aws_lambda.ResourceBindOptions`](#aws-cdk-lib.aws_lambda.ResourceBindOptions)
|
|
2030
2050
|
|
|
2031
2051
|
---
|
|
2032
2052
|
|
|
@@ -2050,7 +2070,7 @@ Determines whether this Code is inline code or not.
|
|
|
2050
2070
|
|
|
2051
2071
|
### TypeScriptSource <a name="@mrgrain/cdk-esbuild.TypeScriptSource"></a>
|
|
2052
2072
|
|
|
2053
|
-
- *Implements:* [
|
|
2073
|
+
- *Implements:* [`aws-cdk-lib.aws_s3_deployment.ISource`](#aws-cdk-lib.aws_s3_deployment.ISource)
|
|
2054
2074
|
|
|
2055
2075
|
#### Initializers <a name="@mrgrain/cdk-esbuild.TypeScriptSource.Initializer"></a>
|
|
2056
2076
|
|
|
@@ -2082,13 +2102,13 @@ public bind(scope: Construct, context?: DeploymentSourceContext)
|
|
|
2082
2102
|
|
|
2083
2103
|
###### `scope`<sup>Required</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptSource.parameter.scope"></a>
|
|
2084
2104
|
|
|
2085
|
-
- *Type:* [
|
|
2105
|
+
- *Type:* [`constructs.Construct`](#constructs.Construct)
|
|
2086
2106
|
|
|
2087
2107
|
---
|
|
2088
2108
|
|
|
2089
2109
|
###### `context`<sup>Optional</sup> <a name="@mrgrain/cdk-esbuild.TypeScriptSource.parameter.context"></a>
|
|
2090
2110
|
|
|
2091
|
-
- *Type:* [
|
|
2111
|
+
- *Type:* [`aws-cdk-lib.aws_s3_deployment.DeploymentSourceContext`](#aws-cdk-lib.aws_s3_deployment.DeploymentSourceContext)
|
|
2092
2112
|
|
|
2093
2113
|
---
|
|
2094
2114
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,29 +1,13 @@
|
|
|
1
|
-
## [2.1.0](https://github.com/mrgrain/cdk-esbuild/compare/v2.0.0...v2.1.0) (2021-11-25)
|
|
2
1
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
- escape hatch to provide a custom build or transform function ([#141](https://github.com/mrgrain/cdk-esbuild/issues/141)) ([aacfac1](https://github.com/mrgrain/cdk-esbuild/commit/aacfac1b71f1de78fbfdc1161c6e8cf32fd0629e))
|
|
6
|
-
- `Inline*Code` now takes `TransformerProps` as second parameter, passing in `TransformOptions` is still supported but deprecated ([#141](https://github.com/mrgrain/cdk-esbuild/issues/141)) ([aacfac1](https://github.com/mrgrain/cdk-esbuild/commit/aacfac1b71f1de78fbfdc1161c6e8cf32fd0629e))
|
|
7
|
-
|
|
8
|
-
## [2.0.0](https://github.com/mrgrain/cdk-esbuild/compare/v1.129.0...v2.0.0) (2021-11-07)
|
|
9
|
-
|
|
10
|
-
### ⚠ BREAKING CHANGES
|
|
2
|
+
## [3.1.0](https://github.com/mrgrain/cdk-esbuild/compare/v3.0.0...v3.1.0) (2022-01-28)
|
|
11
3
|
|
|
12
|
-
- Major release of this package to make it JSII compatible (#114) ([727c78a](https://github.com/mrgrain/cdk-esbuild/commit/727c78aefa2079d0f561b8b664d75eb6c669e46b)), closes [#114](https://github.com/mrgrain/cdk-esbuild/issues/114) [#117](https://github.com/mrgrain/cdk-esbuild/issues/117) [#119](https://github.com/mrgrain/cdk-esbuild/issues/119) [#120](https://github.com/mrgrain/cdk-esbuild/issues/120) [#123](https://github.com/mrgrain/cdk-esbuild/issues/123)
|
|
13
|
-
|
|
14
|
-
- Deprecated features from v1 have been removed. Please see upgrading instructions below.
|
|
15
|
-
|
|
16
|
-
### Upgrading to v2
|
|
17
|
-
|
|
18
|
-
- Update the package dependency to v2: `npm install --save @mrgrain/cdk-esbuild@^2.0.0`
|
|
19
|
-
- `esbuild` is now installed as an optional dependency. If your setup does not automatically install optional dependencies, add it as an explicit dependency.
|
|
20
|
-
- Remove any use of `bundlerPriority`.
|
|
21
|
-
- 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.
|
|
22
4
|
|
|
23
5
|
### Features
|
|
24
6
|
|
|
25
|
-
|
|
7
|
+
* support new build option `drop` from esbuild ([54445ad](https://github.com/mrgrain/cdk-esbuild/commit/54445ad2490e7cba81e54a555a91ba86553ec67f))
|
|
8
|
+
|
|
26
9
|
|
|
27
|
-
|
|
10
|
+
### Bug Fixes
|
|
28
11
|
|
|
29
|
-
|
|
12
|
+
* replace mocked with version from jest-mock ([2e9761d](https://github.com/mrgrain/cdk-esbuild/commit/2e9761d5f53293a6a840897e218c2e79a6b71c66))
|
|
13
|
+
* replace removed Node.js type ([e58b268](https://github.com/mrgrain/cdk-esbuild/commit/e58b2685c519cb9c4d7e1a148c4fc9f388d3ff90))
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
_CDK constructs for [esbuild](https://github.com/evanw/esbuild), an extremely fast JavaScript bundler_
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> ⚠️ This version is compatible with AWS CDK v2. For the previous, AWS CDK v1 compatible release, see [cdk-esbuild@v2](https://github.com/mrgrain/cdk-esbuild/tree/v2)
|
|
6
|
+
|
|
7
|
+
[Getting started](#getting-started) | [Migrating to v3](#migrating-to-v3) |
|
|
6
8
|
[Documentation](#documentation) | [API Reference](#api-reference) | [Versioning](#versioning)
|
|
7
9
|
|
|
8
10
|
## Why?
|
|
@@ -25,23 +27,23 @@ Notably upgrades of the _esbuild_ minimum version requirement will be introduced
|
|
|
25
27
|
Install `cdk-esbuild`:
|
|
26
28
|
|
|
27
29
|
```
|
|
28
|
-
npm install @mrgrain/cdk-esbuild
|
|
30
|
+
npm install @mrgrain/cdk-esbuild@^3.0.0
|
|
29
31
|
```
|
|
30
32
|
|
|
31
33
|
If _peer_ and _optional dependencies_ are not installed automatically (e.g. when using npm v4-6), please use this command to install all of them:
|
|
32
34
|
|
|
33
35
|
```
|
|
34
|
-
npm install @mrgrain/cdk-esbuild esbuild
|
|
36
|
+
npm install @mrgrain/cdk-esbuild@^3.0.0 esbuild
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
### AWS Lambda: Serverless function
|
|
38
40
|
|
|
39
41
|
> 💡 See [Lambda Function](examples/lambda) for a complete working example of a how to deploy a lambda function.
|
|
40
42
|
|
|
41
|
-
Use `TypeScriptCode` as the `code` of a [lambda function](https://docs.aws.amazon.com/cdk/api/
|
|
43
|
+
Use `TypeScriptCode` as the `code` of a [lambda function](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html#code):
|
|
42
44
|
|
|
43
45
|
```ts
|
|
44
|
-
import * as lambda from "
|
|
46
|
+
import * as lambda from "aws-cdk-lib/aws-lambda";
|
|
45
47
|
import { TypeScriptCode } from "@mrgrain/cdk-esbuild";
|
|
46
48
|
|
|
47
49
|
const bundledCode = new TypeScriptCode("src/index.ts");
|
|
@@ -60,8 +62,8 @@ const fn = new lambda.Function(stack, "MyFunction", {
|
|
|
60
62
|
Use `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):
|
|
61
63
|
|
|
62
64
|
```ts
|
|
63
|
-
import * as s3 from "
|
|
64
|
-
import * as s3deploy from "
|
|
65
|
+
import * as s3 from "aws-cdk-lib/aws-s3";
|
|
66
|
+
import * as s3deploy from "aws-cdk-lib/aws-s3-deployment";
|
|
65
67
|
import { TypeScriptSource } from "@mrgrain/cdk-esbuild";
|
|
66
68
|
|
|
67
69
|
const websiteBundle = new TypeScriptSource("src/index.tsx");
|
|
@@ -85,8 +87,14 @@ new s3deploy.BucketDeployment(stack, "DeployWebsite", {
|
|
|
85
87
|
|
|
86
88
|
Synthetics runs a canary to produce traffic to an application for monitoring purposes. Use `TypeScriptCode` as the `code` of a Canary test:
|
|
87
89
|
|
|
90
|
+
> ℹ️ This feature depends on the `@aws-cdk/aws-synthetics-alpha` package which is a developer preview. You may need to update your source code when upgrading to a newer version of this package.
|
|
91
|
+
>
|
|
92
|
+
> ```
|
|
93
|
+
> npm i @aws-cdk/aws-synthetics-alpha
|
|
94
|
+
> ```
|
|
95
|
+
|
|
88
96
|
```ts
|
|
89
|
-
import * as synthetics from "@aws-cdk/aws-synthetics";
|
|
97
|
+
import * as synthetics from "@aws-cdk/aws-synthetics-alpha";
|
|
90
98
|
import { TypeScriptCode } from "@mrgrain/cdk-esbuild";
|
|
91
99
|
|
|
92
100
|
const bundledCode = new TypeScriptCode("src/index.ts", {
|
|
@@ -108,7 +116,7 @@ const canary = new synthetics.Canary(stack, "MyCanary", {
|
|
|
108
116
|
|
|
109
117
|
The 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.
|
|
110
118
|
|
|
111
|
-
For use in **Lambda Functions** and **Synthetic Canaries**, the following classes implement `lambda.Code` ([reference](https://docs.aws.amazon.com/cdk/api/
|
|
119
|
+
For use in **Lambda Functions** and **Synthetic Canaries**, the following classes implement `lambda.Code` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Code.html)) and `synthetics.Code` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-synthetics-alpha.Code.html)):
|
|
112
120
|
|
|
113
121
|
- `TypeScriptCode` & `JavaScriptCode`
|
|
114
122
|
|
|
@@ -119,16 +127,16 @@ Inline code is only supported by **Lambda**:
|
|
|
119
127
|
|
|
120
128
|
For use with **S3 bucket deployments**, classes implementing `s3deploy.ISource` ([reference](https://docs.aws.amazon.com/cdk/api/latest/docs/aws-s3-deployment-readme.html)):
|
|
121
129
|
|
|
122
|
-
-
|
|
130
|
+
- `TypeScriptSource` & `JavaScriptSource`
|
|
123
131
|
|
|
124
132
|
> _Code and Source constructs seamlessly plugin to high-level CDK features. They share the same set of parameters, props and build options._
|
|
125
133
|
|
|
126
134
|
Underlying classes power the other features. You normally won't have to use them, but they are there if you need them:
|
|
127
135
|
|
|
128
|
-
- `TypeScriptAsset` & `JavaScriptAsset` implements `s3.Asset` ([reference](https://docs.aws.amazon.com/cdk/api/
|
|
136
|
+
- `TypeScriptAsset` & `JavaScriptAsset` implements `s3.Asset` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_assets.Asset.html)) \
|
|
129
137
|
creates an asset uploaded to S3 which can be referenced by other constructs
|
|
130
138
|
|
|
131
|
-
- `EsbuildBundler` implements `core.BundlingOptions` ([reference](https://docs.aws.amazon.com/cdk/api/
|
|
139
|
+
- `EsbuildBundler` implements `core.BundlingOptions` ([reference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.BundlingOptions.html)) \
|
|
132
140
|
provides an interface for a _esbuild_ bundler wherever needed
|
|
133
141
|
|
|
134
142
|
## [API Reference](API.md)
|
|
@@ -187,28 +195,30 @@ Instead of esbuild, the provided function will be invoked with the calculated tr
|
|
|
187
195
|
|
|
188
196
|
Failures have to cause a `TransformFailure` exception in order to be fully handled.
|
|
189
197
|
|
|
190
|
-
## Migrating to
|
|
191
|
-
|
|
192
|
-
The main changes in cdk-esbuild v2 are:
|
|
198
|
+
## Migrating to v3
|
|
193
199
|
|
|
194
|
-
-
|
|
195
|
-
- 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.
|
|
196
|
-
- `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.
|
|
197
|
-
- 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.
|
|
200
|
+
The release of cdk-esbuild v3 brings compatibility with AWS CDK v2. Furthermore all deprecated properties and classes have been removed. In particular `InlineCode` classes now take `TransformerProps` as second parameter instead of transform options.
|
|
198
201
|
|
|
199
202
|
### Upgrading
|
|
200
203
|
|
|
201
|
-
-
|
|
202
|
-
-
|
|
203
|
-
-
|
|
204
|
-
-
|
|
204
|
+
- This version requires AWS CDK v2. Follow the [official migration guide](https://docs.aws.amazon.com/cdk/latest/guide/work-with-cdk-v2.html) to upgrade.
|
|
205
|
+
- Update the package dependency to v3: `npm install --save @mrgrain/cdk-esbuild@^3.0.0`
|
|
206
|
+
- `esbuild` is installed as an optional dependency. If your setup does not automatically install optional dependencies, make sure to add it as an explicit dependency.
|
|
207
|
+
- Any use of `InlineCode` variations has to be updated. Previously the second parameter was either of type `TransformerProps` or `TransformOptions`. Now it must be `TransformerProps`.\
|
|
208
|
+
If the passed value is of type `TransformOptions`, turn it into the correct type like this:
|
|
209
|
+
|
|
210
|
+
```ts
|
|
211
|
+
const oldOptions: TransformOptions = {...}
|
|
212
|
+
|
|
213
|
+
new InlineTypeScriptCode('// inline code', {
|
|
214
|
+
transformOptions: oldOptions
|
|
215
|
+
});
|
|
216
|
+
```
|
|
205
217
|
|
|
206
218
|
## Versioning
|
|
207
219
|
|
|
208
220
|
This 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`.
|
|
209
221
|
|
|
210
|
-
Although great care is taken to avoid this, all features marked with `@stability experimental` may change with minor versions. The flag is only applied to new and experimental features and internal classes.
|
|
211
|
-
|
|
212
222
|
### Npm Tags
|
|
213
223
|
|
|
214
224
|
Some users prefer to use tags over version ranges. The following stable tags are available for use:
|
|
@@ -225,10 +235,6 @@ These tags also exist, but usage is strongly not recommended:
|
|
|
225
235
|
|
|
226
236
|
## Future releases
|
|
227
237
|
|
|
228
|
-
### AWS CDK v2
|
|
229
|
-
|
|
230
|
-
The 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.
|
|
231
|
-
|
|
232
238
|
### Stable esbuild
|
|
233
239
|
|
|
234
240
|
Once `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.
|
package/SECURITY.md
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
Only the latest release of each major version is supported.
|
|
6
6
|
|
|
7
|
-
| Plugin Version | CDK Version | Supported
|
|
8
|
-
| -------------- | ----------- |
|
|
9
|
-
| v1 | ^1.99.0 |
|
|
10
|
-
| v2 | ^1.99.0 |
|
|
7
|
+
| Plugin Version | CDK Version | Supported |
|
|
8
|
+
| -------------- | ----------- | ---------------------------------------------------------- |
|
|
9
|
+
| v1 | ^1.99.0 | :x: |
|
|
10
|
+
| v2 | ^1.99.0 | Security updates and critical bug fixes until June 1, 2023 |
|
|
11
|
+
| v3 | ^2.00.0 | :white_check_mark: |
|
|
11
12
|
|
|
12
13
|
## Reporting a Vulnerability
|
|
13
14
|
|
|
@@ -15,4 +16,4 @@ Please raise an [issue](https://github.com/mrgrain/cdk-esbuild/issues) and add t
|
|
|
15
16
|
|
|
16
17
|
I strive to respond to security issues within 48h. However this is an open source project with a single maintainer and life can get in the way.
|
|
17
18
|
|
|
18
|
-
Contributions of
|
|
19
|
+
Contributions of security fixes are most welcome!
|
package/lib/asset.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Asset as S3Asset } from '
|
|
2
|
-
import { Construct } from '
|
|
1
|
+
import { Asset as S3Asset } from 'aws-cdk-lib/aws-s3-assets';
|
|
2
|
+
import { Construct } from 'constructs';
|
|
3
3
|
import { BundlerProps, EntryPoints } from './bundler';
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
package/lib/asset.js
CHANGED
|
@@ -4,8 +4,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.TypeScriptAsset = exports.JavaScriptAsset = void 0;
|
|
5
5
|
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
6
6
|
const path_1 = require("path");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
8
|
+
const aws_s3_assets_1 = require("aws-cdk-lib/aws-s3-assets");
|
|
9
|
+
const constructs_1 = require("constructs");
|
|
9
10
|
const bundler_1 = require("./bundler");
|
|
10
11
|
/**
|
|
11
12
|
* @stability stable
|
|
@@ -18,7 +19,7 @@ class Asset extends aws_s3_assets_1.Asset {
|
|
|
18
19
|
var _c;
|
|
19
20
|
const { assetHash, copyDir, buildOptions: options = {}, buildFn, } = props;
|
|
20
21
|
const entryPoints = typeof props.entryPoints === 'string' ? [props.entryPoints] : props.entryPoints;
|
|
21
|
-
const name = scope.node.path +
|
|
22
|
+
const name = scope.node.path + constructs_1.Node.PATH_SEP + id;
|
|
22
23
|
Object.values(entryPoints).forEach((entryPoint) => {
|
|
23
24
|
if (path_1.isAbsolute(entryPoint)) {
|
|
24
25
|
throw new Error(`${name}: Entry points must be a relative path. If you need to define an absolute path, please use \`buildOptions.absWorkingDir\` accordingly.`);
|
|
@@ -33,7 +34,7 @@ class Asset extends aws_s3_assets_1.Asset {
|
|
|
33
34
|
super(scope, id, {
|
|
34
35
|
path: absWorkingDir,
|
|
35
36
|
assetHash,
|
|
36
|
-
assetHashType: assetHash ?
|
|
37
|
+
assetHashType: assetHash ? aws_cdk_lib_1.AssetHashType.CUSTOM : aws_cdk_lib_1.AssetHashType.OUTPUT,
|
|
37
38
|
bundling: new bundler_1.EsbuildBundler(entryPoints, {
|
|
38
39
|
buildOptions,
|
|
39
40
|
copyDir,
|
|
@@ -53,7 +54,7 @@ class JavaScriptAsset extends Asset {
|
|
|
53
54
|
}
|
|
54
55
|
exports.JavaScriptAsset = JavaScriptAsset;
|
|
55
56
|
_a = JSII_RTTI_SYMBOL_1;
|
|
56
|
-
JavaScriptAsset[_a] = { fqn: "@mrgrain/cdk-esbuild.JavaScriptAsset", version: "
|
|
57
|
+
JavaScriptAsset[_a] = { fqn: "@mrgrain/cdk-esbuild.JavaScriptAsset", version: "3.1.0" };
|
|
57
58
|
/**
|
|
58
59
|
* Bundles the entry points and creates a CDK asset which is uploaded to the bootstrapped CDK S3 bucket during deployment.
|
|
59
60
|
*
|
|
@@ -65,5 +66,5 @@ class TypeScriptAsset extends Asset {
|
|
|
65
66
|
}
|
|
66
67
|
exports.TypeScriptAsset = TypeScriptAsset;
|
|
67
68
|
_b = JSII_RTTI_SYMBOL_1;
|
|
68
|
-
TypeScriptAsset[_b] = { fqn: "@mrgrain/cdk-esbuild.TypeScriptAsset", version: "
|
|
69
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
69
|
+
TypeScriptAsset[_b] = { fqn: "@mrgrain/cdk-esbuild.TypeScriptAsset", version: "3.1.0" };
|
|
70
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYXNzZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSwrQkFBa0M7QU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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gIHJlYWRvbmx5IGFzc2V0SGFzaD86IHN0cmluZztcbn1cblxuZXhwb3J0IGludGVyZmFjZSBBc3NldFByb3BzIGV4dGVuZHMgQXNzZXRCYXNlUHJvcHMge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gIHJlYWRvbmx5IGVudHJ5UG9pbnRzOiBFbnRyeVBvaW50cztcbn1cblxudHlwZSBKYXZhU2NyaXB0QXNzZXRQcm9wcyA9IEFzc2V0UHJvcHM7XG50eXBlIFR5cGVTY3JpcHRBc3NldFByb3BzID0gQXNzZXRQcm9wcztcblxuLyoqXG4gKiBAc3RhYmlsaXR5IHN0YWJsZVxuICovXG5hYnN0cmFjdCBjbGFzcyBBc3NldDxQcm9wcyBleHRlbmRzIEFzc2V0UHJvcHM+IGV4dGVuZHMgUzNBc3NldCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gIHB1YmxpYyBjb25zdHJ1Y3RvcihcbiAgICBzY29wZTogQ29uc3RydWN0LFxuICAgIGlkOiBzdHJpbmcsXG4gICAgcHJvcHM6IFByb3BzLFxuICApIHtcbiAgICBjb25zdCB7XG4gICAgICBhc3NldEhhc2gsXG4gICAgICBjb3B5RGlyLFxuICAgICAgYnVpbGRPcHRp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hc3NldEhhc2hUeXBlOiBhc3NldEhhc2ggPyBBc3NldEhhc2hUeXBlLkNVU1RPTSA6IEFzc2V0SGFzaFR5cGUuT1VUUFVULFxuICAgICAgYnVuZGxpbmc6IG5ldyBFc2J1aWxkQnVuZGxlcihcbiAgICAgICAgZW50cnlQb2ludHMsXG4gICAgICAgIHtcbiAgICAgICAgICBidWlsZE9wdGlvbnMsXG4gICAgICAgICAgY29weURpcixcbiAgICAgICAgICBidWlsZEZuLFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICB9KTtcbiAgfVxufVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuZXhwb3J0IGNsYXNzIEphdmFTY3JpcHRBc3NldCBleHRlbmRzIEFzc2V0PEphdmFTY3JpcHRBc3NldFByb3BzPiB7fVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuZXhwb3J0IGNsYXNzIFR5cGVTY3JpcHRBc3NldCBleHRlbmRzIEFzc2V0PFR5cGVTY3JpcHRBc3NldFByb3BzPiB7fVxuIl19
|
package/lib/bundler.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DockerImage, ILocalBundling } from '
|
|
1
|
+
import { DockerImage, ILocalBundling } from 'aws-cdk-lib';
|
|
2
2
|
import { BuildOptions } from './esbuild-types';
|
|
3
3
|
/**
|
|
4
4
|
* A relative path or list or map of relative paths to the entry points of your code from the root of the project. E.g. `src/index.ts`.
|