Compare commits
No commits in common. "dev" and "1.0.0" have entirely different histories.
@ -6,8 +6,6 @@ EMAIL_FROM="noreply@lauf-fuer-kaya.de"
|
|||||||
EMAIL_REPLYTO="info@lauf-fuer-kaya.de"
|
EMAIL_REPLYTO="info@lauf-fuer-kaya.de"
|
||||||
REDIS_URL=redis://localhost:6379
|
REDIS_URL=redis://localhost:6379
|
||||||
FRONTEND_URL="https://run.lauf-fuer-kaya.de"
|
FRONTEND_URL="https://run.lauf-fuer-kaya.de"
|
||||||
DOCUMENT_SERVER_URL="https://documents.run.lauf-fuer-kaya.de"
|
|
||||||
AUTHKEY=""
|
AUTHKEY=""
|
||||||
EVENT_DATE="23.05.2025"
|
EVENT_DATE="23.05.2025"
|
||||||
EVENT_NAME="Lauf für Kaya! 2025"
|
EVENT_NAME="Lauf für Kaya! 2025"
|
||||||
NODE_ENV=production
|
|
@ -1,28 +0,0 @@
|
|||||||
name: Build Latest image
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- dev
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Login to registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: registry.odit.services
|
|
||||||
username: ${{ vars.REGISTRY_USERNAME }}
|
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
${{ vars.REGISTRY }}/lfk/mailer:dev
|
|
||||||
${{ vars.REGISTRY }}/lfk/mailer:latest
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
@ -1,27 +0,0 @@
|
|||||||
name: Build release images
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "*.*.*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-container:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Login to registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: registry.odit.services
|
|
||||||
username: ${{ vars.REGISTRY_USERNAME }}
|
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
${{ vars.REGISTRY }}/lfk/mailer:${{ github.ref_name }}
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
33
.woodpecker/build.yml
Normal file
33
.woodpecker/build.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
steps:
|
||||||
|
- name: build latest
|
||||||
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
|
settings:
|
||||||
|
repo: registry.odit.services/lfk/mailer
|
||||||
|
tags:
|
||||||
|
- latest
|
||||||
|
registry: registry.odit.services
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
cache_from: registry.odit.services/lfk/mailer:dev
|
||||||
|
username:
|
||||||
|
from_secret: odit-registry-builder-username
|
||||||
|
password:
|
||||||
|
from_secret: odit-registry-builder-password
|
||||||
|
when:
|
||||||
|
branch: main
|
||||||
|
- name: build dev
|
||||||
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
|
settings:
|
||||||
|
repo: registry.odit.services/lfk/mailer
|
||||||
|
tags:
|
||||||
|
- dev
|
||||||
|
registry: registry.odit.services
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
cache_from: registry.odit.services/lfk/mailer:dev
|
||||||
|
username:
|
||||||
|
from_secret: odit-registry-builder-username
|
||||||
|
password:
|
||||||
|
from_secret: odit-registry-builder-password
|
||||||
|
when:
|
||||||
|
branch: dev
|
||||||
|
when:
|
||||||
|
event: push
|
17
.woodpecker/release.yml
Normal file
17
.woodpecker/release.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
steps:
|
||||||
|
- name: build tag
|
||||||
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
|
settings:
|
||||||
|
repo: registry.odit.services/lfk/mailer
|
||||||
|
tags:
|
||||||
|
- "${CI_COMMIT_TAG}"
|
||||||
|
registry: registry.odit.services
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
cache_from: registry.odit.services/lfk/mailer:dev
|
||||||
|
username:
|
||||||
|
from_secret: odit-registry-builder-username
|
||||||
|
password:
|
||||||
|
from_secret: odit-registry-builder-password
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
16
Dockerfile
16
Dockerfile
@ -1,7 +1,21 @@
|
|||||||
FROM oven/bun:1.2.6-slim
|
FROM oven/bun:1.1.36-slim
|
||||||
|
# FROM oven/bun:1.0.25
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy package files
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
COPY package.json .
|
COPY package.json .
|
||||||
RUN bun i
|
RUN bun i
|
||||||
|
# COPY package.json bun.lockb ./
|
||||||
|
# RUN bun install --frozen-lockfile
|
||||||
|
|
||||||
|
# Copy source code
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Expose the application port
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
# Start the application
|
||||||
CMD ["bun", "run", "start"]
|
CMD ["bun", "run", "start"]
|
25
package.json
25
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@odit/lfk-mailer",
|
"name": "@odit/lfk-mailer",
|
||||||
"version": "1.2.6",
|
"version": "1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -8,20 +8,21 @@
|
|||||||
"start": "bun src/index.ts"
|
"start": "bun src/index.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hono/node-server": "1.14.0",
|
"@hono/node-server": "1.13.7",
|
||||||
"@hono/swagger-ui": "0.5.1",
|
"@hono/swagger-ui": "0.5.0",
|
||||||
"@hono/zod-openapi": "0.19.2",
|
"@hono/zod-openapi": "0.18.3",
|
||||||
"@hono/zod-validator": "0.4.3",
|
"@hono/zod-validator": "0.4.1",
|
||||||
"bullmq": "5.44.4",
|
"bullmq": "5.34.0",
|
||||||
|
"bwip-js": "4.5.1",
|
||||||
"handlebars": "4.7.8",
|
"handlebars": "4.7.8",
|
||||||
"hono": "4.7.5",
|
"hono": "4.6.13",
|
||||||
"ioredis": "5.6.0",
|
"ioredis": "5.4.1",
|
||||||
"nodemailer": "6.10.0",
|
"nodemailer": "6.9.16",
|
||||||
"zod": "3.24.2"
|
"zod": "3.24.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "22.13.14",
|
"@types/node": "22.10.2",
|
||||||
"@types/nodemailer": "6.4.17",
|
"@types/nodemailer": "6.4.17",
|
||||||
"bun-types": "1.2.6"
|
"bun-types": "1.1.38"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
437
pnpm-lock.yaml
generated
437
pnpm-lock.yaml
generated
@ -1,437 +0,0 @@
|
|||||||
lockfileVersion: '9.0'
|
|
||||||
|
|
||||||
settings:
|
|
||||||
autoInstallPeers: true
|
|
||||||
excludeLinksFromLockfile: false
|
|
||||||
|
|
||||||
importers:
|
|
||||||
|
|
||||||
.:
|
|
||||||
dependencies:
|
|
||||||
'@hono/node-server':
|
|
||||||
specifier: 1.14.0
|
|
||||||
version: 1.14.0(hono@4.7.5)
|
|
||||||
'@hono/swagger-ui':
|
|
||||||
specifier: 0.5.1
|
|
||||||
version: 0.5.1(hono@4.7.5)
|
|
||||||
'@hono/zod-openapi':
|
|
||||||
specifier: 0.19.2
|
|
||||||
version: 0.19.2(hono@4.7.5)(zod@3.24.2)
|
|
||||||
'@hono/zod-validator':
|
|
||||||
specifier: 0.4.3
|
|
||||||
version: 0.4.3(hono@4.7.5)(zod@3.24.2)
|
|
||||||
bullmq:
|
|
||||||
specifier: 5.44.4
|
|
||||||
version: 5.44.4
|
|
||||||
handlebars:
|
|
||||||
specifier: 4.7.8
|
|
||||||
version: 4.7.8
|
|
||||||
hono:
|
|
||||||
specifier: 4.7.5
|
|
||||||
version: 4.7.5
|
|
||||||
ioredis:
|
|
||||||
specifier: 5.6.0
|
|
||||||
version: 5.6.0
|
|
||||||
nodemailer:
|
|
||||||
specifier: 6.10.0
|
|
||||||
version: 6.10.0
|
|
||||||
zod:
|
|
||||||
specifier: 3.24.2
|
|
||||||
version: 3.24.2
|
|
||||||
devDependencies:
|
|
||||||
'@types/node':
|
|
||||||
specifier: 22.13.14
|
|
||||||
version: 22.13.14
|
|
||||||
'@types/nodemailer':
|
|
||||||
specifier: 6.4.17
|
|
||||||
version: 6.4.17
|
|
||||||
bun-types:
|
|
||||||
specifier: 1.2.6
|
|
||||||
version: 1.2.6
|
|
||||||
|
|
||||||
packages:
|
|
||||||
|
|
||||||
'@asteasolutions/zod-to-openapi@7.3.2':
|
|
||||||
resolution: {integrity: sha512-Wvl+jHwSgYrRc3tQLMG7Qxq6wn0WjDk8E9ZA0lAyW73FqK18XPHVIKpk0lA6L0S+zmzzNKTndeV2v/Or0LyfHQ==}
|
|
||||||
peerDependencies:
|
|
||||||
zod: ^3.20.2
|
|
||||||
|
|
||||||
'@hono/node-server@1.14.0':
|
|
||||||
resolution: {integrity: sha512-YUCxJwgHRKSqjrdTk9e4VMGKN27MK5r4+MGPyZTgKH+IYbK+KtYbHeOcPGJ91KGGD6RIQiz2dAHxvjauNhOS8g==}
|
|
||||||
engines: {node: '>=18.14.1'}
|
|
||||||
peerDependencies:
|
|
||||||
hono: ^4
|
|
||||||
|
|
||||||
'@hono/swagger-ui@0.5.1':
|
|
||||||
resolution: {integrity: sha512-XpUCfszLJ9b1rtFdzqOSHfdg9pfBiC2J5piEjuSanYpDDTIwpMz0ciiv5N3WWUaQpz9fEgH8lttQqL41vIFuDA==}
|
|
||||||
peerDependencies:
|
|
||||||
hono: '*'
|
|
||||||
|
|
||||||
'@hono/zod-openapi@0.19.2':
|
|
||||||
resolution: {integrity: sha512-lkFa6wdQVgY7d7/m++Ixr3hvKCF5Y+zjTIPM37fex5ylCfX53A/W28gZRDuFZx3aR+noKob7lHfwdk9dURLzxw==}
|
|
||||||
engines: {node: '>=16.0.0'}
|
|
||||||
peerDependencies:
|
|
||||||
hono: '>=4.3.6'
|
|
||||||
zod: 3.*
|
|
||||||
|
|
||||||
'@hono/zod-validator@0.4.3':
|
|
||||||
resolution: {integrity: sha512-xIgMYXDyJ4Hj6ekm9T9Y27s080Nl9NXHcJkOvkXPhubOLj8hZkOL8pDnnXfvCf5xEE8Q4oMFenQUZZREUY2gqQ==}
|
|
||||||
peerDependencies:
|
|
||||||
hono: '>=3.9.0'
|
|
||||||
zod: ^3.19.1
|
|
||||||
|
|
||||||
'@ioredis/commands@1.2.0':
|
|
||||||
resolution: {integrity: sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==}
|
|
||||||
|
|
||||||
'@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3':
|
|
||||||
resolution: {integrity: sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [darwin]
|
|
||||||
|
|
||||||
'@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.3':
|
|
||||||
resolution: {integrity: sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw==}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [darwin]
|
|
||||||
|
|
||||||
'@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.3':
|
|
||||||
resolution: {integrity: sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg==}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@msgpackr-extract/msgpackr-extract-linux-arm@3.0.3':
|
|
||||||
resolution: {integrity: sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw==}
|
|
||||||
cpu: [arm]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@msgpackr-extract/msgpackr-extract-linux-x64@3.0.3':
|
|
||||||
resolution: {integrity: sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg==}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@msgpackr-extract/msgpackr-extract-win32-x64@3.0.3':
|
|
||||||
resolution: {integrity: sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ==}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [win32]
|
|
||||||
|
|
||||||
'@types/node@22.13.14':
|
|
||||||
resolution: {integrity: sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==}
|
|
||||||
|
|
||||||
'@types/nodemailer@6.4.17':
|
|
||||||
resolution: {integrity: sha512-I9CCaIp6DTldEg7vyUTZi8+9Vo0hi1/T8gv3C89yk1rSAAzoKQ8H8ki/jBYJSFoH/BisgLP8tkZMlQ91CIquww==}
|
|
||||||
|
|
||||||
'@types/ws@8.5.14':
|
|
||||||
resolution: {integrity: sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==}
|
|
||||||
|
|
||||||
bullmq@5.44.4:
|
|
||||||
resolution: {integrity: sha512-0BjgABM/7U85Fxatj586ftsoWiGdjmg7fR7PwRYNOOGfvGpiUX9nQoUmx+9VZW/OtHO/4um/BVh2Y2S9BEhKFg==}
|
|
||||||
|
|
||||||
bun-types@1.2.6:
|
|
||||||
resolution: {integrity: sha512-FbCKyr5KDiPULUzN/nm5oqQs9nXCHD8dVc64BArxJadCvbNzAI6lUWGh9fSJZWeDIRD38ikceBU8Kj/Uh+53oQ==}
|
|
||||||
|
|
||||||
cluster-key-slot@1.1.2:
|
|
||||||
resolution: {integrity: sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==}
|
|
||||||
engines: {node: '>=0.10.0'}
|
|
||||||
|
|
||||||
cron-parser@4.9.0:
|
|
||||||
resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==}
|
|
||||||
engines: {node: '>=12.0.0'}
|
|
||||||
|
|
||||||
debug@4.4.1:
|
|
||||||
resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==}
|
|
||||||
engines: {node: '>=6.0'}
|
|
||||||
peerDependencies:
|
|
||||||
supports-color: '*'
|
|
||||||
peerDependenciesMeta:
|
|
||||||
supports-color:
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
denque@2.1.0:
|
|
||||||
resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==}
|
|
||||||
engines: {node: '>=0.10'}
|
|
||||||
|
|
||||||
detect-libc@2.0.4:
|
|
||||||
resolution: {integrity: sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==}
|
|
||||||
engines: {node: '>=8'}
|
|
||||||
|
|
||||||
handlebars@4.7.8:
|
|
||||||
resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==}
|
|
||||||
engines: {node: '>=0.4.7'}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
hono@4.7.5:
|
|
||||||
resolution: {integrity: sha512-fDOK5W2C1vZACsgLONigdZTRZxuBqFtcKh7bUQ5cVSbwI2RWjloJDcgFOVzbQrlI6pCmhlTsVYZ7zpLj4m4qMQ==}
|
|
||||||
engines: {node: '>=16.9.0'}
|
|
||||||
|
|
||||||
ioredis@5.6.0:
|
|
||||||
resolution: {integrity: sha512-tBZlIIWbndeWBWCXWZiqtOF/yxf6yZX3tAlTJ7nfo5jhd6dctNxF7QnYlZLZ1a0o0pDoen7CgZqO+zjNaFbJAg==}
|
|
||||||
engines: {node: '>=12.22.0'}
|
|
||||||
|
|
||||||
lodash.defaults@4.2.0:
|
|
||||||
resolution: {integrity: sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==}
|
|
||||||
|
|
||||||
lodash.isarguments@3.1.0:
|
|
||||||
resolution: {integrity: sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==}
|
|
||||||
|
|
||||||
luxon@3.6.1:
|
|
||||||
resolution: {integrity: sha512-tJLxrKJhO2ukZ5z0gyjY1zPh3Rh88Ej9P7jNrZiHMUXHae1yvI2imgOZtL1TO8TW6biMMKfTtAOoEJANgtWBMQ==}
|
|
||||||
engines: {node: '>=12'}
|
|
||||||
|
|
||||||
minimist@1.2.8:
|
|
||||||
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
|
|
||||||
|
|
||||||
ms@2.1.3:
|
|
||||||
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
|
|
||||||
|
|
||||||
msgpackr-extract@3.0.3:
|
|
||||||
resolution: {integrity: sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA==}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
msgpackr@1.11.4:
|
|
||||||
resolution: {integrity: sha512-uaff7RG9VIC4jacFW9xzL3jc0iM32DNHe4jYVycBcjUePT/Klnfj7pqtWJt9khvDFizmjN2TlYniYmSS2LIaZg==}
|
|
||||||
|
|
||||||
neo-async@2.6.2:
|
|
||||||
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
|
|
||||||
|
|
||||||
node-abort-controller@3.1.1:
|
|
||||||
resolution: {integrity: sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==}
|
|
||||||
|
|
||||||
node-gyp-build-optional-packages@5.2.2:
|
|
||||||
resolution: {integrity: sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
nodemailer@6.10.0:
|
|
||||||
resolution: {integrity: sha512-SQ3wZCExjeSatLE/HBaXS5vqUOQk6GtBdIIKxiFdmm01mOQZX/POJkO3SUX1wDiYcwUOJwT23scFSC9fY2H8IA==}
|
|
||||||
engines: {node: '>=6.0.0'}
|
|
||||||
|
|
||||||
openapi3-ts@4.4.0:
|
|
||||||
resolution: {integrity: sha512-9asTNB9IkKEzWMcHmVZE7Ts3kC9G7AFHfs8i7caD8HbI76gEjdkId4z/AkP83xdZsH7PLAnnbl47qZkXuxpArw==}
|
|
||||||
|
|
||||||
redis-errors@1.2.0:
|
|
||||||
resolution: {integrity: sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==}
|
|
||||||
engines: {node: '>=4'}
|
|
||||||
|
|
||||||
redis-parser@3.0.0:
|
|
||||||
resolution: {integrity: sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==}
|
|
||||||
engines: {node: '>=4'}
|
|
||||||
|
|
||||||
semver@7.7.2:
|
|
||||||
resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==}
|
|
||||||
engines: {node: '>=10'}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
source-map@0.6.1:
|
|
||||||
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
|
|
||||||
engines: {node: '>=0.10.0'}
|
|
||||||
|
|
||||||
standard-as-callback@2.1.0:
|
|
||||||
resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==}
|
|
||||||
|
|
||||||
tslib@2.8.1:
|
|
||||||
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
|
|
||||||
|
|
||||||
uglify-js@3.19.3:
|
|
||||||
resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==}
|
|
||||||
engines: {node: '>=0.8.0'}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
undici-types@6.20.0:
|
|
||||||
resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==}
|
|
||||||
|
|
||||||
uuid@9.0.1:
|
|
||||||
resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
wordwrap@1.0.0:
|
|
||||||
resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==}
|
|
||||||
|
|
||||||
yaml@2.8.0:
|
|
||||||
resolution: {integrity: sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==}
|
|
||||||
engines: {node: '>= 14.6'}
|
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
zod@3.24.2:
|
|
||||||
resolution: {integrity: sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==}
|
|
||||||
|
|
||||||
snapshots:
|
|
||||||
|
|
||||||
'@asteasolutions/zod-to-openapi@7.3.2(zod@3.24.2)':
|
|
||||||
dependencies:
|
|
||||||
openapi3-ts: 4.4.0
|
|
||||||
zod: 3.24.2
|
|
||||||
|
|
||||||
'@hono/node-server@1.14.0(hono@4.7.5)':
|
|
||||||
dependencies:
|
|
||||||
hono: 4.7.5
|
|
||||||
|
|
||||||
'@hono/swagger-ui@0.5.1(hono@4.7.5)':
|
|
||||||
dependencies:
|
|
||||||
hono: 4.7.5
|
|
||||||
|
|
||||||
'@hono/zod-openapi@0.19.2(hono@4.7.5)(zod@3.24.2)':
|
|
||||||
dependencies:
|
|
||||||
'@asteasolutions/zod-to-openapi': 7.3.2(zod@3.24.2)
|
|
||||||
'@hono/zod-validator': 0.4.3(hono@4.7.5)(zod@3.24.2)
|
|
||||||
hono: 4.7.5
|
|
||||||
zod: 3.24.2
|
|
||||||
|
|
||||||
'@hono/zod-validator@0.4.3(hono@4.7.5)(zod@3.24.2)':
|
|
||||||
dependencies:
|
|
||||||
hono: 4.7.5
|
|
||||||
zod: 3.24.2
|
|
||||||
|
|
||||||
'@ioredis/commands@1.2.0': {}
|
|
||||||
|
|
||||||
'@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.3':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.3':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@msgpackr-extract/msgpackr-extract-linux-arm@3.0.3':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@msgpackr-extract/msgpackr-extract-linux-x64@3.0.3':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@msgpackr-extract/msgpackr-extract-win32-x64@3.0.3':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@types/node@22.13.14':
|
|
||||||
dependencies:
|
|
||||||
undici-types: 6.20.0
|
|
||||||
|
|
||||||
'@types/nodemailer@6.4.17':
|
|
||||||
dependencies:
|
|
||||||
'@types/node': 22.13.14
|
|
||||||
|
|
||||||
'@types/ws@8.5.14':
|
|
||||||
dependencies:
|
|
||||||
'@types/node': 22.13.14
|
|
||||||
|
|
||||||
bullmq@5.44.4:
|
|
||||||
dependencies:
|
|
||||||
cron-parser: 4.9.0
|
|
||||||
ioredis: 5.6.0
|
|
||||||
msgpackr: 1.11.4
|
|
||||||
node-abort-controller: 3.1.1
|
|
||||||
semver: 7.7.2
|
|
||||||
tslib: 2.8.1
|
|
||||||
uuid: 9.0.1
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- supports-color
|
|
||||||
|
|
||||||
bun-types@1.2.6:
|
|
||||||
dependencies:
|
|
||||||
'@types/node': 22.13.14
|
|
||||||
'@types/ws': 8.5.14
|
|
||||||
|
|
||||||
cluster-key-slot@1.1.2: {}
|
|
||||||
|
|
||||||
cron-parser@4.9.0:
|
|
||||||
dependencies:
|
|
||||||
luxon: 3.6.1
|
|
||||||
|
|
||||||
debug@4.4.1:
|
|
||||||
dependencies:
|
|
||||||
ms: 2.1.3
|
|
||||||
|
|
||||||
denque@2.1.0: {}
|
|
||||||
|
|
||||||
detect-libc@2.0.4:
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
handlebars@4.7.8:
|
|
||||||
dependencies:
|
|
||||||
minimist: 1.2.8
|
|
||||||
neo-async: 2.6.2
|
|
||||||
source-map: 0.6.1
|
|
||||||
wordwrap: 1.0.0
|
|
||||||
optionalDependencies:
|
|
||||||
uglify-js: 3.19.3
|
|
||||||
|
|
||||||
hono@4.7.5: {}
|
|
||||||
|
|
||||||
ioredis@5.6.0:
|
|
||||||
dependencies:
|
|
||||||
'@ioredis/commands': 1.2.0
|
|
||||||
cluster-key-slot: 1.1.2
|
|
||||||
debug: 4.4.1
|
|
||||||
denque: 2.1.0
|
|
||||||
lodash.defaults: 4.2.0
|
|
||||||
lodash.isarguments: 3.1.0
|
|
||||||
redis-errors: 1.2.0
|
|
||||||
redis-parser: 3.0.0
|
|
||||||
standard-as-callback: 2.1.0
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- supports-color
|
|
||||||
|
|
||||||
lodash.defaults@4.2.0: {}
|
|
||||||
|
|
||||||
lodash.isarguments@3.1.0: {}
|
|
||||||
|
|
||||||
luxon@3.6.1: {}
|
|
||||||
|
|
||||||
minimist@1.2.8: {}
|
|
||||||
|
|
||||||
ms@2.1.3: {}
|
|
||||||
|
|
||||||
msgpackr-extract@3.0.3:
|
|
||||||
dependencies:
|
|
||||||
node-gyp-build-optional-packages: 5.2.2
|
|
||||||
optionalDependencies:
|
|
||||||
'@msgpackr-extract/msgpackr-extract-darwin-arm64': 3.0.3
|
|
||||||
'@msgpackr-extract/msgpackr-extract-darwin-x64': 3.0.3
|
|
||||||
'@msgpackr-extract/msgpackr-extract-linux-arm': 3.0.3
|
|
||||||
'@msgpackr-extract/msgpackr-extract-linux-arm64': 3.0.3
|
|
||||||
'@msgpackr-extract/msgpackr-extract-linux-x64': 3.0.3
|
|
||||||
'@msgpackr-extract/msgpackr-extract-win32-x64': 3.0.3
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
msgpackr@1.11.4:
|
|
||||||
optionalDependencies:
|
|
||||||
msgpackr-extract: 3.0.3
|
|
||||||
|
|
||||||
neo-async@2.6.2: {}
|
|
||||||
|
|
||||||
node-abort-controller@3.1.1: {}
|
|
||||||
|
|
||||||
node-gyp-build-optional-packages@5.2.2:
|
|
||||||
dependencies:
|
|
||||||
detect-libc: 2.0.4
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
nodemailer@6.10.0: {}
|
|
||||||
|
|
||||||
openapi3-ts@4.4.0:
|
|
||||||
dependencies:
|
|
||||||
yaml: 2.8.0
|
|
||||||
|
|
||||||
redis-errors@1.2.0: {}
|
|
||||||
|
|
||||||
redis-parser@3.0.0:
|
|
||||||
dependencies:
|
|
||||||
redis-errors: 1.2.0
|
|
||||||
|
|
||||||
semver@7.7.2: {}
|
|
||||||
|
|
||||||
source-map@0.6.1: {}
|
|
||||||
|
|
||||||
standard-as-callback@2.1.0: {}
|
|
||||||
|
|
||||||
tslib@2.8.1: {}
|
|
||||||
|
|
||||||
uglify-js@3.19.3:
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
undici-types@6.20.0: {}
|
|
||||||
|
|
||||||
uuid@9.0.1: {}
|
|
||||||
|
|
||||||
wordwrap@1.0.0: {}
|
|
||||||
|
|
||||||
yaml@2.8.0: {}
|
|
||||||
|
|
||||||
zod@3.24.2: {}
|
|
@ -2,13 +2,11 @@ import { createTransport } from "nodemailer";
|
|||||||
import { Queue, Worker, QueueEvents } from "bullmq";
|
import { Queue, Worker, QueueEvents } from "bullmq";
|
||||||
import { config } from "../config/env";
|
import { config } from "../config/env";
|
||||||
import Redis from "ioredis";
|
import Redis from "ioredis";
|
||||||
import { Attachment } from "nodemailer/lib/mailer";
|
|
||||||
|
|
||||||
interface EmailJob {
|
interface EmailJob {
|
||||||
to: string;
|
to: string;
|
||||||
subject: string;
|
subject: string;
|
||||||
html: string;
|
html: string;
|
||||||
attachments: Attachment[];
|
|
||||||
text: string;
|
text: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,13 +40,12 @@ const worker = new Worker<EmailJob>(
|
|||||||
QUEUE_NAME,
|
QUEUE_NAME,
|
||||||
async (job) => {
|
async (job) => {
|
||||||
await transporter.sendMail({
|
await transporter.sendMail({
|
||||||
from: { address: config.email.from, name: "Lauf für Kaya!" },
|
from: config.email.from,
|
||||||
replyTo: config.email.replyTo,
|
replyTo: config.email.replyTo,
|
||||||
to: job.data.to,
|
to: job.data.to,
|
||||||
subject: job.data.subject,
|
subject: job.data.subject,
|
||||||
text: job.data.text,
|
text: job.data.text,
|
||||||
html: job.data.html,
|
html: job.data.html,
|
||||||
attachments: job.data.attachments,
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ import { z } from 'zod'
|
|||||||
import { EmailService } from '../services/email'
|
import { EmailService } from '../services/email'
|
||||||
import { getEmailTemplate } from '../templates'
|
import { getEmailTemplate } from '../templates'
|
||||||
import { Language } from '../types'
|
import { Language } from '../types'
|
||||||
import { Attachment } from 'nodemailer/lib/mailer'
|
import { toBuffer } from 'bwip-js/node'
|
||||||
|
|
||||||
const emailRouter = new Hono()
|
const emailRouter = new Hono()
|
||||||
const emailService = new EmailService()
|
const emailService = new EmailService()
|
||||||
@ -18,12 +18,24 @@ const sendEmailSchema = z.object({
|
|||||||
})
|
})
|
||||||
|
|
||||||
async function generateBarcodeDataURL(data) {
|
async function generateBarcodeDataURL(data) {
|
||||||
return `${process.env.DOCUMENT_SERVER_URL}/v1/barcodes/code128/${data}`
|
const buffer = await toBuffer({
|
||||||
|
bcid: 'code128',
|
||||||
|
text: data,
|
||||||
|
scale: 3,
|
||||||
|
height: 10,
|
||||||
|
includetext: true,
|
||||||
|
textxalign: 'center',
|
||||||
|
});
|
||||||
|
|
||||||
|
const base64Data = buffer.toString('base64');
|
||||||
|
const dataURL = `data:image/png;base64,${base64Data}`;
|
||||||
|
|
||||||
|
return dataURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
emailRouter.post('/', bearerAuth({ token: process.env.AUTHKEY || "" }), zValidator('json', sendEmailSchema), async (c) => {
|
emailRouter.post('/', bearerAuth({ token: process.env.AUTHKEY }), zValidator('json', sendEmailSchema), async (c) => {
|
||||||
let { to, templateName, language, data } = c.req.valid('json')
|
let { to, templateName, language, data } = c.req.valid('json')
|
||||||
const attachments: Attachment[] = []
|
|
||||||
try {
|
try {
|
||||||
const template = getEmailTemplate(templateName, language as Language)
|
const template = getEmailTemplate(templateName, language as Language)
|
||||||
if (templateName === "welcome") {
|
if (templateName === "welcome") {
|
||||||
@ -33,12 +45,6 @@ emailRouter.post('/', bearerAuth({ token: process.env.AUTHKEY || "" }), zValidat
|
|||||||
} else {
|
} else {
|
||||||
return c.json({ success: false, error: "required params 'data.name', 'data.link', 'data.barcode_content' not provided" }, 406)
|
return c.json({ success: false, error: "required params 'data.name', 'data.link', 'data.barcode_content' not provided" }, 406)
|
||||||
}
|
}
|
||||||
const attachment: Attachment = {
|
|
||||||
filename: 'invite.ics',
|
|
||||||
content: `BEGIN:VCALENDAR\nVERSION:2.0\nBEGIN:VEVENT\nSUMMARY:Lauf für Kaya! 2025\nDTSTART:20250523T110000Z\nDTEND:20250523T160000Z\nDTSTAMP:20250318T230306Z\nUID:lfk2025-xhJP3h\nDESCRIPTION:Der Lauf für Kaya! 2025 findet am 23.05.2025 auf dem Sportplatz des Gymnasium Herzogenaurach statt - Bürgerlauf von 14 bis 18 Uhr - Firmenlauf von 13:30 bis 18 Uhr.\nLOCATION:Sportplatz Gymnasium Herzogenaurach\nORGANIZER:info@lauf-fuer-kaya.de\nSTATUS:CONFIRMED\nPRIORITY:5\nEND:VEVENT\nEND:VCALENDAR`,
|
|
||||||
contentType: 'text/calendar; method=REQUEST',
|
|
||||||
}
|
|
||||||
attachments.push(attachment)
|
|
||||||
}
|
}
|
||||||
if (templateName === "password-reset") {
|
if (templateName === "password-reset") {
|
||||||
if (data.token) {
|
if (data.token) {
|
||||||
@ -52,7 +58,6 @@ emailRouter.post('/', bearerAuth({ token: process.env.AUTHKEY || "" }), zValidat
|
|||||||
data.event_name = process.env.EVENT_NAME
|
data.event_name = process.env.EVENT_NAME
|
||||||
await emailService.sendEmail({
|
await emailService.sendEmail({
|
||||||
to,
|
to,
|
||||||
attachments,
|
|
||||||
subject: template.subject(data),
|
subject: template.subject(data),
|
||||||
html: template.html(data),
|
html: template.html(data),
|
||||||
text: template.text(data)
|
text: template.text(data)
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
import { emailQueue } from '../queues/email.queue'
|
import { emailQueue } from '../queues/email.queue'
|
||||||
import { config } from '../config/env'
|
import { config } from '../config/env'
|
||||||
import { Attachment } from 'nodemailer/lib/mailer'
|
|
||||||
|
|
||||||
interface EmailOptions {
|
interface EmailOptions {
|
||||||
to: string
|
to: string
|
||||||
subject: string
|
subject: string
|
||||||
html: string
|
html: string
|
||||||
attachments: Attachment[]
|
|
||||||
text: string
|
text: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -3,9 +3,6 @@ Hallo {{name}} 👋
|
|||||||
vielen Dank für deine Registrierung beim {{event_name}}
|
vielen Dank für deine Registrierung beim {{event_name}}
|
||||||
|
|
||||||
Am Lauftag ({{event_date}}) musst du nur noch deinen Barcode vorzeigen, damit erhältst du deine Läuferkarte.
|
Am Lauftag ({{event_date}}) musst du nur noch deinen Barcode vorzeigen, damit erhältst du deine Läuferkarte.
|
||||||
Der Bürgerlauf findet von 14:00 bis 18:00 Uhr statt.
|
|
||||||
Der Firmenlauf beginnt um 13:30 Uhr.
|
|
||||||
|
|
||||||
Deinen Registrierungs-Code, Rundenzeiten und weitere Infos kannst du jederzeit im Lauf für Kaya! Selfservice unter {{link}} einsehen.
|
Deinen Registrierungs-Code, Rundenzeiten und weitere Infos kannst du jederzeit im Lauf für Kaya! Selfservice unter {{link}} einsehen.
|
||||||
|
|
||||||
Wir freuen uns schon auf dich und einen erfolgreichen Lauf für Kaya!
|
Wir freuen uns schon auf dich und einen erfolgreichen Lauf für Kaya!
|
||||||
|
File diff suppressed because one or more lines are too long
@ -3,9 +3,6 @@ Hello {{name}} 👋
|
|||||||
Thank you for registering for the {{event_name}}
|
Thank you for registering for the {{event_name}}
|
||||||
|
|
||||||
On the day of the run ({{event_date}}) you only have to show your barcode to receive your runner's card.
|
On the day of the run ({{event_date}}) you only have to show your barcode to receive your runner's card.
|
||||||
The Citizens' Run takes place from 2:00 PM to 6:00 PM.
|
|
||||||
The Corporate Run begins at 1:30 PM.
|
|
||||||
|
|
||||||
You can view your registration code, lap times and further information at any time from the Lauf für Kaya! Selfservice at {{link}}.
|
You can view your registration code, lap times and further information at any time from the Lauf für Kaya! Selfservice at {{link}}.
|
||||||
|
|
||||||
We look forward to seeing you and to a successful Lauf für Kaya!
|
We look forward to seeing you and to a successful Lauf für Kaya!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user