Scratch space for learning atproto app development

more tidy

dholms b186646a 5d629914

-37
.github/renovate.json
···
-
{
-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
-
"extends": ["config:recommended", "customManagers:biomeVersions"],
-
"labels": ["chore: dependencies"],
-
"dependencyDashboard": true,
-
"lockFileMaintenance": {
-
"enabled": true
-
},
-
"packageRules": [
-
{
-
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
-
"groupName": "all non-major dependencies",
-
"groupSlug": "all-minor-patch",
-
"automerge": true
-
},
-
{
-
"matchPackageNames": ["@biomejs/biome"],
-
"groupName": "biome",
-
"groupSlug": "biome",
-
"automerge": true
-
},
-
{
-
"matchPackageNames": ["@commitlint/cli", "@commitlint/config-conventional"],
-
"groupName": "commitlint",
-
"groupSlug": "commitlint",
-
"automerge": true
-
},
-
{
-
"packagePatterns": ["@types", "typescript"],
-
"groupName": "typescript"
-
},
-
{
-
"packagePatterns": ["@vitest", "vitest"],
-
"groupName": "vitest"
-
}
-
]
-
}
···
-26
.github/workflows/build.yml
···
-
name: Build
-
-
on:
-
push:
-
branches: ["master"]
-
pull_request:
-
branches: ["master"]
-
-
jobs:
-
build:
-
runs-on: ubuntu-latest
-
-
steps:
-
- uses: actions/checkout@v4
-
-
- name: Use the latest stable Node.js
-
uses: actions/setup-node@v4
-
with:
-
node-version-file: '.nvmrc'
-
cache: "npm"
-
-
- name: Install Dependencies
-
run: npm ci
-
-
- name: Run Build
-
run: npm run build
···
-22
.github/workflows/code-quality.yml
···
-
name: Code Quality
-
-
on:
-
push:
-
branches: ["master"]
-
pull_request:
-
branches: ["master"]
-
-
jobs:
-
quality:
-
runs-on: ubuntu-latest
-
steps:
-
- name: Checkout
-
uses: actions/checkout@v4
-
-
- name: Setup Biome
-
uses: biomejs/setup-biome@v2
-
with:
-
version: latest
-
-
- name: Run Biome
-
run: biome ci .
···
-38
.github/workflows/docker-image.yml
···
-
name: Docker Image CI
-
-
on:
-
push:
-
branches: ["master"]
-
pull_request:
-
branches: ["master"]
-
-
jobs:
-
build:
-
runs-on: ubuntu-latest
-
-
steps:
-
- uses: actions/checkout@v4
-
-
# Login step only executed for pushes to main
-
- name: Login to GitHub Container Registry
-
if: github.ref == 'refs/heads/master'
-
uses: docker/login-action@v3
-
with:
-
registry: ghcr.io
-
username: ${{ github.actor }}
-
password: ${{ secrets.GH_Token }}
-
-
# Build and tag the production Docker image
-
- name: Build the Docker image
-
run: |
-
docker build . --file Dockerfile --tag ghcr.io/${{ github.repository }}:${{ github.sha }}
-
if [ "${{ github.ref }}" == "refs/heads/master" ]; then
-
docker tag ghcr.io/${{ github.repository }}:${{ github.sha }} ghcr.io/${{ github.repository }}:latest
-
fi
-
-
# Push the production Docker image
-
- name: Push the Docker image
-
if: github.ref == 'refs/heads/master'
-
run: |
-
docker push ghcr.io/${{ github.repository }}:${{ github.sha }}
-
docker push ghcr.io/${{ github.repository }}:latest
···
-26
.github/workflows/test.yml
···
-
name: Test
-
-
on:
-
push:
-
branches: ["master"]
-
pull_request:
-
branches: ["master"]
-
-
jobs:
-
build:
-
runs-on: ubuntu-latest
-
-
steps:
-
- uses: actions/checkout@v4
-
-
- name: Use the latest stable Node.js
-
uses: actions/setup-node@v4
-
with:
-
node-version-file: '.nvmrc'
-
cache: "npm"
-
-
- name: Install Dependencies
-
run: npm ci
-
-
- name: Run Test
-
run: npm run test
···
src/common/middleware/errorHandler.ts src/middleware/errorHandler.ts
src/common/middleware/requestLogger.ts src/middleware/requestLogger.ts
src/common/utils/envConfig.ts src/env.ts
+3 -3
src/server.ts
···
import helmet from "helmet";
import { pino } from "pino";
-
import errorHandler from "#/common/middleware/errorHandler";
-
import requestLogger from "#/common/middleware/requestLogger";
-
import { env } from "#/common/utils/envConfig";
import { createDb, migrateToLatest } from "#/db";
import { Ingester } from "#/firehose/ingester";
import { createRouter } from "#/routes";
import type { AppContext } from "./config";
···
import helmet from "helmet";
import { pino } from "pino";
import { createDb, migrateToLatest } from "#/db";
+
import { env } from "#/env";
import { Ingester } from "#/firehose/ingester";
+
import errorHandler from "#/middleware/errorHandler";
+
import requestLogger from "#/middleware/requestLogger";
import { createRouter } from "#/routes";
import type { AppContext } from "./config";