Skip to content

Commit

Permalink
feat: Add nodejs22.x support (#513)
Browse files Browse the repository at this point in the history
* feat: Add nodejs22.x support

* chore: update comments

* Fix gql app tests and bump happy-dom version

* Update nodejs22.x/cw-event/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/full-stack/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/full-stack/{{cookiecutter.project_name}}/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/cw-event/{{cookiecutter.project_name}}/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/hello-img/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/hello-img/{{cookiecutter.project_name}}/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/sqs/{{cookiecutter.project_name}}/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/step-func/{{cookiecutter.project_name}}/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/step-func/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/web/{{cookiecutter.project_name}}/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/web/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/hello-ts-pt/{{cookiecutter.project_name}}/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/hello-ts/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/hello-ts/{{cookiecutter.project_name}}/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/sqs/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/hello/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/sns/{{cookiecutter.project_name}}/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/hello/{{cookiecutter.project_name}}/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/response-streaming/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/sns/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/response-streaming/{{cookiecutter.project_name}}/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/s3/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/s3/{{cookiecutter.project_name}}/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/scratch/{{cookiecutter.project_name}}/README.md

Co-authored-by: Lucas <[email protected]>

* Update nodejs22.x/scratch/README.md

Co-authored-by: Lucas <[email protected]>

---------

Co-authored-by: Lucas <[email protected]>
  • Loading branch information
hnnasit and lucashuy authored Nov 21, 2024
1 parent a22d509 commit e9255c4
Show file tree
Hide file tree
Showing 229 changed files with 12,308 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build_test_invoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ jobs:
- version: '20'
type: 'Invoke'
file: 'tests/integration/build_invoke/node/test_node_20.py'
- version: '22'
type: 'Test'
file: 'tests/integration/unit_test/test_unit_test_nodejs22_x.py'
- version: '22'
type: 'Invoke'
file: 'tests/integration/build_invoke/node/test_node_22.py'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
116 changes: 116 additions & 0 deletions manifest-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,122 @@
"useCaseName": "Hello World Example"
}
],
"nodejs22.x": [
{
"directory": "nodejs22.x/hello",
"displayName": "Hello World Example",
"dependencyManager": "npm",
"appTemplate": "hello-world",
"packageType": "Zip",
"useCaseName": "Hello World Example"
},
{
"directory": "nodejs22.x/hello-gql",
"displayName": "GraphQLApi Hello World Example",
"dependencyManager": "npm",
"appTemplate": "graphql-api-sample-app",
"packageType": "Zip",
"useCaseName": "GraphQLApi Hello World Example"
},
{
"directory": "nodejs22.x/hello-ts",
"displayName": "Hello World Example TypeScript",
"dependencyManager": "npm",
"appTemplate": "hello-world-typescript",
"packageType": "Zip",
"useCaseName": "Hello World Example"
},
{
"directory": "nodejs22.x/hello-ts-pt",
"displayName": "Hello World Example TypeScript With Powertools for AWS Lambda",
"dependencyManager": "npm",
"appTemplate": "hello-world-powertools-typescript",
"packageType": "Zip",
"useCaseName": "Hello World Example with Powertools for AWS Lambda"
},
{
"directory": "nodejs22.x/step-func",
"displayName": "Step Functions Sample App (Stock Trader)",
"dependencyManager": "npm",
"appTemplate": "step-functions-sample-app",
"packageType": "Zip",
"useCaseName": "Multi-step workflow"
},
{
"directory": "nodejs22.x/scratch",
"displayName": "Quick Start: From Scratch",
"dependencyManager": "npm",
"appTemplate": "quick-start-from-scratch",
"packageType": "Zip",
"useCaseName": "Standalone function"
},
{
"directory": "nodejs22.x/cw-event",
"displayName": "Quick Start: Scheduled Events",
"dependencyManager": "npm",
"appTemplate": "quick-start-cloudwatch-events",
"packageType": "Zip",
"useCaseName": "Scheduled task"
},
{
"directory": "nodejs22.x/s3",
"displayName": "Quick Start: S3",
"dependencyManager": "npm",
"appTemplate": "quick-start-s3",
"packageType": "Zip",
"useCaseName": "Data processing"
},
{
"directory": "nodejs22.x/sns",
"displayName": "Quick Start: SNS",
"dependencyManager": "npm",
"appTemplate": "quick-start-sns",
"packageType": "Zip",
"useCaseName": "Data processing"
},
{
"directory": "nodejs22.x/sqs",
"displayName": "Quick Start: SQS",
"dependencyManager": "npm",
"appTemplate": "quick-start-sqs",
"packageType": "Zip",
"useCaseName": "Data processing"
},
{
"directory": "nodejs22.x/web",
"displayName": "Quick Start: Web Backend",
"dependencyManager": "npm",
"appTemplate": "quick-start-web",
"packageType": "Zip",
"useCaseName": "Serverless API"
},
{
"directory": "nodejs22.x/full-stack",
"displayName": "Quick Start: Full Stack Application",
"dependencyManager": "npm",
"appTemplate": "quick-start-full-stack",
"packageType": "Zip",
"useCaseName": "Full Stack"
},
{
"directory": "nodejs22.x/response-streaming",
"displayName": "Lambda function using Response Streaming",
"dependencyManager": "npm",
"appTemplate": "response-streaming",
"packageType": "Zip",
"useCaseName": "Lambda Response Streaming"
}
],
"amazon/nodejs22.x-base": [
{
"directory": "nodejs22.x/hello-img",
"displayName": "Hello World Image Example",
"dependencyManager": "npm",
"appTemplate": "hello-world-lambda-image",
"packageType": "Image",
"useCaseName": "Hello World Example"
}
],
"python3.8": [
{
"directory": "python3.8/hello",
Expand Down
229 changes: 229 additions & 0 deletions nodejs22.x/cw-event/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@

# Created by https://www.toptal.com/developers/gitignore/api/osx,linux,python,windows,sam
# Edit at https://www.toptal.com/developers/gitignore?templates=osx,linux,python,windows,sam

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### OSX ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
pytestdebug.log

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
doc/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
#poetry.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
# .env
.env/
.venv/
env/
venv/
ENV/
env.bak/
venv.bak/
pythonenv*

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# operating system-related files
# file properties cache/storage on macOS
*.DS_Store
# thumbnail cache on Windows
Thumbs.db

# profiling data
.prof


### SAM ###
# Ignore build directories for the AWS Serverless Application Model (SAM)
# Info: https://aws.amazon.com/serverless/sam/
# Docs: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-reference.html

**/.aws-sam

### Windows ###
# Windows thumbnail cache files
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/osx,linux,python,windows,sam
Expand Down
20 changes: 20 additions & 0 deletions nodejs22.x/cw-event/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Cookiecutter NodeJS CloudWatch Events Quick Start Application

A cookiecutter template to create a NodeJS CloudWatch Events Quick Start Application using [Serverless Application Model (SAM)](https://github.com/awslabs/serverless-application-model).

## Requirements

* [AWS SAM CLI](https://github.com/awslabs/aws-sam-cli)

## Usage

Generate a boilerplate template in your current project directory using the following syntax:

* **NodeJS 22**: `sam init --runtime nodejs22.x --app-template quick-start-cloudwatch-events --name cwe-app`

> **NOTE**: ``--name`` allows you to specify a different project folder name
# Credits

* This project has been generated with [Cookiecutter](https://github.com/audreyr/cookiecutter)

10 changes: 10 additions & 0 deletions nodejs22.x/cw-event/cookiecutter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"project_name": "Name of the project",
"runtime": "nodejs22.x",
"architectures": {
"value": ["x86_64", "arm64"]
},
"_copy_without_render": [
".gitignore"
]
}
Loading

0 comments on commit e9255c4

Please sign in to comment.