Skip to content

Commit

Permalink
Fix typos and clean up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tehnrd committed May 2, 2020
1 parent d9a49f4 commit 7f6ef93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -58,7 +58,7 @@ plugins:
- serverless-domain-manager
```

Add the plugin configuration (example for `serverless.foo.com/api`). For a single domain and API type the following sturcture can be used.
Add the plugin configuration (example for `serverless.foo.com/api`). For a single domain and API type the following structure can be used.

```yaml
custom:
Expand Down Expand Up @@ -118,7 +118,7 @@ custom:
| hostedZonePrivate | | If hostedZonePrivate is set to `true` then only private hosted zones will be used for route 53 records. If it is set to `false` then only public hosted zones will be used for route53 records. Setting this parameter is specially useful if you have multiple hosted zones with the same domain name (e.g. a public and a private one) |
| enabled | true | Sometimes there are stages for which is not desired to have custom domain names. This flag allows the developer to disable the plugin for such cases. Accepts either `boolean` or `string` values and defaults to `true` for backwards compatibility. |
securityPolicy | tls_1_2 | The security policy to apply to the custom domain name. Accepts `tls_1_0` or `tls_1_2`|
allowPathMatching | false | When updating an existing api mapping this will match on the basePath instead of the API ID to find existing mappings for an udpate. This should ony be used when changing API types. For example, migrating a REST API to an HTTP API. See Changing API Types for moe information. |
allowPathMatching | false | When updating an existing api mapping this will match on the basePath instead of the API ID to find existing mappings for an upsate. This should only be used when changing API types. For example, migrating a REST API to an HTTP API. See Changing API Types for more information. |


## Running
Expand Down
9 changes: 4 additions & 5 deletions index.ts
Expand Up @@ -119,7 +119,7 @@ class ServerlessCustomDomain {
domain.domainInfo = undefined;
this.serverless.cli.log(`Custom domain ${domain.givenDomainName} was deleted.`);
} else {
this.serverless.cli.log(`Custom domain ${domain.givenDomainName} does not exists.`);
this.serverless.cli.log(`Custom domain ${domain.givenDomainName} does not exist.`);
}
} catch (err) {
this.logIfDebug(err, domain.givenDomainName);
Expand Down Expand Up @@ -158,7 +158,6 @@ class ServerlessCustomDomain {
}

await this.getDomainInfo();
// this.addOutputs(domain);

} catch (err) {
this.logIfDebug(err, domain.givenDomainName);
Expand All @@ -181,7 +180,7 @@ class ServerlessCustomDomain {
try {
domain.apiId = await this.getApiId(domain);

// Unable to find the correspond API, manuall clean up will be required
// Unable to find the corresponding API, manual clean up will be required
if (!domain.apiId) {
this.serverless.cli.log(`Unable to find corresponding API for ${domain.givenDomainName},
API Mappings may need to be manually removed.`, "Serverless Domain Manager");
Expand Down Expand Up @@ -403,7 +402,7 @@ class ServerlessCustomDomain {

// Make API call to create domain
try {
// If creating REST api use v1 of api gateway, else use v2 for HTTP and Websocket
// Creating EDGE domain so use APIGateway (v1) service
createdDomain = await this.apigateway.createDomainName(params).promise();
domain.domainInfo = new DomainInfo(createdDomain);
} catch (err) {
Expand All @@ -423,7 +422,7 @@ class ServerlessCustomDomain {

// Make API call to create domain
try {
// If creating REST api use v1 of api gateway, else use v2 for HTTP and Websocket
// Creating Regional domain so use ApiGatewayV2
createdDomain = await this.apigatewayV2.createDomainName(params).promise();
domain.domainInfo = new DomainInfo(createdDomain);
} catch (err) {
Expand Down

0 comments on commit 7f6ef93

Please sign in to comment.