Skip to content

Commit

Permalink
refactor: relay to use hono
Browse files Browse the repository at this point in the history
  • Loading branch information
dalechyn committed Mar 25, 2024
1 parent b75beb8 commit 4fc586c
Show file tree
Hide file tree
Showing 40 changed files with 1,844 additions and 2,557 deletions.
4 changes: 4 additions & 0 deletions apps/relay/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CORS_ORIGIN="*"
REDIS_URL=redis://127.0.0.1:6379
CHANNEL_TTL=3600
AUTH_KEY=super_dev_key
1 change: 0 additions & 1 deletion apps/relay/.env.test
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
AUTH_KEY="some-shared-secret"
LOG_LEVEL="error"
1 change: 0 additions & 1 deletion apps/relay/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion apps/relay/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @farcaster/auth-relay
# @farcaster/relay

## 0.0.9

Expand Down
2 changes: 1 addition & 1 deletion apps/relay/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `@farcaster/auth-relay`
# `@farcaster/relay`

Farcaster Auth HTTP relay server.

Expand Down
21 changes: 0 additions & 21 deletions apps/relay/biome.json

This file was deleted.

12 changes: 0 additions & 12 deletions apps/relay/fastify.d.ts

This file was deleted.

34 changes: 19 additions & 15 deletions apps/relay/package.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
{
"name": "@farcaster/auth-relay",
"name": "@farcaster/relay",
"version": "0.0.9",
"description": "Farcaster Auth relay server",
"private": true,
"type": "commonjs",
"scripts": {
"build": "tsc --project ./tsconfig.json",
"lint": "biome format src/ --write && biome check src/ --apply",
"lint:ci": "biome ci src/",
"test": "pnpm build && DOTENV_CONFIG_PATH=.env.test jest",
"dev": "dotenv -e .env -c development tsx watch src/index.ts",
"build": "pnpm run clean && pnpm run build:esm+types",
"build:esm+types": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationMap --declarationDir ./dist/types",
"clean": "rimraf dist tsconfig.tsbuildinfo actions clients contracts errors utils",
"test": "pnpm build && dotenv -e .env -c test jest",
"typecheck": "tsc --noEmit",
"test:build": "publint --strict",
"test:ci": "pnpm build && ENVIRONMENT=test NODE_OPTIONS=\"--max-old-space-size=4096\" DOTENV_CONFIG_PATH=.env.test jest --ci --forceExit --coverage",
"start": "pnpm build && node build/app.js start"
},
"engines": {
"node": ">=18"
},
"dependencies": {
"@farcaster/core": "^0.13.4",
"@fastify/cors": "^8.4.2",
"@fastify/rate-limit": "^9.0.1",
"axios": "^1.6.2",
"dotenv": "^16.3.1",
"ethers": "^6.0.8",
"fastify": "^4.24.3",
"@farcaster/core": "^0.13.8",
"@fastify/rate-limit": "^9.1.0",
"ethers": "^6.11.1",
"hono": "^4.1.3",
"hono-rate-limiter": "^0.2.2",
"ioredis": "^5.3.2",
"neverthrow": "^6.1.0",
"siwe": "^2.1.4",
"viem": "^2.5.0"
"viem": "^2.8.18",
"zod": "^3.22.4",
"zod-validation-error": "^3.0.3"
},
"devDependencies": {
"jest": "^29.7.0"
"dotenv-cli": "^7.1.0",
"jest": "^29.7.0",
"tsx": "^4.7.1"
}
}
90 changes: 0 additions & 90 deletions apps/relay/src/addresses.ts

This file was deleted.

8 changes: 0 additions & 8 deletions apps/relay/src/app.ts

This file was deleted.

95 changes: 0 additions & 95 deletions apps/relay/src/channels.test.ts

This file was deleted.

Loading

0 comments on commit 4fc586c

Please sign in to comment.