Skip to content

Commit 41ed250

Browse files
authored
Include the scope in the package name (#12)
* chore: bump dependencies * chore: make scripts package-manager-agnostic Installs `npm-run-all2` and replaces `npm run` with `run-s`. * chore: clean dist folder before build Uses the `rimraf` package. * chore: include scope in package name Includes the scope `@codemonger/io` in the package name. Also bumps the version to 0.4.0. * docs: update API documentation * docs: update README Topics: - Bump version to 0.4.0 - Replace package names
1 parent 086a3e4 commit 41ed250

12 files changed

+953
-303
lines changed

README.ja.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ API GatewayでREST APIを記述するとき、いつもCORSを扱うためのユ
1818
このレポジトリをNodeの依存関係に追加してください。
1919

2020
```sh
21-
npm install https://github.com/codemonger-io/cdk-cors-utils.git#v0.3.0
21+
npm install https://github.com/codemonger-io/cdk-cors-utils.git#v0.4.0
2222
```
2323

24-
インストールしたモジュールは`cdk2-cors-utils`として以下のように利用できます。
24+
インストールしたモジュールは`@codemonger-io/cdk-cors-utils`として以下のように利用できます。
2525

2626
```js
27-
import { makeIntegrationResponsesAllowCors } from 'cdk2-cors-utils';
27+
import { makeIntegrationResponsesAllowCors } from '@codemonger-io/cdk-cors-utils';
2828
```
2929

3030
このライブラリはCDK v2.x用に設計されており、CDK v1.xでは使えません。

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ These functions are quite simple though, I no longer want to prepare them everyt
1818
Please add this repository to your Node dependencies.
1919

2020
```sh
21-
npm install https://github.com/codemonger-io/cdk-cors-utils.git#v0.3.0
21+
npm install https://github.com/codemonger-io/cdk-cors-utils.git#v0.4.0
2222
```
2323

24-
The installed module will be available as `cdk2-cors-utils` like the following,
24+
The installed module will be available as `@codemonger-io/cdk-cors-utils` like the following,
2525

2626
```js
27-
import { makeIntegrationResponsesAllowCors } from 'cdk2-cors-utils';
27+
import { makeIntegrationResponsesAllowCors } from '@codemonger-io/cdk-cors-utils';
2828
```
2929

3030
This library is designed for CDK v2.x, and does not work with CDK v1.x.

api-docs/cdk2-cors-utils.api.md renamed to api-docs/cdk-cors-utils.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## API Report File for "cdk2-cors-utils"
1+
## API Report File for "@codemonger-io/cdk-cors-utils"
22

33
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
44

api-docs/markdown/cdk2-cors-utils.makeintegrationresponsesallowcors.md renamed to api-docs/markdown/cdk-cors-utils.makeintegrationresponsesallowcors.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [cdk2-cors-utils](./cdk2-cors-utils.md) &gt; [makeIntegrationResponsesAllowCors](./cdk2-cors-utils.makeintegrationresponsesallowcors.md)
3+
[Home](./index.md) &gt; [@codemonger-io/cdk-cors-utils](./cdk-cors-utils.md) &gt; [makeIntegrationResponsesAllowCors](./cdk-cors-utils.makeintegrationresponsesallowcors.md)
44

55
## makeIntegrationResponsesAllowCors() function
66

@@ -17,10 +17,39 @@ export declare function makeIntegrationResponsesAllowCors<T extends apigateway.I
1717

1818
## Parameters
1919

20-
| Parameter | Type | Description |
21-
| --- | --- | --- |
22-
| responses | T\[\] | Integration response settings to allow CORS. |
20+
<table><thead><tr><th>
2321

22+
Parameter
23+
24+
25+
</th><th>
26+
27+
Type
28+
29+
30+
</th><th>
31+
32+
Description
33+
34+
35+
</th></tr></thead>
36+
<tbody><tr><td>
37+
38+
responses
39+
40+
41+
</td><td>
42+
43+
T\[\]
44+
45+
46+
</td><td>
47+
48+
Integration response settings to allow CORS.
49+
50+
51+
</td></tr>
52+
</tbody></table>
2453
**Returns:**
2554

2655
T\[\]

api-docs/markdown/cdk2-cors-utils.makeintegrationresponsesalloworigin.md renamed to api-docs/markdown/cdk-cors-utils.makeintegrationresponsesalloworigin.md

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [cdk2-cors-utils](./cdk2-cors-utils.md) &gt; [makeIntegrationResponsesAllowOrigin](./cdk2-cors-utils.makeintegrationresponsesalloworigin.md)
3+
[Home](./index.md) &gt; [@codemonger-io/cdk-cors-utils](./cdk-cors-utils.md) &gt; [makeIntegrationResponsesAllowOrigin](./cdk-cors-utils.makeintegrationresponsesalloworigin.md)
44

55
## makeIntegrationResponsesAllowOrigin() function
66

@@ -17,11 +17,55 @@ export declare function makeIntegrationResponsesAllowOrigin<T extends apigateway
1717

1818
## Parameters
1919

20-
| Parameter | Type | Description |
21-
| --- | --- | --- |
22-
| responses | T\[\] | Integration response settings to allow an origin. |
23-
| origin | string | Origin to allow. If it does not start with a quotation mark, this function surrounds it with quotation marks. |
20+
<table><thead><tr><th>
2421

22+
Parameter
23+
24+
25+
</th><th>
26+
27+
Type
28+
29+
30+
</th><th>
31+
32+
Description
33+
34+
35+
</th></tr></thead>
36+
<tbody><tr><td>
37+
38+
responses
39+
40+
41+
</td><td>
42+
43+
T\[\]
44+
45+
46+
</td><td>
47+
48+
Integration response settings to allow an origin.
49+
50+
51+
</td></tr>
52+
<tr><td>
53+
54+
origin
55+
56+
57+
</td><td>
58+
59+
string
60+
61+
62+
</td><td>
63+
64+
Origin to allow. If it does not start with a quotation mark, this function surrounds it with quotation marks.
65+
66+
67+
</td></tr>
68+
</tbody></table>
2569
**Returns:**
2670

2771
T\[\]

api-docs/markdown/cdk2-cors-utils.makemethodresponsesallowcors.md renamed to api-docs/markdown/cdk-cors-utils.makemethodresponsesallowcors.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [cdk2-cors-utils](./cdk2-cors-utils.md) &gt; [makeMethodResponsesAllowCors](./cdk2-cors-utils.makemethodresponsesallowcors.md)
3+
[Home](./index.md) &gt; [@codemonger-io/cdk-cors-utils](./cdk-cors-utils.md) &gt; [makeMethodResponsesAllowCors](./cdk-cors-utils.makemethodresponsesallowcors.md)
44

55
## makeMethodResponsesAllowCors() function
66

@@ -17,10 +17,39 @@ export declare function makeMethodResponsesAllowCors<T extends apigateway.Method
1717

1818
## Parameters
1919

20-
| Parameter | Type | Description |
21-
| --- | --- | --- |
22-
| responses | T\[\] | Method response settings to allow CORS. |
20+
<table><thead><tr><th>
2321

22+
Parameter
23+
24+
25+
</th><th>
26+
27+
Type
28+
29+
30+
</th><th>
31+
32+
Description
33+
34+
35+
</th></tr></thead>
36+
<tbody><tr><td>
37+
38+
responses
39+
40+
41+
</td><td>
42+
43+
T\[\]
44+
45+
46+
</td><td>
47+
48+
Method response settings to allow CORS.
49+
50+
51+
</td></tr>
52+
</tbody></table>
2453
**Returns:**
2554

2655
T\[\]

api-docs/markdown/cdk2-cors-utils.makemethodresponsesalloworigin.md renamed to api-docs/markdown/cdk-cors-utils.makemethodresponsesalloworigin.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [cdk2-cors-utils](./cdk2-cors-utils.md) &gt; [makeMethodResponsesAllowOrigin](./cdk2-cors-utils.makemethodresponsesalloworigin.md)
3+
[Home](./index.md) &gt; [@codemonger-io/cdk-cors-utils](./cdk-cors-utils.md) &gt; [makeMethodResponsesAllowOrigin](./cdk-cors-utils.makemethodresponsesalloworigin.md)
44

55
## makeMethodResponsesAllowOrigin() function
66

@@ -17,10 +17,39 @@ export declare function makeMethodResponsesAllowOrigin<T extends apigateway.Meth
1717

1818
## Parameters
1919

20-
| Parameter | Type | Description |
21-
| --- | --- | --- |
22-
| responses | T\[\] | Method response settings to allow an origin. |
20+
<table><thead><tr><th>
2321

22+
Parameter
23+
24+
25+
</th><th>
26+
27+
Type
28+
29+
30+
</th><th>
31+
32+
Description
33+
34+
35+
</th></tr></thead>
36+
<tbody><tr><td>
37+
38+
responses
39+
40+
41+
</td><td>
42+
43+
T\[\]
44+
45+
46+
</td><td>
47+
48+
Method response settings to allow an origin.
49+
50+
51+
</td></tr>
52+
</tbody></table>
2453
**Returns:**
2554

2655
T\[\]
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@codemonger-io/cdk-cors-utils](./cdk-cors-utils.md)
4+
5+
## cdk-cors-utils package
6+
7+
Utilities to configure CORS for [Amazon API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html) with [AWS Cloud Development Kit (CDK)](https://docs.aws.amazon.com/cdk/v2/guide/home.html)<!-- -->.
8+
9+
## Functions
10+
11+
<table><thead><tr><th>
12+
13+
Function
14+
15+
16+
</th><th>
17+
18+
Description
19+
20+
21+
</th></tr></thead>
22+
<tbody><tr><td>
23+
24+
[makeIntegrationResponsesAllowCors(responses)](./cdk-cors-utils.makeintegrationresponsesallowcors.md)
25+
26+
27+
</td><td>
28+
29+
**_(BETA)_** Makes given [IntegrationResponse](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse.html)<!-- -->s allow CORS.
30+
31+
32+
</td></tr>
33+
<tr><td>
34+
35+
[makeIntegrationResponsesAllowOrigin(responses, origin)](./cdk-cors-utils.makeintegrationresponsesalloworigin.md)
36+
37+
38+
</td><td>
39+
40+
**_(BETA)_** Makes given [IntegrationResponse](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IntegrationResponse.html)<!-- -->s allow an origin.
41+
42+
43+
</td></tr>
44+
<tr><td>
45+
46+
[makeMethodResponsesAllowCors(responses)](./cdk-cors-utils.makemethodresponsesallowcors.md)
47+
48+
49+
</td><td>
50+
51+
**_(BETA)_** Makes given [MethodResponse](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.MethodResponse.html)<!-- -->s allow CORS.
52+
53+
54+
</td></tr>
55+
<tr><td>
56+
57+
[makeMethodResponsesAllowOrigin(responses)](./cdk-cors-utils.makemethodresponsesalloworigin.md)
58+
59+
60+
</td><td>
61+
62+
**_(BETA)_** Makes given [MethodResponse](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.MethodResponse.html)<!-- -->s allow an origin.
63+
64+
65+
</td></tr>
66+
</tbody></table>

api-docs/markdown/cdk2-cors-utils.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

api-docs/markdown/index.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,26 @@
66

77
## Packages
88

9-
| Package | Description |
10-
| --- | --- |
11-
| [cdk2-cors-utils](./cdk2-cors-utils.md) | Utilities to configure CORS for [Amazon API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html) with [AWS Cloud Development Kit (CDK)](https://docs.aws.amazon.com/cdk/v2/guide/home.html)<!-- -->. |
9+
<table><thead><tr><th>
1210

11+
Package
12+
13+
14+
</th><th>
15+
16+
Description
17+
18+
19+
</th></tr></thead>
20+
<tbody><tr><td>
21+
22+
[@codemonger-io/cdk-cors-utils](./cdk-cors-utils.md)
23+
24+
25+
</td><td>
26+
27+
Utilities to configure CORS for [Amazon API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html) with [AWS Cloud Development Kit (CDK)](https://docs.aws.amazon.com/cdk/v2/guide/home.html)<!-- -->.
28+
29+
30+
</td></tr>
31+
</tbody></table>

0 commit comments

Comments
 (0)