Skip to content

Commit 5da933d

Browse files
authored
Merge branch 'main' into feat/jmespath_tests
2 parents 4f5a3d1 + b54eb9c commit 5da933d

File tree

90 files changed

+2386
-2321
lines changed

Some content is hidden

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

90 files changed

+2386
-2321
lines changed

.github/boring-cyborg.yml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,7 @@ labelPRBasedOnFilePath:
7171
- docs/**/*
7272
- mkdocs.yml
7373
- typedoc.js
74-
- examples/cdk/bin/*
75-
- examples/cdk/functions/*
76-
- examples/cdk/functions/**/*
77-
- examples/cdk/src/*
78-
- examples/cdk/src/**/*
79-
- examples/cdk/tests/*
80-
- examples/cdk/tests/**/*
81-
- examples/cdk/README.md
82-
- examples/cdk/cdk.json
83-
- examples/sam/events/*
84-
- examples/sam/src/*
85-
- examples/sam/src/**/*
86-
- examples/sam/tests/*
87-
- examples/sam/tests/**/*
88-
- examples/sam/README.md
89-
- examples/sam/template.yaml
74+
- examples/app/*
9075

9176
area/automation:
9277
- .github/scripts/*
@@ -137,8 +122,7 @@ labelPRBasedOnFilePath:
137122
- packages/parser/README.md
138123
- layers/tsconfig*.json
139124
- layers/README.md
140-
- examples/sam/tsconfig*.json
141-
- examples/cdk/tsconfig*.json
125+
- examples/app/tsconfig*.json
142126

143127
type/dependencies:
144128
- package.json
@@ -153,8 +137,7 @@ labelPRBasedOnFilePath:
153137
- packages/validator/package.json
154138
- packages/batch/package.json
155139
- layers/package.json
156-
- examples/cdk/package.json
157-
- examples/sam/package.json
140+
- examples/app/package.json
158141

159142
##### Greetings ########################################################################################################
160143
firstPRWelcomeComment: >

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
- name: 'Checkout Repository'
2020
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
2121
- name: 'Dependency Review'
22-
uses: actions/dependency-review-action@0fa40c3c10055986a88de3baa0d6ec17c5a894b3 # v4.2.3
22+
uses: actions/dependency-review-action@5bbc3ba658137598168acb2ab73b21c432dd411b # v4.2.5

.github/workflows/reusable-run-linting-check-and-unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
NODE_ENV: dev
3838
strategy:
3939
matrix:
40-
example: ["sam", "cdk"]
40+
example: ["app"]
4141
fail-fast: false
4242
defaults:
4343
run:

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ site
4141
# Generated API documentation (from TypeDoc)
4242
/api
4343

44-
# SAM Example copies files
45-
/examples/sam/src/handlers/*
46-
!/examples/sam/src/handlers/COPY_LAMBDA_FUNCTIONS_HERE
47-
4844
# Layer temp files
4945
tmp
5046

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ Or refer to the installation guide of each utility:
8484

8585
### Examples
8686

87-
* [CDK](https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/examples/cdk)
88-
* [SAM](https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/examples/sam)
87+
You can find examples of how to use Powertools for AWS Lambda (TypeScript) in the [examples](https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/examples/app) directory. The application is a simple REST API that can be deployed via either AWS CDK or AWS SAM.
8988

9089
### Demo applications
9190

docs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# version 9.5.2
2-
FROM squidfunk/mkdocs-material@sha256:6c81a890d0b5a59cc36e53684ae696995aa1f526f1406106f9bfec49d5031581
2+
FROM squidfunk/mkdocs-material@sha256:33076657e536b6b8439168296a193098aef3c4c88cc2cecd0736cd391b90e7fd
33

44
ADD requirements.txt /tmp/
55
RUN pip install --require-hashes -r /tmp/requirements.txt

docs/contributing/conventions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Whenever possible, we use the same directory structure for all utilities. This m
3131
There are also a few other workspaces that are not utilities published to npm, but that still share dependencies and/or runtime code with the utilities. These workspaces are:
3232

3333
* `docs/snippets`: contains the documentation code snippets
34-
* `examples/*`: contains the example projects deployed via AWS CDK or AWS SAM
34+
* `examples/app`: contains an example project that can be deployed via AWS CDK or AWS SAM
3535
* `layers`: contains the code used to build and publish the [Lambda layers](../index.md#lambda-layer)
3636

3737
## Testing definition

docs/index.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,9 @@ The examples in this documentation will feature all the approaches described abo
272272

273273
## Examples
274274

275-
The project's repository includes examples of how to instrument your functions both in AWS CDK and AWS SAM:
275+
You can find examples of how to use Powertools for AWS Lambda (TypeScript) in the [examples](https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/examples/app){target="_blank"} directory. The application is a simple REST API that can be deployed via either AWS CDK or AWS SAM.
276276

277-
* [AWS CDK](https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/examples/cdk){target="_blank"}
278-
* [AWS SAM](https://github.com/aws-powertools/powertools-lambda-typescript/tree/main/examples/sam){target="_blank"}
279-
280-
If instead you want to see Powertools for AWS Lambda (TypeScript) in a slightly more complex use case, check the [Serverless TypeScript Demo](https://github.com/aws-samples/serverless-typescript-demo) or the [AWS Lambda performance tuning](https://github.com/aws-samples/optimizations-for-lambda-functions) repository. Both demos use Powertools for AWS Lambda (TypeScript) as well as demonstrating other common techniques for Lambda functions written in TypeScript.
277+
If instead you want to see Powertools for AWS Lambda (TypeScript) in slightly different use cases, check the [Serverless TypeScript Demo](https://github.com/aws-samples/serverless-typescript-demo) or the [AWS Lambda performance tuning](https://github.com/aws-samples/optimizations-for-lambda-functions) repository. Both demos use Powertools for AWS Lambda (TypeScript) as well as demonstrating other common techniques for Lambda functions written in TypeScript.
281278

282279

283280
## Features

docs/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
mike==1.1.2
2-
mkdocs-material==9.5.14
2+
mkdocs-material==9.5.15
33
mkdocs-git-revision-date-plugin==0.3.2
44
mkdocs-exclude==1.0.2

docs/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ mkdocs-exclude==1.0.2 \
229229
mkdocs-git-revision-date-plugin==0.3.2 \
230230
--hash=sha256:2e67956cb01823dd2418e2833f3623dee8604cdf223bddd005fe36226a56f6ef
231231
# via -r requirements.in
232-
mkdocs-material==9.5.14 \
233-
--hash=sha256:2a1f8e67cda2587ab93ecea9ba42d0ca61d1d7b5fad8cf690eeaeb39dcd4b9af \
234-
--hash=sha256:a45244ac221fda46ecf8337f00ec0e5cb5348ab9ffb203ca2a0c313b0d4dbc27
232+
mkdocs-material==9.5.15 \
233+
--hash=sha256:39f03cca45e82bf54eb7456b5a18bd252eabfdd67f237a229471484a0a4d4635 \
234+
--hash=sha256:e5c96dec3d19491de49ca643fc1dbb92b278e43cdb816c775bc47db77d9b62fb
235235
# via -r requirements.in
236236
mkdocs-material-extensions==1.3.1 \
237237
--hash=sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443 \

examples/cdk/.gitignore renamed to examples/app/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,13 @@ node_modules
88
.cdk.staging
99
cdk.out
1010
lib
11+
# npm lock file - this is managed by the npm workspace
12+
package-lock.json
13+
14+
**/.aws-sam
15+
16+
# SAM
17+
samconfig.toml
18+
1119
# npm lock file - this is managed by the npm workspace
1220
package-lock.json
File renamed without changes.
File renamed without changes.

examples/cdk/cdk.json renamed to examples/app/cdk.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"app": "npx ts-node --prefer-ts-exts bin/cdk-app.ts",
2+
"app": "tsx cdk/example-app.ts",
33
"watch": {
44
"include": [
55
"**"

examples/app/cdk/example-app.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env node
2+
import 'source-map-support/register';
3+
import { App } from 'aws-cdk-lib';
4+
import { PowertoolsExampleStack } from './example-stack.js';
5+
6+
const app = new App();
7+
new PowertoolsExampleStack(app, 'PowertoolsTypeScript-Example-CDK', {});

0 commit comments

Comments
 (0)