Skip to content

Commit e61f9a7

Browse files
authored
Merge branch 'master' into dynamodb-global-update-replace
2 parents da275eb + 278fba5 commit e61f9a7

File tree

92 files changed

+4044
-569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+4044
-569
lines changed

.github/workflows/auto-approve.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Approve PRs with "pr/auto-approve". mergify takes care of the actual merge.
22

33
name: auto-approve
4-
on: pull_request
4+
on:
5+
pull_request:
6+
types: [ labeled, unlabeled, opened, synchronize, reopened, ready_for_review, review_requested ]
57

68
jobs:
79
auto-approve:

.github/workflows/pr-linter.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22
# https://github.com/actions/toolkit/blob/master/packages/github/src/context.ts
33

44
name: PR Linter
5-
on: pull_request
5+
on:
6+
pull_request:
7+
types:
8+
- labeled
9+
- unlabeled
10+
- edited
11+
- opened
12+
- synchronize
13+
- reopened
614

715
jobs:
816
validate-pr:

.github/workflows/yarn-upgrade.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: actions/checkout@v2
1717

1818
- name: Set up Node
19-
uses: actions/[email protected].4
19+
uses: actions/[email protected].5
2020
with:
2121
node-version: 10
2222

pack.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ for dir in $(find packages -name dist | grep -v node_modules | grep -v run-wrapp
6363
rsync -a $dir/ ${distdir}/
6464
done
6565

66+
# Record the dependency order of NPM packages into a file
67+
# (This file will be opportunistically used during publishing)
68+
#
69+
# Manually sort 'aws-cdk' to the end, as the 'cdk init' command has implicit dependencies
70+
# on other packages (that should not appear in 'package.json' and so
71+
# there is no way to tell lerna about these).
72+
for dir in $(lerna ls --toposort -p | grep -v packages/aws-cdk) $PWD/packages/aws-cdk; do
73+
(cd $dir/dist/js && ls >> ${distdir}/js/npm-publish-order.txt) || true
74+
done
75+
6676
# Remove a JSII aggregate POM that may have snuk past
6777
rm -rf dist/java/software/amazon/jsii
6878

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"fs-extra": "^9.1.0",
1919
"graceful-fs": "^4.2.6",
2020
"jest-junit": "^12.0.0",
21-
"jsii-diff": "^1.23.0",
22-
"jsii-pacmak": "^1.23.0",
23-
"jsii-rosetta": "^1.23.0",
21+
"jsii-diff": "^1.24.0",
22+
"jsii-pacmak": "^1.24.0",
23+
"jsii-rosetta": "^1.24.0",
2424
"lerna": "^3.22.1",
2525
"standard-version": "^9.1.1",
2626
"typescript": "~3.9.9"

packages/@aws-cdk/assert/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"cdk-build-tools": "0.0.0",
2626
"jest": "^26.6.3",
2727
"pkglint": "0.0.0",
28-
"ts-jest": "^26.5.2"
28+
"ts-jest": "^26.5.3"
2929
},
3030
"dependencies": {
3131
"@aws-cdk/cloud-assembly-schema": "0.0.0",

packages/@aws-cdk/assets/lib/fs/options.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export interface CopyOptions {
1010
* A strategy for how to handle symlinks.
1111
*
1212
* @default Never
13+
* @deprecated use `followSymlinks` instead
1314
*/
1415
readonly follow?: FollowMode;
1516

packages/@aws-cdk/aws-apigatewayv2-integrations/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
- [Lambda Integration](#lambda)
2222
- [HTTP Proxy Integration](#http-proxy)
2323
- [Private Integration](#private-integration)
24+
- [WebSocket APIs](#websocket-apis)
25+
- [Lambda WebSocket Integration](#lambda-websocket-integration)
2426

2527
## HTTP APIs
2628

@@ -146,3 +148,32 @@ const httpEndpoint = new HttpApi(stack, 'HttpProxyPrivateApi', {
146148
}),
147149
});
148150
```
151+
152+
## WebSocket APIs
153+
154+
WebSocket integrations connect a route to backend resources. The following integrations are supported in the CDK.
155+
156+
### Lambda WebSocket Integration
157+
158+
Lambda integrations enable integrating a WebSocket API route with a Lambda function. When a client connects/disconnects
159+
or sends message specific to a route, the API Gateway service forwards the request to the Lambda function
160+
161+
The API Gateway service will invoke the lambda function with an event payload of a specific format.
162+
163+
The following code configures a `sendmessage` route with a Lambda integration
164+
165+
```ts
166+
const webSocketApi = new WebSocketApi(stack, 'mywsapi');
167+
new WebSocketStage(stack, 'mystage', {
168+
webSocketApi,
169+
stageName: 'dev',
170+
autoDeploy: true,
171+
});
172+
173+
const messageHandler = new lambda.Function(stack, 'MessageHandler', {...});
174+
webSocketApi.addRoute('sendmessage', {
175+
integration: new LambdaWebSocketIntegration({
176+
handler: connectHandler,
177+
}),
178+
});
179+
```

packages/@aws-cdk/aws-apigatewayv2-integrations/lib/http/lambda.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class LambdaProxyIntegration implements IHttpRouteIntegration {
4141
principal: new ServicePrincipal('apigateway.amazonaws.com'),
4242
sourceArn: Stack.of(route).formatArn({
4343
service: 'execute-api',
44-
resource: route.httpApi.httpApiId,
44+
resource: route.httpApi.apiId,
4545
resourceName: `*/*${route.path ?? ''}`, // empty string in the case of the catch-all route $default
4646
}),
4747
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from './http';
2+
export * from './websocket';

0 commit comments

Comments
 (0)