Skip to content

Commit 1e83ae2

Browse files
Merge pull request #19 from depot/lambda
2 parents 93475f4 + 73e4be2 commit 1e83ae2

22 files changed

+2470
-1982
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist/
2+
node_modules/
3+
.env*
4+
*.log

.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# AWS Configuration
2+
AWS_REGION=us-east-1
3+
TABLE_NAME=oidc-data
4+
5+
# Application secrets (these would be stored in AWS Secrets Manager or Parameter Store)
6+
ADMIN_TOKEN=your-admin-token
7+
GITHUB_TOKEN=your-github-token

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM node:22 AS build
2+
3+
RUN npm i -g corepack@latest
4+
RUN corepack enable
5+
WORKDIR /app
6+
COPY package.json pnpm-lock.yaml ./
7+
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile
8+
COPY . .
9+
RUN pnpm run build
10+
11+
FROM node:22 AS deps
12+
13+
RUN npm i -g corepack@latest
14+
RUN corepack enable
15+
WORKDIR /app
16+
COPY package.json pnpm-lock.yaml ./
17+
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile --prod
18+
19+
FROM public.ecr.aws/lambda/nodejs:22
20+
21+
WORKDIR ${LAMBDA_TASK_ROOT}
22+
COPY package.json ./
23+
COPY --from=deps /app/node_modules node_modules
24+
COPY --from=build /app/dist/index.mjs ./
25+
ENV NODE_ENV production
26+
CMD ["index.handler"]

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Depot Technologies, Inc. <[email protected]>
3+
Copyright (c) 2023-2025 Depot Technologies, Inc. <[email protected]>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

client/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
},
1616
"dependencies": {
1717
"@actions/core": "^1.11.1",
18-
"@actions/github": "^6.0.0",
18+
"@actions/github": "^6.0.1",
1919
"@actions/http-client": "^2.2.3"
2020
},
2121
"devDependencies": {
22-
"esbuild": "^0.25.0",
23-
"typescript": "^5.7.2"
22+
"esbuild": "^0.25.9",
23+
"typescript": "^5.9.2"
2424
},
2525
"publishConfig": {
2626
"access": "public"

depot.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"id": "l73lv7j4c2"}

package.json

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,39 @@
11
{
2+
"type": "module",
23
"private": true,
34
"packageManager": "[email protected]",
45
"scripts": {
5-
"deploy": "wrangler deploy",
6-
"dev": "wrangler dev",
7-
"logs": "wrangler tail",
6+
"build": "rm -rf dist && esbuild src/index.ts --bundle --platform=node --target=node22 --format=esm --packages=external --outfile=dist/index.mjs",
7+
"clean": "rm -rf dist",
88
"refresh-session": "tsx support/refresh-session.ts",
99
"refresh-session:local": "env OTP=\"$(op item get --vault 'actions-oidc' 'GitHub - depot-public-oidc' --otp)\" USERNAME=depot-public-oidc PASSWORD=\"$(op item get --vault 'actions-oidc' 'GitHub - depot-public-oidc' --fields password --reveal)\" LOCAL=true tsx support/refresh-session.ts"
1010
},
1111
"dependencies": {
12-
"@github/stable-socket": "^1.1.1",
13-
"@octokit/request": "^9.1.3",
14-
"@sentry/node": "^10.0.0",
12+
"@aws-sdk/client-dynamodb": "^3.888.0",
13+
"@aws-sdk/lib-dynamodb": "^3.888.0",
14+
"@hono/otel": "^0.5.0",
15+
"@octokit/request": "^10.0.3",
16+
"@opentelemetry/api": "^1.9.0",
17+
"@opentelemetry/exporter-trace-otlp-http": "^0.205.0",
18+
"@opentelemetry/sdk-node": "^0.205.0",
19+
"@opentelemetry/sdk-trace-node": "^2.1.0",
20+
"@sentry/node": "^10.11.0",
1521
"abort-controller-x": "^0.4.3",
1622
"date-fns": "^4.1.0",
17-
"hono": "^4.6.13",
23+
"hono": "^4.9.7",
1824
"rfc4648": "^1.5.4",
19-
"zod": "^3.24.1"
25+
"zod": "^4.1.8"
2026
},
2127
"devDependencies": {
22-
"@cloudflare/workers-types": "^4.20250311.0",
2328
"@octokit/webhooks-types": "^7.6.1",
24-
"playwright": "^1.49.1",
25-
"prettier": "^3.4.2",
26-
"prettier-plugin-organize-imports": "^4.1.0",
27-
"prettier-plugin-pkg": "^0.18.1",
28-
"tsx": "^4.19.2",
29-
"typescript": "^5.7.2",
30-
"wrangler": "^3.114.1"
29+
"@types/node": "^24.3.3",
30+
"esbuild": "^0.25.9",
31+
"playwright": "^1.55.0",
32+
"prettier": "^3.6.2",
33+
"prettier-plugin-organize-imports": "^4.2.0",
34+
"prettier-plugin-pkg": "^0.21.2",
35+
"tsx": "^4.20.5",
36+
"typescript": "^5.9.2"
3137
},
3238
"prettier": {
3339
"bracketSpacing": false,

0 commit comments

Comments
 (0)