carlin 0.19.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/CHANGELOG.md +378 -0
- package/bin/carlin +2 -0
- package/dist/cli.js +250 -0
- package/dist/config.js +10 -0
- package/dist/deploy/addDefaults.cloudFormation.js +138 -0
- package/dist/deploy/baseStack/command.js +9 -0
- package/dist/deploy/baseStack/config.js +30 -0
- package/dist/deploy/baseStack/deployBaseStack.js +61 -0
- package/dist/deploy/baseStack/getBaseStackResource.js +26 -0
- package/dist/deploy/baseStack/getBucket.template.js +44 -0
- package/dist/deploy/baseStack/getLambdaImageBuilder.template.js +188 -0
- package/dist/deploy/baseStack/getLambdaLayerBuilder.template.js +140 -0
- package/dist/deploy/baseStack/getVpc.template.js +169 -0
- package/dist/deploy/cicd/cicd.template.js +872 -0
- package/dist/deploy/cicd/command.js +84 -0
- package/dist/deploy/cicd/config.js +7 -0
- package/dist/deploy/cicd/deployCicd.js +114 -0
- package/dist/deploy/cicd/ecsTaskReportCommand.js +53 -0
- package/dist/deploy/cicd/getCicdStackName.js +11 -0
- package/dist/deploy/cicd/getTriggerPipelineObjectKey.js +12 -0
- package/dist/deploy/cicd/lambdas/cicdApiV1.handler.js +124 -0
- package/dist/deploy/cicd/lambdas/ecsTaskReport.handler.js +79 -0
- package/dist/deploy/cicd/lambdas/executeTasks.js +91 -0
- package/dist/deploy/cicd/lambdas/getProcessEnvVariable.js +10 -0
- package/dist/deploy/cicd/lambdas/githubWebhooksApiV1.handler.js +143 -0
- package/dist/deploy/cicd/lambdas/index.js +11 -0
- package/dist/deploy/cicd/lambdas/pipelines.handler.js +154 -0
- package/dist/deploy/cicd/lambdas/putApprovalResultManualTask.js +52 -0
- package/dist/deploy/cicd/pipelines.js +52 -0
- package/dist/deploy/cloudFormation.core.js +286 -0
- package/dist/deploy/cloudFormation.js +201 -0
- package/dist/deploy/command.js +211 -0
- package/dist/deploy/lambda.js +177 -0
- package/dist/deploy/lambdaLayer/command.js +51 -0
- package/dist/deploy/lambdaLayer/deployLambdaLayer.js +142 -0
- package/dist/deploy/s3.js +167 -0
- package/dist/deploy/stackName.js +78 -0
- package/dist/deploy/staticApp/command.js +101 -0
- package/dist/deploy/staticApp/getOriginShieldRegion.js +30 -0
- package/dist/deploy/staticApp/staticApp.js +206 -0
- package/dist/deploy/staticApp/staticApp.template.js +874 -0
- package/dist/deploy/utils.js +31 -0
- package/dist/index.js +7 -0
- package/dist/utils/addGroupToOptions.js +11 -0
- package/dist/utils/buildLambdaFiles.js +99 -0
- package/dist/utils/cloudFormationTemplate.js +134 -0
- package/dist/utils/codeBuild.js +52 -0
- package/dist/utils/environmentVariables.js +11 -0
- package/dist/utils/exec.js +24 -0
- package/dist/utils/formatCode.js +30 -0
- package/dist/utils/getAwsAccountId.js +10 -0
- package/dist/utils/getCurrentBranch.js +35 -0
- package/dist/utils/getEnvironment.js +6 -0
- package/dist/utils/getIamPath.js +6 -0
- package/dist/utils/getProjectName.js +28 -0
- package/dist/utils/index.js +26 -0
- package/dist/utils/packageJson.js +46 -0
- package/dist/utils/readCloudFormationTemplate.js +35 -0
- package/dist/utils/readObjectFile.js +50 -0
- package/package.json +83 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
# [0.19.0](https://github.com/ttoss/carlin/compare/v0.18.0...v0.19.0) (2021-09-16)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- repository update ([303344d](https://github.com/ttoss/carlin/commit/303344d0c2aba2291c624d8c3fd1e7ca07fbf3b6))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- change slack message ([d27285c](https://github.com/ttoss/carlin/commit/d27285c939b33f6f1cd5e99142c39d34a93fd278))
|
|
15
|
+
- slack first integration ([e00b061](https://github.com/ttoss/carlin/commit/e00b061b52d70c9249bf53bd8d6bdf023410a41d))
|
|
16
|
+
- update commands pattern ([88b0444](https://github.com/ttoss/carlin/commit/88b0444d6455a1ad1e1b1749320070087edac1dc))
|
|
17
|
+
- update slack message ([dcc4f8a](https://github.com/ttoss/carlin/commit/dcc4f8af35820dea8b9e5eb38176d7f67079a6e1))
|
|
18
|
+
- update slack message ([905c07e](https://github.com/ttoss/carlin/commit/905c07e58d18035bb81ce78e3c7d91e61a3351bd))
|
|
19
|
+
|
|
20
|
+
# [0.18.0](https://github.com/ttoss/carlin/compare/v0.17.4...v0.18.0) (2021-08-13)
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
- add csp false ([#29](https://github.com/ttoss/carlin/issues/29)) ([5635347](https://github.com/ttoss/carlin/commit/563534753e27f3fe98c6c3fa1f55bda9def88ff4))
|
|
25
|
+
|
|
26
|
+
## [0.17.4](https://github.com/ttoss/carlin/compare/v0.17.3...v0.17.4) (2021-06-15)
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
- tests with CARLIN_ENVIRONMENT ([a7979ef](https://github.com/ttoss/carlin/commit/a7979ef17256042adf7fab373f8968ef87ff1c3e))
|
|
31
|
+
|
|
32
|
+
## [0.17.3](https://github.com/ttoss/carlin/compare/v0.17.2...v0.17.3) (2021-06-15)
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
- aws reregion ([647770c](https://github.com/ttoss/carlin/commit/647770c271e9d707c98c182c48d3f5fcc2302d78))
|
|
37
|
+
|
|
38
|
+
## [0.17.2](https://github.com/ttoss/carlin/compare/v0.17.1...v0.17.2) (2021-06-15)
|
|
39
|
+
|
|
40
|
+
### Bug Fixes
|
|
41
|
+
|
|
42
|
+
- update dockerfile commands ([547ff16](https://github.com/ttoss/carlin/commit/547ff1626d5d070f23b326629e07cd74f145d323))
|
|
43
|
+
|
|
44
|
+
## [0.17.1](https://github.com/ttoss/carlin/compare/v0.17.0...v0.17.1) (2021-06-14)
|
|
45
|
+
|
|
46
|
+
**Note:** Version bump only for package carlin
|
|
47
|
+
|
|
48
|
+
# [0.17.0](https://github.com/ttoss/carlin/compare/v0.16.2...v0.17.0) (2021-06-14)
|
|
49
|
+
|
|
50
|
+
### Bug Fixes
|
|
51
|
+
|
|
52
|
+
- update jest ([4fd8b40](https://github.com/ttoss/carlin/commit/4fd8b4099193e07c4da4ba859cd5e28e90b3e568))
|
|
53
|
+
|
|
54
|
+
### Features
|
|
55
|
+
|
|
56
|
+
- add skip flag ([215dba1](https://github.com/ttoss/carlin/commit/215dba1f9990fad0484b41ca12ad679b661ceb3c))
|
|
57
|
+
|
|
58
|
+
## [0.16.2](https://github.com/ttoss/carlin/compare/v0.16.1...v0.16.2) (2021-05-22)
|
|
59
|
+
|
|
60
|
+
**Note:** Version bump only for package carlin
|
|
61
|
+
|
|
62
|
+
## [0.16.1](https://github.com/ttoss/carlin/compare/v0.16.0...v0.16.1) (2021-05-20)
|
|
63
|
+
|
|
64
|
+
### Bug Fixes
|
|
65
|
+
|
|
66
|
+
- ecs logs url ([afd2eaa](https://github.com/ttoss/carlin/commit/afd2eaa91b6d3bbc556514b38f7cabf42ffaec4a))
|
|
67
|
+
|
|
68
|
+
# [0.16.0](https://github.com/ttoss/carlin/compare/v0.15.6...v0.16.0) (2021-05-20)
|
|
69
|
+
|
|
70
|
+
### Features
|
|
71
|
+
|
|
72
|
+
- ecs task report working ([e268483](https://github.com/ttoss/carlin/commit/e26848367ca307fe84fbc1b9e69f3116c5ea45c7))
|
|
73
|
+
- upgrade cicd ([a070754](https://github.com/ttoss/carlin/commit/a070754bc8d89d43addf42e92fe72169a71ff274))
|
|
74
|
+
|
|
75
|
+
## [0.15.6](https://github.com/ttoss/carlin/compare/v0.15.5...v0.15.6) (2021-05-19)
|
|
76
|
+
|
|
77
|
+
### Bug Fixes
|
|
78
|
+
|
|
79
|
+
- build website ([60787d7](https://github.com/ttoss/carlin/commit/60787d7fd0c59a5c0bda56be5e32485c9376d246))
|
|
80
|
+
|
|
81
|
+
## [0.15.5](https://github.com/ttoss/carlin/compare/v0.15.4...v0.15.5) (2021-05-19)
|
|
82
|
+
|
|
83
|
+
### Bug Fixes
|
|
84
|
+
|
|
85
|
+
- add deep merge to environments config ([102dc7f](https://github.com/ttoss/carlin/commit/102dc7f64369335e4f407bd5666a2eaf81b23500))
|
|
86
|
+
|
|
87
|
+
### Features
|
|
88
|
+
|
|
89
|
+
- add tags to ecs containers ([9288397](https://github.com/ttoss/carlin/commit/92883978079f3fe7423d673580df465c08a6b068))
|
|
90
|
+
- improve cicd feedback ([809f488](https://github.com/ttoss/carlin/commit/809f488593e9d5ad115d6ca0697a415649ff41a8))
|
|
91
|
+
|
|
92
|
+
## [0.15.4](https://github.com/ttoss/carlin/compare/v0.15.3...v0.15.4) (2021-05-14)
|
|
93
|
+
|
|
94
|
+
### Bug Fixes
|
|
95
|
+
|
|
96
|
+
- pipelines commands. Update CICD docs ([a22ab66](https://github.com/ttoss/carlin/commit/a22ab6623fde12c910428ebf09df8b0ced2d2f56))
|
|
97
|
+
|
|
98
|
+
## [0.15.3](https://github.com/ttoss/carlin/compare/v0.15.2...v0.15.3) (2021-05-13)
|
|
99
|
+
|
|
100
|
+
### Bug Fixes
|
|
101
|
+
|
|
102
|
+
- npmrc ([f92367a](https://github.com/ttoss/carlin/commit/f92367a630a872b276f22d0acb87792e222f0024))
|
|
103
|
+
|
|
104
|
+
## [0.15.2](https://github.com/ttoss/carlin/compare/v0.15.1...v0.15.2) (2021-05-13)
|
|
105
|
+
|
|
106
|
+
### Bug Fixes
|
|
107
|
+
|
|
108
|
+
- website carlin.ts cicd config ([de1113e](https://github.com/ttoss/carlin/commit/de1113ea0337433ec7e9b072805d9dc7235f294e))
|
|
109
|
+
|
|
110
|
+
## [0.15.1](https://github.com/ttoss/carlin/compare/v0.15.0...v0.15.1) (2021-05-13)
|
|
111
|
+
|
|
112
|
+
### Features
|
|
113
|
+
|
|
114
|
+
- add task environment ([4711e0c](https://github.com/ttoss/carlin/commit/4711e0c55e60b4d095d96667bab85c7a110d19c6))
|
|
115
|
+
|
|
116
|
+
# [0.15.0](https://github.com/ttoss/carlin/compare/v0.14.2...v0.15.0) (2021-05-13)
|
|
117
|
+
|
|
118
|
+
### Features
|
|
119
|
+
|
|
120
|
+
- finished tag pipeline ([a096529](https://github.com/ttoss/carlin/commit/a0965298ffb3617d27caa5b7fcba1d66fe9f99a2))
|
|
121
|
+
|
|
122
|
+
## [0.14.2](https://github.com/ttoss/carlin/compare/v0.14.0...v0.14.2) (2021-05-12)
|
|
123
|
+
|
|
124
|
+
### Bug Fixes
|
|
125
|
+
|
|
126
|
+
- cicd commands ([6b33a38](https://github.com/ttoss/carlin/commit/6b33a38cbb60b2e45fba831f9c0cd1d4664fc945))
|
|
127
|
+
- tests ([38e7ee4](https://github.com/ttoss/carlin/commit/38e7ee44fd6b333773eb2c6fb5a436fa5a04c8c0))
|
|
128
|
+
|
|
129
|
+
### Features
|
|
130
|
+
|
|
131
|
+
- cicd ([#27](https://github.com/ttoss/carlin/issues/27)) ([acc4039](https://github.com/ttoss/carlin/commit/acc40396f8267126fd860893f800fa63a8c882cc))
|
|
132
|
+
- creating tag pipeline ([6908e72](https://github.com/ttoss/carlin/commit/6908e725e088185e86ed86e19ce2a47745272206))
|
|
133
|
+
- ignore draft pr ([7f08e38](https://github.com/ttoss/carlin/commit/7f08e388f1c4305c8ec6aa90cdbf39b7d13a930e))
|
|
134
|
+
- improve tests ([961b0f7](https://github.com/ttoss/carlin/commit/961b0f7cd9af6e14d816c22b60de0f7676992ced))
|
|
135
|
+
- update packages ([74fa500](https://github.com/ttoss/carlin/commit/74fa50082f61596e5cae62c89c5678fe789e09c3))
|
|
136
|
+
- update staging commands ([7a6b553](https://github.com/ttoss/carlin/commit/7a6b553590f958b8e17957cdddfcccef3cd4f321))
|
|
137
|
+
|
|
138
|
+
## [0.14.1](https://github.com/ttoss/carlin/compare/v0.14.0...v0.14.1) (2021-05-12)
|
|
139
|
+
|
|
140
|
+
### Bug Fixes
|
|
141
|
+
|
|
142
|
+
- cicd commands ([6b33a38](https://github.com/ttoss/carlin/commit/6b33a38cbb60b2e45fba831f9c0cd1d4664fc945))
|
|
143
|
+
- tests ([38e7ee4](https://github.com/ttoss/carlin/commit/38e7ee44fd6b333773eb2c6fb5a436fa5a04c8c0))
|
|
144
|
+
|
|
145
|
+
### Features
|
|
146
|
+
|
|
147
|
+
- cicd ([#27](https://github.com/ttoss/carlin/issues/27)) ([acc4039](https://github.com/ttoss/carlin/commit/acc40396f8267126fd860893f800fa63a8c882cc))
|
|
148
|
+
- creating tag pipeline ([6908e72](https://github.com/ttoss/carlin/commit/6908e725e088185e86ed86e19ce2a47745272206))
|
|
149
|
+
- ignore draft pr ([7f08e38](https://github.com/ttoss/carlin/commit/7f08e388f1c4305c8ec6aa90cdbf39b7d13a930e))
|
|
150
|
+
- improve tests ([961b0f7](https://github.com/ttoss/carlin/commit/961b0f7cd9af6e14d816c22b60de0f7676992ced))
|
|
151
|
+
- update staging commands ([7a6b553](https://github.com/ttoss/carlin/commit/7a6b553590f958b8e17957cdddfcccef3cd4f321))
|
|
152
|
+
|
|
153
|
+
# [0.14.0](https://github.com/ttoss/carlin/compare/v0.13.4...v0.14.0) (2021-04-08)
|
|
154
|
+
|
|
155
|
+
### Features
|
|
156
|
+
|
|
157
|
+
- deploy lambda image first implementation ([27702e1](https://github.com/ttoss/carlin/commit/27702e1253b83d6d794713bd4603b73304cd121d))
|
|
158
|
+
- first implementation of lambda image done, but not finished yet ([81562ea](https://github.com/ttoss/carlin/commit/81562ea795f217de4d4221a843e308755b9c7c96))
|
|
159
|
+
|
|
160
|
+
## [0.13.4](https://github.com/ttoss/carlin/compare/v0.13.3...v0.13.4) (2021-03-22)
|
|
161
|
+
|
|
162
|
+
### Bug Fixes
|
|
163
|
+
|
|
164
|
+
- remove noEnv and add typescript to dependencies ([aacde98](https://github.com/ttoss/carlin/commit/aacde989037a82dff7b951cfc9e71fbb4ae890b1))
|
|
165
|
+
|
|
166
|
+
## [0.13.3](https://github.com/ttoss/carlin/compare/v0.13.2...v0.13.3) (2021-03-07)
|
|
167
|
+
|
|
168
|
+
### Bug Fixes
|
|
169
|
+
|
|
170
|
+
- deploy static-app lambdaedge function limit ([db03725](https://github.com/ttoss/carlin/commit/db03725705858fbc6edbfad3106b752b1f4a55c8))
|
|
171
|
+
|
|
172
|
+
## [0.13.2](https://github.com/ttoss/carlin/compare/v0.13.1...v0.13.2) (2021-03-04)
|
|
173
|
+
|
|
174
|
+
### Bug Fixes
|
|
175
|
+
|
|
176
|
+
- s3 windows upload ([86f785f](https://github.com/ttoss/carlin/commit/86f785f4a609689e7683678ff815971351ec51aa))
|
|
177
|
+
|
|
178
|
+
## [0.13.1](https://github.com/ttoss/carlin/compare/v0.13.0...v0.13.1) (2021-03-01)
|
|
179
|
+
|
|
180
|
+
### Bug Fixes
|
|
181
|
+
|
|
182
|
+
- fixes [#26](https://github.com/ttoss/carlin/issues/26) ([c04ec9d](https://github.com/ttoss/carlin/commit/c04ec9da731ed22aa9ad63c7601c0141d5e98237))
|
|
183
|
+
|
|
184
|
+
# [0.13.0](https://github.com/ttoss/carlin/compare/v0.12.6...v0.13.0) (2021-03-01)
|
|
185
|
+
|
|
186
|
+
### Features
|
|
187
|
+
|
|
188
|
+
- add lambda layer ([#25](https://github.com/ttoss/carlin/issues/25)) ([d5f68ea](https://github.com/ttoss/carlin/commit/d5f68eaec44b9f7b4f7ae4a2d854c1d27b31588e))
|
|
189
|
+
|
|
190
|
+
## [0.12.6](https://github.com/ttoss/carlin/compare/v0.12.5...v0.12.6) (2021-02-26)
|
|
191
|
+
|
|
192
|
+
### Features
|
|
193
|
+
|
|
194
|
+
- add headers to lambda@edge request origin only ([477a278](https://github.com/ttoss/carlin/commit/477a278a706134e3d6fe502c9674001570e0a348))
|
|
195
|
+
|
|
196
|
+
## [0.12.5](https://github.com/ttoss/carlin/compare/v0.12.4...v0.12.5) (2021-02-25)
|
|
197
|
+
|
|
198
|
+
### Bug Fixes
|
|
199
|
+
|
|
200
|
+
- add prettier ([e4d13f5](https://github.com/ttoss/carlin/commit/e4d13f508d3703fffa4cc42dab30bda3c6a8dae7))
|
|
201
|
+
|
|
202
|
+
## [0.12.4](https://github.com/ttoss/carlin/compare/v0.12.3...v0.12.4) (2021-02-24)
|
|
203
|
+
|
|
204
|
+
### Bug Fixes
|
|
205
|
+
|
|
206
|
+
- fixes [#24](https://github.com/ttoss/carlin/issues/24) ([cb076f9](https://github.com/ttoss/carlin/commit/cb076f9a667bbc69382930a76884234c33e3f26c))
|
|
207
|
+
|
|
208
|
+
## [0.12.3](https://github.com/ttoss/carlin/compare/v0.12.2...v0.12.3) (2021-02-22)
|
|
209
|
+
|
|
210
|
+
### Bug Fixes
|
|
211
|
+
|
|
212
|
+
- fixes [#23](https://github.com/ttoss/carlin/issues/23) ([b49e39e](https://github.com/ttoss/carlin/commit/b49e39e3f3b8ad41f835bbe8188cffd39471bd2d))
|
|
213
|
+
|
|
214
|
+
## [0.12.2](https://github.com/ttoss/carlin/compare/v0.12.1...v0.12.2) (2021-02-22)
|
|
215
|
+
|
|
216
|
+
### Bug Fixes
|
|
217
|
+
|
|
218
|
+
- fixes [#22](https://github.com/ttoss/carlin/issues/22) ([bfad6e1](https://github.com/ttoss/carlin/commit/bfad6e1e6a2a2117baf61cfac34bc05be5d19d7f))
|
|
219
|
+
|
|
220
|
+
## [0.12.1](https://github.com/ttoss/carlin/compare/v0.12.0...v0.12.1) (2021-02-11)
|
|
221
|
+
|
|
222
|
+
### Bug Fixes
|
|
223
|
+
|
|
224
|
+
- tests ([77875b9](https://github.com/ttoss/carlin/commit/77875b956dfa461fb8920c6168e4916d2314102e))
|
|
225
|
+
|
|
226
|
+
# [0.12.0](https://github.com/ttoss/carlin/compare/v0.11.7...v0.12.0) (2021-02-11)
|
|
227
|
+
|
|
228
|
+
### Features
|
|
229
|
+
|
|
230
|
+
- static app improvements and docs ([#21](https://github.com/ttoss/carlin/issues/21)) ([5723688](https://github.com/ttoss/carlin/commit/572368840758ee35e3256847b830dcabc4de327f)), closes [#16](https://github.com/ttoss/carlin/issues/16) [#17](https://github.com/ttoss/carlin/issues/17) [#18](https://github.com/ttoss/carlin/issues/18) [#19](https://github.com/ttoss/carlin/issues/19) [#20](https://github.com/ttoss/carlin/issues/20)
|
|
231
|
+
|
|
232
|
+
## [0.11.7](https://github.com/ttoss/carlin/compare/v0.11.6...v0.11.7) (2021-02-04)
|
|
233
|
+
|
|
234
|
+
**Note:** Version bump only for package carlin
|
|
235
|
+
|
|
236
|
+
## [0.11.6](https://github.com/ttoss/carlin/compare/v0.11.5...v0.11.6) (2021-02-04)
|
|
237
|
+
|
|
238
|
+
**Note:** Version bump only for package carlin
|
|
239
|
+
|
|
240
|
+
## [0.11.5](https://github.com/ttoss/carlin/compare/v0.11.4...v0.11.5) (2021-02-03)
|
|
241
|
+
|
|
242
|
+
### Bug Fixes
|
|
243
|
+
|
|
244
|
+
- stack name tests ([b7b9464](https://github.com/ttoss/carlin/commit/b7b9464fc8d72c513d996ecffc6f7a7da842832e))
|
|
245
|
+
|
|
246
|
+
## [0.11.4](https://github.com/ttoss/carlin/compare/v0.11.3...v0.11.4) (2021-02-02)
|
|
247
|
+
|
|
248
|
+
### Bug Fixes
|
|
249
|
+
|
|
250
|
+
- issue [#13](https://github.com/ttoss/carlin/issues/13) ([#14](https://github.com/ttoss/carlin/issues/14)) ([f7e6f72](https://github.com/ttoss/carlin/commit/f7e6f72ca2e785f358a447b3c16fdadc80123ab3))
|
|
251
|
+
|
|
252
|
+
## [0.11.3](https://github.com/ttoss/carlin/compare/v0.11.2...v0.11.3) (2021-02-01)
|
|
253
|
+
|
|
254
|
+
### Bug Fixes
|
|
255
|
+
|
|
256
|
+
- issues 10 and 11 ([#12](https://github.com/ttoss/carlin/issues/12)) ([62cda51](https://github.com/ttoss/carlin/commit/62cda5167aa4c67be38b71fa0ec15797ebf8c7ae))
|
|
257
|
+
|
|
258
|
+
## [0.11.2](https://github.com/ttoss/carlin/compare/v0.11.1...v0.11.2) (2021-01-19)
|
|
259
|
+
|
|
260
|
+
### Bug Fixes
|
|
261
|
+
|
|
262
|
+
- issue [#8](https://github.com/ttoss/carlin/issues/8) ([#9](https://github.com/ttoss/carlin/issues/9)) ([217ff41](https://github.com/ttoss/carlin/commit/217ff41e555702732803f30f23621e6befe5344b))
|
|
263
|
+
|
|
264
|
+
## [0.11.1](https://github.com/ttoss/carlin/compare/v0.11.0...v0.11.1) (2020-12-22)
|
|
265
|
+
|
|
266
|
+
### Features
|
|
267
|
+
|
|
268
|
+
- add GTM to all pages ([#7](https://github.com/ttoss/carlin/issues/7)) ([4e8e945](https://github.com/ttoss/carlin/commit/4e8e945095c0c42a28209a248d7d6bc23bd65413))
|
|
269
|
+
|
|
270
|
+
# [0.11.0](https://github.com/ttoss/carlin/compare/v0.10.3...v0.11.0) (2020-12-20)
|
|
271
|
+
|
|
272
|
+
**Note:** Version bump only for package carlin
|
|
273
|
+
|
|
274
|
+
## [0.10.3](https://github.com/ttoss/carlin/compare/v0.10.2...v0.10.3) (2020-12-11)
|
|
275
|
+
|
|
276
|
+
**Note:** Version bump only for package carlin
|
|
277
|
+
|
|
278
|
+
## [0.10.2](https://github.com/ttoss/carlin/compare/v0.10.1...v0.10.2) (2020-12-08)
|
|
279
|
+
|
|
280
|
+
### Bug Fixes
|
|
281
|
+
|
|
282
|
+
- remove parcel-bundler ([a33d609](https://github.com/ttoss/carlin/commit/a33d6099c26484720abe6c29e6f6576c70a92638))
|
|
283
|
+
|
|
284
|
+
## [0.10.1](https://github.com/ttoss/carlin/compare/v0.10.0...v0.10.1) (2020-12-08)
|
|
285
|
+
|
|
286
|
+
### Bug Fixes
|
|
287
|
+
|
|
288
|
+
- typescript lambda build error ([68707a7](https://github.com/ttoss/carlin/commit/68707a776319a5c286bc196b4ffae760e78516e1))
|
|
289
|
+
|
|
290
|
+
# [0.10.0](https://github.com/ttoss/carlin/compare/v0.9.0...v0.10.0) (2020-12-06)
|
|
291
|
+
|
|
292
|
+
### Features
|
|
293
|
+
|
|
294
|
+
- add versions to static app deployments ([33f9032](https://github.com/ttoss/carlin/commit/33f903277fbe3054ba45d7165e09765e68fcb488))
|
|
295
|
+
- remove retention limit from Lambda logs ([881ae21](https://github.com/ttoss/carlin/commit/881ae212ced29b9cdb014745f12b1bb576480a3e))
|
|
296
|
+
|
|
297
|
+
# [0.9.0](https://github.com/ttoss/carlin/compare/v0.8.0...v0.9.0) (2020-11-15)
|
|
298
|
+
|
|
299
|
+
### Features
|
|
300
|
+
|
|
301
|
+
- improve acm and ttls ([19671da](https://github.com/ttoss/carlin/commit/19671daed5c093c4e42af640a9c8c95912fcf4e5))
|
|
302
|
+
|
|
303
|
+
# [0.8.0](https://github.com/ttoss/carlin/compare/v0.7.3...v0.8.0) (2020-11-13)
|
|
304
|
+
|
|
305
|
+
### Bug Fixes
|
|
306
|
+
|
|
307
|
+
- error message ([17a9ab3](https://github.com/ttoss/carlin/commit/17a9ab384d30c0e7b3294308ee93addcbc671f3b))
|
|
308
|
+
|
|
309
|
+
### Features
|
|
310
|
+
|
|
311
|
+
- add destroy lambda layer ([2f19610](https://github.com/ttoss/carlin/commit/2f19610c9c2dbb068916cf5c6700a7c3ce0157d2))
|
|
312
|
+
- adding lambda layer documentation ([c8dafe7](https://github.com/ttoss/carlin/commit/c8dafe724972ae3e441aaf3113fe5baf21d4e24c))
|
|
313
|
+
- deploy lambda layer ([278048a](https://github.com/ttoss/carlin/commit/278048aa3db1fc13c4344503f4b9a2710fdf66a3))
|
|
314
|
+
- termination protection ([7e2dcc8](https://github.com/ttoss/carlin/commit/7e2dcc840812858d0b033250a993a77d4cc2a15c))
|
|
315
|
+
- upload group of files on s3 ([ea7eaf8](https://github.com/ttoss/carlin/commit/ea7eaf8993467d111211b281f59b152c13028c12))
|
|
316
|
+
|
|
317
|
+
## [0.7.3](https://github.com/ttoss/carlin/compare/v0.7.2...v0.7.3) (2020-10-18)
|
|
318
|
+
|
|
319
|
+
### Bug Fixes
|
|
320
|
+
|
|
321
|
+
- move ts-node register inside ts if statement ([4d6607b](https://github.com/ttoss/carlin/commit/4d6607b8312d5c449e55a3fbcf47d8b94641df6d))
|
|
322
|
+
|
|
323
|
+
## [0.7.2](https://github.com/ttoss/carlin/compare/v0.7.1...v0.7.2) (2020-10-18)
|
|
324
|
+
|
|
325
|
+
### Bug Fixes
|
|
326
|
+
|
|
327
|
+
- ts import and deployCloudformation method ([88752a5](https://github.com/ttoss/carlin/commit/88752a52d2874b1718233e589a00bf25d3c05680))
|
|
328
|
+
|
|
329
|
+
## [0.7.1](https://github.com/ttoss/carlin/compare/v0.7.0...v0.7.1) (2020-10-18)
|
|
330
|
+
|
|
331
|
+
**Note:** Version bump only for package carlin
|
|
332
|
+
|
|
333
|
+
# [0.7.0](https://github.com/ttoss/carlin/compare/v0.6.1...v0.7.0) (2020-10-18)
|
|
334
|
+
|
|
335
|
+
### Bug Fixes
|
|
336
|
+
|
|
337
|
+
- allow deploy without init git ([f8e719e](https://github.com/ttoss/carlin/commit/f8e719ea3cc478b234c6c3b50adb21660adea41d))
|
|
338
|
+
- remove tags with empty values ([2c057e2](https://github.com/ttoss/carlin/commit/2c057e2dc5cf27da1c9beca5b357bcf71205187c))
|
|
339
|
+
|
|
340
|
+
### Features
|
|
341
|
+
|
|
342
|
+
- allow js, ts, json, yml and yaml cloudformation template extensions ([e671daa](https://github.com/ttoss/carlin/commit/e671daa2b6fc2508a52db28d4cb1f90a49d04166))
|
|
343
|
+
|
|
344
|
+
## [0.6.1](https://github.com/ttoss/carlin/compare/v0.6.0...v0.6.1) (2020-10-05)
|
|
345
|
+
|
|
346
|
+
### Bug Fixes
|
|
347
|
+
|
|
348
|
+
- automatically assign cloudfront to true if some options are true ([85e0d35](https://github.com/ttoss/carlin/commit/85e0d35a38a4a86b4ae453dcc1c51c2e9c4fe399))
|
|
349
|
+
- update eslint rules ([989e9f9](https://github.com/ttoss/carlin/commit/989e9f9e10c1c864b2b341103e973d0acf543d1c))
|
|
350
|
+
|
|
351
|
+
# [0.6.0](https://github.com/ttoss/carlin/compare/v0.5.1...v0.6.0) (2020-09-16)
|
|
352
|
+
|
|
353
|
+
### Features
|
|
354
|
+
|
|
355
|
+
- add scp to deploy static-app ([f382e1d](https://github.com/ttoss/carlin/commit/f382e1d4a1e9f64e8cd90ce3fe8d79b00915544d))
|
|
356
|
+
|
|
357
|
+
## [0.5.1](https://github.com/ttoss/carlin/compare/v0.5.0...v0.5.1) (2020-09-10)
|
|
358
|
+
|
|
359
|
+
### Bug Fixes
|
|
360
|
+
|
|
361
|
+
- commitling.config.js dir. woff files deploy ([da63b02](https://github.com/ttoss/carlin/commit/da63b026b466e454509273d07e5a9d7e8286f424))
|
|
362
|
+
|
|
363
|
+
# [0.5.0](https://github.com/ttoss/carlin/compare/v0.4.0...v0.5.0) (2020-09-09)
|
|
364
|
+
|
|
365
|
+
### Features
|
|
366
|
+
|
|
367
|
+
- add theme ui. Remove tailwindcss ([7a1c5a2](https://github.com/ttoss/carlin/commit/7a1c5a27d8bc2d43a98b28b1512a6ca783485f75))
|
|
368
|
+
- carlin website deploy ([139eb82](https://github.com/ttoss/carlin/commit/139eb82337286c12e6d0717914905538ea5c34a0))
|
|
369
|
+
- deploy static app edge working ([da5a284](https://github.com/ttoss/carlin/commit/da5a284731d47e3b12f90e45abe9be90933a4c88))
|
|
370
|
+
- docs improvements ([829e9d6](https://github.com/ttoss/carlin/commit/829e9d6ad48111a35be6350f44e09fcfc06837c5))
|
|
371
|
+
- more documentation ([abcb6da](https://github.com/ttoss/carlin/commit/abcb6da79afed0989214741c152e3e4264b406bd))
|
|
372
|
+
|
|
373
|
+
# [0.4.0](https://github.com/ttoss/carlin/compare/v0.3.3...v0.4.0) (2020-08-18)
|
|
374
|
+
|
|
375
|
+
### Features
|
|
376
|
+
|
|
377
|
+
- creating new docs ([3691167](https://github.com/ttoss/carlin/commit/36911673ecb104d23875253651a11780a04c0bf2))
|
|
378
|
+
- templates ([3bfb81c](https://github.com/ttoss/carlin/commit/3bfb81c5f4e5613765429ccadd0cecc128c16d74))
|
package/bin/carlin
ADDED
package/dist/cli.js
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.options = void 0;
|
|
26
|
+
/* eslint-disable no-param-reassign */
|
|
27
|
+
const aws_sdk_1 = __importDefault(require("aws-sdk"));
|
|
28
|
+
const change_case_1 = require("change-case");
|
|
29
|
+
const deep_equal_1 = __importDefault(require("deep-equal"));
|
|
30
|
+
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
31
|
+
const find_up_1 = __importDefault(require("find-up"));
|
|
32
|
+
const path_1 = __importDefault(require("path"));
|
|
33
|
+
const yargs = __importStar(require("yargs"));
|
|
34
|
+
const config_1 = require("./config");
|
|
35
|
+
const command_1 = require("./deploy/command");
|
|
36
|
+
const ecsTaskReportCommand_1 = require("./deploy/cicd/ecsTaskReportCommand");
|
|
37
|
+
const utils_1 = require("./utils");
|
|
38
|
+
const coerceSetEnvVar = (env) => (value) => {
|
|
39
|
+
if (value) {
|
|
40
|
+
utils_1.setEnvVar(env, value);
|
|
41
|
+
}
|
|
42
|
+
return value;
|
|
43
|
+
};
|
|
44
|
+
exports.options = {
|
|
45
|
+
branch: {
|
|
46
|
+
coerce: coerceSetEnvVar('BRANCH'),
|
|
47
|
+
require: false,
|
|
48
|
+
type: 'string',
|
|
49
|
+
},
|
|
50
|
+
config: {
|
|
51
|
+
alias: 'c',
|
|
52
|
+
describe: 'Path to config file. You can create a config file and set all options there. Valid extensions: .js, .json, .ts, .yml, or .yaml.',
|
|
53
|
+
require: false,
|
|
54
|
+
type: 'string',
|
|
55
|
+
},
|
|
56
|
+
environment: {
|
|
57
|
+
alias: ['e', 'env'],
|
|
58
|
+
coerce: coerceSetEnvVar('ENVIRONMENT'),
|
|
59
|
+
type: 'string',
|
|
60
|
+
},
|
|
61
|
+
environments: {},
|
|
62
|
+
project: {
|
|
63
|
+
coerce: coerceSetEnvVar('PROJECT'),
|
|
64
|
+
require: false,
|
|
65
|
+
type: 'string',
|
|
66
|
+
},
|
|
67
|
+
region: {
|
|
68
|
+
alias: 'r',
|
|
69
|
+
// coerce: coerceSetEnvVar('REGION'),
|
|
70
|
+
default: config_1.AWS_DEFAULT_REGION,
|
|
71
|
+
describe: 'AWS region.',
|
|
72
|
+
type: 'string',
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* You can also provide the options creating a property name `carlin`
|
|
77
|
+
* inside your `package.json`. [See Yargs reference](https://yargs.js.org/docs/#api-reference-pkgconfkey-cwd).
|
|
78
|
+
*/
|
|
79
|
+
const getPkgConfig = () => config_1.NAME;
|
|
80
|
+
/**
|
|
81
|
+
* All options can be passed as environment variables matching the prefix
|
|
82
|
+
* `CARLIN`. See [Yargs reference](https://yargs.js.org/docs/#api-reference-envprefix).
|
|
83
|
+
* Example, we may use `carlin deploy --stack-name StackName` or
|
|
84
|
+
* `CARLIN_STACK_NAME=StackName carlin deploy`.
|
|
85
|
+
*/
|
|
86
|
+
const getEnv = () => {
|
|
87
|
+
return change_case_1.constantCase(config_1.NAME);
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Transformed to method because finalConfig was failing the tests.
|
|
91
|
+
*/
|
|
92
|
+
const cli = () => {
|
|
93
|
+
/**
|
|
94
|
+
* All config files merged.
|
|
95
|
+
*/
|
|
96
|
+
let finalConfig;
|
|
97
|
+
/**
|
|
98
|
+
* If `--config` isn't provided, the algorithm will search for any of these
|
|
99
|
+
* files and use it to retrieve the options:
|
|
100
|
+
*
|
|
101
|
+
* - `carlin.js`
|
|
102
|
+
* - `carlin.ts`
|
|
103
|
+
* - `carlin.yaml`
|
|
104
|
+
* - `carlin.yml`
|
|
105
|
+
* - `carlin.json`
|
|
106
|
+
*
|
|
107
|
+
* The algorithm also make a find up path to search for other config files
|
|
108
|
+
* that may exist in parent directories. If find more than one file, they'll
|
|
109
|
+
* be merged, in such a way that the files nearest from `process.cwd()` will
|
|
110
|
+
* take the precedence at the merging.
|
|
111
|
+
*
|
|
112
|
+
* This is useful if you have a monorepo and have shared and specific
|
|
113
|
+
* configuration. For instance, you may have a config inside `packages/app/`
|
|
114
|
+
* folder with the config below:
|
|
115
|
+
*
|
|
116
|
+
* ```yaml
|
|
117
|
+
* stackName: MyMonorepoApp
|
|
118
|
+
* region: us-east-2
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
121
|
+
* And on the root of your monorepo:
|
|
122
|
+
*
|
|
123
|
+
* ```yaml
|
|
124
|
+
* awsAccountId: 123456789012
|
|
125
|
+
* region: us-east-1
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* The result options that will be passed to the commands executed on
|
|
129
|
+
* `packages/app/` will be:
|
|
130
|
+
*
|
|
131
|
+
* ```yaml
|
|
132
|
+
* awsAccountId: 123456789012
|
|
133
|
+
* stackName: MyMonorepoApp
|
|
134
|
+
* region: us-east-2
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
const getConfig = () => {
|
|
138
|
+
const names = ['js', 'yml', 'yaml', 'json', 'ts'].map((ext) => `${config_1.NAME}.${ext}`);
|
|
139
|
+
const paths = [];
|
|
140
|
+
let currentPath = process.cwd();
|
|
141
|
+
let findUpPath;
|
|
142
|
+
do {
|
|
143
|
+
findUpPath = find_up_1.default.sync(names, { cwd: currentPath });
|
|
144
|
+
if (findUpPath) {
|
|
145
|
+
currentPath = path_1.default.resolve(findUpPath, '../..');
|
|
146
|
+
paths.push(findUpPath);
|
|
147
|
+
}
|
|
148
|
+
} while (findUpPath);
|
|
149
|
+
const configs = paths.map((p) => utils_1.readObjectFile({ path: p }) || {});
|
|
150
|
+
/**
|
|
151
|
+
* Using configs.reverser() to get the most far config first. This way the
|
|
152
|
+
* nearest configs will replace others.
|
|
153
|
+
*/
|
|
154
|
+
finalConfig = deepmerge_1.default.all(configs.reverse());
|
|
155
|
+
return finalConfig;
|
|
156
|
+
};
|
|
157
|
+
return (yargs
|
|
158
|
+
/**
|
|
159
|
+
* It can't be full strict because options may overlap among carlin config
|
|
160
|
+
* files.
|
|
161
|
+
*/
|
|
162
|
+
.strictCommands()
|
|
163
|
+
.scriptName(config_1.NAME)
|
|
164
|
+
.env(getEnv())
|
|
165
|
+
.options(utils_1.addGroupToOptions(exports.options, 'Common Options'))
|
|
166
|
+
.middleware(((argv, { parsed }) => {
|
|
167
|
+
const { environment, environments } = argv;
|
|
168
|
+
/**
|
|
169
|
+
* Create final options with environment and environments.
|
|
170
|
+
*/
|
|
171
|
+
if (environment &&
|
|
172
|
+
environments &&
|
|
173
|
+
environments[environment]) {
|
|
174
|
+
Object.entries(environments[environment]).forEach(([key, value]) => {
|
|
175
|
+
/**
|
|
176
|
+
* The case where argv[key] must not have the environment value is
|
|
177
|
+
* when such value is passed as option via CLI. For instance,
|
|
178
|
+
*
|
|
179
|
+
* $ carlin deploy --stack-name SomeName
|
|
180
|
+
*
|
|
181
|
+
* SomeName must be used as stack name independently of the
|
|
182
|
+
* environment values https://github.com/ttoss/carlin/issues/13.
|
|
183
|
+
*
|
|
184
|
+
* Three cases set argv:
|
|
185
|
+
*
|
|
186
|
+
* 1. Default.
|
|
187
|
+
* 2. Config file.
|
|
188
|
+
* 3. CLI
|
|
189
|
+
*
|
|
190
|
+
* - Case 1 we determine if the parsed.defaulted is true.
|
|
191
|
+
* - Case 2 we determine if `argv[key] === finalConfig[key]`.
|
|
192
|
+
* - Case 3 if the two above are falsy.
|
|
193
|
+
*/
|
|
194
|
+
const isKeyFromCli = (() => {
|
|
195
|
+
var _a;
|
|
196
|
+
const paramCaseKey = change_case_1.paramCase(key);
|
|
197
|
+
/**
|
|
198
|
+
* Case 1.
|
|
199
|
+
* Fixes #16 https://github.com/ttoss/carlin/issues/16
|
|
200
|
+
*/
|
|
201
|
+
if ((_a = parsed === null || parsed === void 0 ? void 0 : parsed.defaulted) === null || _a === void 0 ? void 0 : _a[paramCaseKey]) {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Case 2.
|
|
206
|
+
*
|
|
207
|
+
* Fixes #13 https://github.com/ttoss/carlin/issues/13
|
|
208
|
+
*
|
|
209
|
+
* Deep equal because arg can be an array or object.
|
|
210
|
+
*/
|
|
211
|
+
if (deep_equal_1.default(argv[key], finalConfig[key])) {
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
return true;
|
|
215
|
+
})();
|
|
216
|
+
if (!isKeyFromCli) {
|
|
217
|
+
argv[key] = value;
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
}))
|
|
222
|
+
/**
|
|
223
|
+
* Sometimes "environments" can be written as "environment" on config file.
|
|
224
|
+
*/
|
|
225
|
+
.middleware(({ environment }) => {
|
|
226
|
+
if (!['string', 'undefined'].includes(typeof environment)) {
|
|
227
|
+
throw new Error(`environment type is invalid. The value: ${JSON.stringify(environment)}`);
|
|
228
|
+
}
|
|
229
|
+
})
|
|
230
|
+
/**
|
|
231
|
+
* Set AWS region.
|
|
232
|
+
*/
|
|
233
|
+
.middleware(({ region }) => {
|
|
234
|
+
aws_sdk_1.default.config.region = region;
|
|
235
|
+
utils_1.setEnvVar('REGION', region);
|
|
236
|
+
})
|
|
237
|
+
.pkgConf(getPkgConfig())
|
|
238
|
+
.config(getConfig())
|
|
239
|
+
.config('config', (configPath) => utils_1.readObjectFile({ path: configPath }))
|
|
240
|
+
.command({
|
|
241
|
+
command: 'print-args',
|
|
242
|
+
describe: false,
|
|
243
|
+
handler: (argv) => console.log(JSON.stringify(argv, null, 2)),
|
|
244
|
+
})
|
|
245
|
+
.command(command_1.deployCommand)
|
|
246
|
+
.command(ecsTaskReportCommand_1.ecsTaskReportCommand)
|
|
247
|
+
.epilogue('For more information, find our manual at https://carlin.ttoss.dev')
|
|
248
|
+
.help());
|
|
249
|
+
};
|
|
250
|
+
exports.default = cli;
|