You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When contributing to this repository, please first open an issue so that the community of contributors to this repository can discuss the suggestion before a change is made.
4
+
3
5
Commits follow the [Angular commit convention](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines).
4
6
5
7
Run `npx cz` to commit with prompts to help you write a commit message.
8
+
9
+
## Pull Request Process
10
+
11
+
Once you have finished making your changes:
12
+
13
+
1. Make sure that your code satisfies the standards laid out in the [testing](#testing) and [coding style](#coding-style) section of this document.
14
+
2. Update README.md with details on any changes to the interface or behavior of the plugin.
15
+
3. Submit your PR, using the PR template provided to describe the details of your changes.
16
+
17
+
Then,
18
+
19
+
4. For substantial changes to the plugin, we will try to get at least two community sign-offs and some discussion of the PR before merging.
20
+
- For non-controversial or minor PRs (e.g. phrasing updates in the documentation, minor refactoring of constants), one approval will be sufficient to move forward.
21
+
5. A contributor with push access to the repo will merge the PR after all tests and fixes have occured.
22
+
6. A new release will be published (if appropriate).
23
+
24
+
### Testing
25
+
26
+
Please read our [testing guide](./test/README.md) and ensure any changes are covered by unit tests, and integration tests if applicable.
27
+
28
+
### Coding Style
29
+
30
+
This repository uses [prettier](https://prettier.io/) to enforce a uniform coding style. You may install an editor plugin for prettier, but code will also be auto-formatted via a git hook whenever you commit code.
31
+
32
+
### Code of Conduct
33
+
34
+
Please be polite and respectful in all your communication and actions towards others in the serverless-finch community.
Copy file name to clipboardExpand all lines: README.md
+31-47Lines changed: 31 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ custom:
26
26
# [other configuration parameters] (see Configuration Parameters below)
27
27
```
28
28
29
-
**NOTE:***For full example configurations, please refer to the [examples](examples) folder.*
29
+
**NOTE:**_For full example configurations, please refer to the [examples](examples) folder._
30
30
31
31
**Second**, Create a website folder in the root directory of your Serverless project. This is where your distribution-ready website should live. By default the plugin expects the files to live in a folder called `client/dist`. But this is configurable with the `distributionFolder` option (see the [Configuration Parameters](#configuration-parameters) below).
The plugin should output the location of your newly deployed static site to the console.
52
52
53
-
**Note:***See[Command-line Parameters](#command-line-parameters) for details on command above*
53
+
**Note:**_See[Command-line Parameters](#command-line-parameters) for details on command above_
54
54
55
55
**WARNING:** The plugin will overwrite any data you have in the bucket name you set above if it already exists.
56
56
@@ -154,7 +154,7 @@ custom:
154
154
155
155
Use this parameter to specify the path to a _single_ custom policy file. If not set, it defaults to a config for a basic static website. Currently, only JSON is supported. In your policy, make sure that your resource has the correct bucket name specified above: `"Resource": "arn:aws:s3:::BUCKET_NAME/*",`
156
156
157
-
_Note: You can also use `${env:PWD}` if you want to dynamically specify the policy within your repo. for example:_
157
+
_Note: You can also use `${env:PWD}` if you want to dynamically specify the policy within your repo. for example:_
158
158
159
159
```yaml
160
160
custom:
@@ -192,7 +192,7 @@ _See above docs on `bucketPolicyFile` option for how to provide a dynamic file p
192
192
193
193
---
194
194
195
-
**objectHeaders**
195
+
**objectHeaders**
196
196
197
197
_optional_, no default
198
198
@@ -221,9 +221,9 @@ custom:
221
221
...
222
222
```
223
223
224
-
Use the `objectHeaders` option to set HTTP response headers be sent to clients requesting uploaded files from your website.
224
+
Use the `objectHeaders` option to set HTTP response headers be sent to clients requesting uploaded files from your website.
225
225
226
-
Headers may be specified globally for all files in the bucket by adding a `name`, `value` pair to the `ALL_OBJECTS` property of the `objectHeaders` option. They may also be specified for specific folders or files within your site by specifying properties with names like `specific-directory/` (trailing slash required to indicate folder) or `specific-file.ext`, where the folder and/or file paths are relative to `distributionFolder`.
226
+
Headers may be specified globally for all files in the bucket by adding a `name`, `value` pair to the `ALL_OBJECTS` property of the `objectHeaders` option. They may also be specified for specific folders or files within your site by specifying properties with names like `specific-directory/` (trailing slash required to indicate folder) or `specific-file.ext`, where the folder and/or file paths are relative to `distributionFolder`.
227
227
228
228
Headers with more specificity will take precedence over more general ones. For instance, if 'Cache-Control' was set to 'max-age=100' in `ALL_OBJECTS` and to 'max-age=500' in `my/folder/`, the files in `my/folder/` would get a header of 'Cache-Control: max-age=500'.
229
229
@@ -275,16 +275,16 @@ The `routingRules` option can be used to define rules for when and how certain r
275
275
276
276
The `redirect` property of each rule has five optional parameters:
277
277
278
-
* `hostName` is the name of the host that the request should be redirected to (e.g. 'www.other-site.com'). Defaults to the host from the original request.
279
-
* `httpRedirectCode` is the HTTP status code to use for the redirect (e.g. 301, 303, 308).
280
-
* `protocol` is the protocol to use for the redirect and must be 'http' or 'https'. Defaults to the protocol from the original request.
281
-
* `replaceKeyPrefixWith` specifies the string to replace the portion of the route specified in the `keyPrefixEquals` with in the redirect. For instance, if you want to redirect requests for pages starting with '/images' to pages starting with '/assets/images', you can specify `keyPrefixEquals` as '/images' and `replaceKeyPrefixWith` as '/assets/images'. _Cannot be specified along with `replaceKeyWith`_.
282
-
* `replaceKeyWith` specifies a specific page to redirect requests to (e.g. 'landing.html'). _Cannot be specified along with `replaceKeyPrefixWith`_.
278
+
-`hostName`is the name of the host that the request should be redirected to (e.g. 'www.other-site.com'). Defaults to the host from the original request.
279
+
-`httpRedirectCode`is the HTTP status code to use for the redirect (e.g. 301, 303, 308).
280
+
-`protocol`is the protocol to use for the redirect and must be 'http' or 'https'. Defaults to the protocol from the original request.
281
+
-`replaceKeyPrefixWith`specifies the string to replace the portion of the route specified in the `keyPrefixEquals` with in the redirect. For instance, if you want to redirect requests for pages starting with '/images' to pages starting with '/assets/images', you can specify `keyPrefixEquals` as '/images' and `replaceKeyPrefixWith` as '/assets/images'. _Cannot be specified along with `replaceKeyWith`_.
282
+
-`replaceKeyWith`specifies a specific page to redirect requests to (e.g. 'landing.html'). _Cannot be specified along with `replaceKeyPrefixWith`_.
283
283
284
284
The `condition` property has two optional parameters:
285
285
286
-
* `keyPrefixEquals` specifies that requests to pages starting with the specified value should be redirected. Often used with the `replaceKeyPrefixWith` and `replaceKeyWith` `redirect` properties.
287
-
* `httpErrorCodeReturnedEquals` specifies that requests resulting in the given HTTP error code (e.g. 404, 500) should be redirected.
286
+
-`keyPrefixEquals`specifies that requests to pages starting with the specified value should be redirected. Often used with the `replaceKeyPrefixWith` and `replaceKeyWith` `redirect` properties.
287
+
-`httpErrorCodeReturnedEquals`specifies that requests resulting in the given HTTP error code (e.g. 404, 500) should be redirected.
288
288
289
289
_If `condition` is not specified, then all requests will be redirected in accordance with the specified `redirect` properties_
290
290
@@ -308,7 +308,7 @@ custom:
308
308
...
309
309
```
310
310
311
-
The `uploadOrder` option can be used for ordering the files uploaded to the bucket. When combined with `--no-delete-contents` this helps with 0 downtime, as we can make sure we upload any assets before serving the html files which need them.
311
+
The `uploadOrder` option can be used for ordering the files uploaded to the bucket. When combined with `--no-delete-contents` this helps with 0 downtime, as we can make sure we upload any assets before serving the html files which need them.
312
312
313
313
---
314
314
@@ -360,9 +360,6 @@ custom:
360
360
361
361
This allows you to opt out of having serverless-finch create or configure the s3 bucket. Instead, you can rely on an existing bucket or a CloudFormation definition.
362
362
363
-
364
-
365
-
366
363
### Command-line Parameters
367
364
368
365
**--region**
@@ -373,11 +370,11 @@ _optional_, defaults to value specified in `provider` section of `serverless.yml
373
370
serverless client deploy --region $REGION
374
371
```
375
372
376
-
Use this parameter to specify what AWS region your bucket will be deployed in.
373
+
Use this parameter to specify what AWS region your bucket will be deployed in.
377
374
378
375
This option will always determine the deployment region if specified. If `region`
379
-
is not specified via the CLI, we use the `region` option specified under
380
-
custom/client in `serverless.yml`. If that is not specified, we use the Serverless
376
+
is not specified via the CLI, we use the `region` option specified under
377
+
custom/client in `serverless.yml`. If that is not specified, we use the Serverless
381
378
region specified under `provider` in `serverless.yml`.
382
379
383
380
---
@@ -444,25 +441,11 @@ Use this parameter if you do not want a confirmation prompt to interrupt automat
444
441
445
442
## Contributing
446
443
447
-
For guidelines on contributing to the project, please refer to our [Contributing](docs/CONTRIBUTING.md) page.
- Adds a lot of patches and fixes from old deps to new ones.
459
-
460
-
### v2.7.6
461
-
462
-
- Adds support for easier NPM deploys via GitHub releases
463
-
- Allows to set the "redirect" property of routing rules to be an empty string, which is a legitimate value. - [EnricoPicci](https://github.com/EnricoPicci)
464
-
- Clearer details on where the plugin uploads files when key prefixed. [Lilja](https://github.com/Lilja)
465
-
- Why 2.7.6 you ask? Because there were a lot of CI tests that made this release happen. A awful lot of them.
448
+
See [Releases](https://github.com/fernando-mc/serverless-finch/releases) for releases after `v2.6.0`.
466
449
467
450
### v2.6.0
468
451
@@ -475,45 +458,46 @@ For guidelines on contributing to the project, please refer to our [Contributing
475
458
- Added the `sse` option to allow you to encrypt files with Server Side Encryption using `AES256` or `aws:kms` - [Pull 91](https://github.com/fernando-mc/serverless-finch/pull/91) - [Severi Haverila](https://github.com/severi)
476
459
477
460
### v2.4.\*
461
+
478
462
- Added the `manageResources` option to allow you to tell serverless-finch to not interact with your S3 bucket - [Pull 75](https://github.com/fernando-mc/serverless-finch/pull/75) - [sprockow](https://github.com/sprockow)
479
463
- Added the `keyPrefix` option to enable working with S3 folders - [Pull 76](https://github.com/fernando-mc/serverless-finch/pull/76) - [Archanium](https://github.com/Archanium)
- Typo and legacy promise bugfixes - [Joel Van Horn](https://github.com/joelvh), [Raptor](https://github.com/redhat-raptor), [Frederik Ring](https://github.com/m90)
483
467
484
-
### v2.0.\*
468
+
### v2.0.\*
469
+
485
470
- Added ability to deploy files in a specific order to maximize uptime - [Issue 63](https://github.com/fernando-mc/serverless-finch/issues/63) - [stefan-lz](https://github.com/stefan-lz)
486
471
- Added Python tests of functionality to speed up development - [fernando-mc](https://github.com/fernando-mc)
487
472
- Major refactor of entire codebase to move towards modularity and testability
488
473
- Added the ability to set HTTP headers for objects in bucket ([Issue 24](https://github.com/fernando-mc/serverless-finch/issues/24))
489
474
- Added the ability to set redirect and routing options for the website (Initially implemented in [Pull 23](https://github.com/fernando-mc/serverless-finch/pull/23))
490
475
- Added command-line options to disable (Initially implemented in [Pull 28](https://github.com/fernando-mc/serverless-finch/pull/28/files)):
491
-
+ Bucket contents being deleted before deployment
492
-
+ Bucket configuration being overwritten on deployment
493
-
+ Bucket policy being overwritten on deployment
494
-
+ Bucket CORS configuration being overwritten on deployment
495
-
- Added validation checks for all configuration options
476
+
-Bucket contents being deleted before deployment
477
+
-Bucket configuration being overwritten on deployment
478
+
-Bucket policy being overwritten on deployment
479
+
-Bucket CORS configuration being overwritten on deployment
480
+
- Added validation checks for all configuration options
496
481
- Removed "stage" command-line option. It was not being used for anything
497
482
498
483
### v1.4.\*
484
+
499
485
- Added the ability to set custom index and error documents. ([Pull 20](https://github.com/fernando-mc/serverless-finch/pull/20) - [evanseeds](https://github.com/evanseeds))
500
486
501
487
### v1.3.\*
488
+
502
489
- Added the ability to set a `distributionFolder` configuration value. This enables you to upload your website files from a custom directory ([Pull 12](https://github.com/fernando-mc/serverless-finch/pull/12) - [pradel](https://github.com/pradel))
503
490
- Updated the URL to the official static website endpoint URL ([Pull 13](https://github.com/fernando-mc/serverless-finch/pull/13) - [amsross](https://github.com/amsross))
504
491
- Added a new AWS region ([Pull 14](https://github.com/fernando-mc/serverless-finch/pull/14) - [daguix](https://github.com/daguix))
505
492
- Fixed an issue with resolving serverless variables ([Pull 18](https://github.com/fernando-mc/serverless-finch/pull/18) - [shentonfreude](https://github.com/shentonfreude))
506
493
507
494
### v1.2.\*
495
+
508
496
- Added the `remove` option to tear down what you deploy. ([Pull 10](https://github.com/fernando-mc/serverless-finch/pull/10) thanks to [redroot](https://github.com/redroot))
509
497
- Fixed automated builds for the project (no functional differences)
510
498
511
-
## Maintainers
512
-
- **You** - If you're interested in having a more active role in development and becoming a maintainer [get in touch](https://www.fernandomc.com/contact/).
513
-
- Fernando Medina Corey - [fernando-mc](https://github.com/fernando-mc)
514
-
- Linus Marco - [linusmarco](https://github.com/linusmarco)
0 commit comments