Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions .github/workflows/test-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,41 @@ on:
- ".github/workflows/test-node.yml"
- "api/**"
workflow_dispatch:
defaults:
run:
working-directory: ./api
jobs:
test:
test-api:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./api
env:
AWS_ACCESS_KEY_ID: ci
AWS_SECRET_ACCESS_KEY: ci
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 24.x
cache: "npm"
cache-dependency-path: 'api/package-lock.json'
cache-dependency-path: "api/package-lock.json"
- run: npm ci
- name: Check code style
run: npm run lint && npm run prettier
- name: Run tests
run: npm run test:coverage
- name: Validate OpenAPI spec
run: npm run validate-spec
test-mcp:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./mcp
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 24.x
cache: "npm"
cache-dependency-path: "mcp/package-lock.json"
- run: npm ci
- name: Run tests
run: npm run test:coverage
8 changes: 4 additions & 4 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
nodejs 20.15.0
java corretto-19.0.1.10.1
nodejs 24.11.1
java corretto-19.0.1.10.1
aws-sam-cli 1.148.0
python 3.12.2
uv 0.9.5
python 3.12.2
uv 0.9.5
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ help:
echo "make serve-https | run the SAM server locally (HTTPS on port 3002)"
echo "make style-node | run node code style check"
echo "make style-python | run python code style check"
echo "make test-mcp | run mcp tests"
echo "make test-node | run node tests"
echo "make test-python | run python tests"
echo "make cover-node | run node tests with coverage"
Expand Down Expand Up @@ -68,7 +69,14 @@ deps-api:
deps-av-download:
cd av-download/lambdas ;\
npm list >/dev/null 2>&1 || npm ci
deps-node: deps-api deps-av-download
deps-mcp:
cd mcp ;\
npm list >/dev/null 2>&1 ;\
deps=$$? ;\
test $$deps -eq 0 || npm ci
test-mcp: deps-mcp
cd mcp && npm test
deps-node: deps-api deps-av-download deps-mcp
cover-node: deps-node
cd api && npm run test:coverage
style-node: deps-node
Expand Down Expand Up @@ -151,7 +159,7 @@ serve-docs:
BUMP ?= ""
version:
@if [[ -n "$(BUMP)" ]]; then \
for pkg in api api/dependencies api/src av-download/lambdas; do \
for pkg in api api/dependencies api/src av-download/lambdas mcp mcp/apps/mcp; do \
echo -n "Bumping version in $$pkg: " >&2 ; \
(cd $$pkg && npm version $(BUMP)) >&2; \
done; \
Expand Down
4 changes: 2 additions & 2 deletions api/dependencies/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/dependencies/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dc-api-dependencies",
"version": "2.9.5",
"version": "2.10.0",
"description": "NUL Digital Collections API Dependencies",
"repository": "https://github.com/nulib/dc-api-v2",
"author": "nulib",
Expand Down
4 changes: 2 additions & 2 deletions api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dc-api-build",
"version": "2.9.5",
"version": "2.10.0",
"description": "NUL Digital Collections API Build Environment",
"repository": "https://github.com/nulib/dc-api-v2",
"author": "nulib",
Expand Down
9 changes: 7 additions & 2 deletions api/src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dc-api",
"version": "2.9.5",
"version": "2.10.0",
"description": "NUL Digital Collections API",
"repository": "https://github.com/nulib/dc-api-v2",
"author": "nulib",
Expand Down
46 changes: 34 additions & 12 deletions api/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Description: dc-api-v2 API
Globals:
Function:
CodeUri: ./src
Runtime: nodejs20.x
Runtime: nodejs24.x
Architectures:
- x86_64
MemorySize: 128
Expand Down Expand Up @@ -118,9 +118,9 @@ Parameters:
Conditions:
CustomConfigSecret:
Fn::Not:
- Fn::Equals:
- !Ref ApiConfigPrefix
- ""
- Fn::Equals:
- !Ref ApiConfigPrefix
- ""
DeployAPI:
Fn::Equals: [!Ref DeployAPI, "true"]
DeployAVDownload:
Expand All @@ -129,8 +129,8 @@ Conditions:
Fn::Equals: [!Ref DeployChat, "true"]
WriteSecret:
Fn::Equals:
- !Ref WriteConfigSecret
- true
- !Ref WriteConfigSecret
- true
Resources:
#* apiDependencies:
#* Type: AWS::Serverless::LayerVersion
Expand All @@ -148,7 +148,7 @@ Resources:
Type: AWS::SecretsManager::Secret
Condition: WriteSecret
Properties:
Name:
Name:
Fn::If:
- CustomConfigSecret
- !Sub "${ApiConfigPrefix}/config/dcapi"
Expand Down Expand Up @@ -471,10 +471,10 @@ Resources:
Type: AWS::Serverless::Function
Properties:
Handler: handlers/get-provider-capabilities.handler
Description: boolean to indicate whether auth provider currently supports feature
Description: boolean to indicate whether auth provider currently supports feature
#* Layers:
#* - !Ref apiDependencies
Environment:
Environment:
Variables:
PROVIDER_CAPABILITIES: !Ref ProviderCapabilities
Policies:
Expand Down Expand Up @@ -740,6 +740,28 @@ Resources:
ApiId: !Ref dcApi
Path: /oai
Method: POST
mcpFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: ../mcp
Handler: mcp/lambda.handler
Runtime: nodejs24.x
Environment:
Variables:
SECRETS_PATH: !Ref SecretsPath
Timeout: 30
MemorySize: 256
Policies:
- !Ref SecretsPolicy
Events:
ApiEvent:
Type: HttpApi
Properties:
ApiId: !Ref dcApi
Path: /mcp
Method: any
Metadata:
BuildMethod: makefile
chatWebsocketEndpoint:
Type: AWS::Serverless::Function
Condition: DeployChat
Expand All @@ -749,8 +771,8 @@ Resources:
#* Layers:
#* - !Ref apiDependencies
Environment:
Variables:
WEBSOCKET_URI: !Ref ChatWebSocketURI
Variables:
WEBSOCKET_URI: !Ref ChatWebSocketURI
Policies:
- !Ref SecretsPolicy
Events:
Expand Down Expand Up @@ -794,7 +816,7 @@ Resources:
Path: /chat/feedback
Method: POST
chatFeedbackBucket:
Type: 'AWS::S3::Bucket'
Type: "AWS::S3::Bucket"
chatFeedbackTopic:
Type: AWS::SNS::Topic
Properties:
Expand Down
6 changes: 4 additions & 2 deletions av-download/lambdas/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion av-download/lambdas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lambdas",
"version": "2.9.5",
"version": "2.10.0",
"description": "Non-API handler lambdas",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
2 changes: 1 addition & 1 deletion chat/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "dc-api-v2-chat"
version = "2.9.5"
version = "2.10.0"
requires-python = ">=3.12"
dependencies = [
"boto3~=1.34",
Expand Down
5 changes: 4 additions & 1 deletion chat/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "dc-api-v2-docs"
version = "2.9.5"
version = "2.10.0"
requires-python = ">=3.12"
dependencies = [
"mkdocs>=1.1.2,<2.0.0",
Expand Down
Loading
Loading