Compare commits

...

17 Commits
1.1.1 ... dev

Author SHA1 Message Date
22ef2521f5
chore: bump version to 1.2.6
All checks were successful
Build Latest image / build-container (push) Successful in 45s
Build release images / build-container (push) Successful in 46s
2025-05-26 19:10:20 +02:00
37f4befe86
chore: bump version to 1.2.4 and add pnpm lockfile 2025-05-26 19:09:47 +02:00
bd250f6fe0
fix(templates): Add custom with for outlook (b/c) f*** outlook 2025-05-26 19:09:18 +02:00
f9a202db55
chore(deps): bump
Some checks failed
Build Latest image / build-container (push) Successful in 44s
Build release images / build-container (push) Failing after 3h14m11s
2025-03-27 10:20:15 +01:00
92fc5762e4
chore(deps): bun:1.2.6
All checks were successful
Build Latest image / build-container (push) Successful in 38s
2025-03-27 10:03:18 +01:00
326b241dab
feat: update email for new times
All checks were successful
Build Latest image / build-container (push) Successful in 33s
Build release images / build-container (push) Successful in 31s
2025-03-27 10:00:56 +01:00
a7a50ff59d
refactor(ci): Switch to actions
All checks were successful
Build Latest image / build-container (push) Successful in 36s
2025-03-22 22:55:22 +01:00
4257686f35
ics invite 2025-03-19 00:37:53 +01:00
2f25937a94
feat: add ical 2025-03-18 23:57:01 +01:00
658b8d4dd8
chore: 1.2.1 2025-03-18 23:38:08 +01:00
df6381fd5e
feat: new email templates 2025-03-18 23:37:28 +01:00
a11e5f2f3e
ci: drop main branch
All checks were successful
ci/woodpecker/push/build Pipeline was successful
2024-12-18 18:01:12 +01:00
7a8e484632
chore: 1.2.0
Some checks failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/tag/release Pipeline was successful
2024-12-18 18:00:06 +01:00
1f771fb73f
feat: NODE_ENV=production 2024-12-18 17:59:40 +01:00
34c8f03571
refactor: dockerfile 2024-12-18 17:59:30 +01:00
dfac4c0fe9
chore(deps): bun:1.1.40 2024-12-18 17:59:24 +01:00
9860014420
chore(deps): bump all
Some checks failed
ci/woodpecker/push/build Pipeline failed
2024-12-18 17:59:10 +01:00
18 changed files with 687 additions and 127 deletions

View File

@ -10,3 +10,4 @@ DOCUMENT_SERVER_URL="https://documents.run.lauf-fuer-kaya.de"
AUTHKEY=""
EVENT_DATE="23.05.2025"
EVENT_NAME="Lauf für Kaya! 2025"
NODE_ENV=production

28
.gitea/workflows/dev.yaml Normal file
View File

@ -0,0 +1,28 @@
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

View File

@ -0,0 +1,27 @@
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

View File

@ -1,33 +0,0 @@
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

View File

@ -1,17 +0,0 @@
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

View File

@ -1,21 +1,7 @@
FROM oven/bun:1.1.36-slim
# FROM oven/bun:1.0.25
FROM oven/bun:1.2.6-slim
WORKDIR /app
# Copy package files
# Install dependencies
COPY package.json .
RUN bun i
# COPY package.json bun.lockb ./
# RUN bun install --frozen-lockfile
# Copy source code
COPY . .
# Expose the application port
EXPOSE 3000
# Start the application
CMD ["bun", "run", "start"]

BIN
bun.lockb

Binary file not shown.

View File

@ -1,6 +1,6 @@
{
"name": "@odit/lfk-mailer",
"version": "1.1.1",
"version": "1.2.6",
"private": true,
"type": "module",
"scripts": {
@ -8,20 +8,20 @@
"start": "bun src/index.ts"
},
"dependencies": {
"@hono/node-server": "1.13.7",
"@hono/swagger-ui": "0.5.0",
"@hono/zod-openapi": "0.18.3",
"@hono/zod-validator": "0.4.1",
"bullmq": "5.34.0",
"@hono/node-server": "1.14.0",
"@hono/swagger-ui": "0.5.1",
"@hono/zod-openapi": "0.19.2",
"@hono/zod-validator": "0.4.3",
"bullmq": "5.44.4",
"handlebars": "4.7.8",
"hono": "4.6.13",
"ioredis": "5.4.1",
"nodemailer": "6.9.16",
"zod": "3.24.1"
"hono": "4.7.5",
"ioredis": "5.6.0",
"nodemailer": "6.10.0",
"zod": "3.24.2"
},
"devDependencies": {
"@types/node": "22.10.2",
"@types/node": "22.13.14",
"@types/nodemailer": "6.4.17",
"bun-types": "1.1.38"
"bun-types": "1.2.6"
}
}

437
pnpm-lock.yaml generated Normal file
View File

@ -0,0 +1,437 @@
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: {}

View File

@ -2,11 +2,13 @@ import { createTransport } from "nodemailer";
import { Queue, Worker, QueueEvents } from "bullmq";
import { config } from "../config/env";
import Redis from "ioredis";
import { Attachment } from "nodemailer/lib/mailer";
interface EmailJob {
to: string;
subject: string;
html: string;
attachments: Attachment[];
text: string;
}
@ -40,12 +42,13 @@ const worker = new Worker<EmailJob>(
QUEUE_NAME,
async (job) => {
await transporter.sendMail({
from: config.email.from,
from: { address: config.email.from, name: "Lauf für Kaya!" },
replyTo: config.email.replyTo,
to: job.data.to,
subject: job.data.subject,
text: job.data.text,
html: job.data.html,
attachments: job.data.attachments,
});
},
{

View File

@ -5,6 +5,7 @@ import { z } from 'zod'
import { EmailService } from '../services/email'
import { getEmailTemplate } from '../templates'
import { Language } from '../types'
import { Attachment } from 'nodemailer/lib/mailer'
const emailRouter = new Hono()
const emailService = new EmailService()
@ -20,9 +21,9 @@ async function generateBarcodeDataURL(data) {
return `${process.env.DOCUMENT_SERVER_URL}/v1/barcodes/code128/${data}`
}
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')
const attachments: Attachment[] = []
try {
const template = getEmailTemplate(templateName, language as Language)
if (templateName === "welcome") {
@ -32,6 +33,12 @@ emailRouter.post('/', bearerAuth({ token: process.env.AUTHKEY }), zValidator('js
} else {
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 (data.token) {
@ -45,6 +52,7 @@ emailRouter.post('/', bearerAuth({ token: process.env.AUTHKEY }), zValidator('js
data.event_name = process.env.EVENT_NAME
await emailService.sendEmail({
to,
attachments,
subject: template.subject(data),
html: template.html(data),
text: template.text(data)

View File

@ -1,10 +1,12 @@
import { emailQueue } from '../queues/email.queue'
import { config } from '../config/env'
import { Attachment } from 'nodemailer/lib/mailer'
interface EmailOptions {
to: string
subject: string
html: string
attachments: Attachment[]
text: string
}

View File

@ -114,6 +114,7 @@
width: 64px;
height: 64px;
"
height="64"
/>
</td>
</tr>

View File

@ -114,6 +114,7 @@
width: 64px;
height: 64px;
"
height="64"
/>
</td>
</tr>

View File

@ -114,6 +114,7 @@
width: 64px;
height: 64px;
"
height="64"
/>
</td>
</tr>
@ -175,8 +176,11 @@
-moz-osx-font-smoothing: grayscale;
"
>
Am Lauftag (<strong>{{event_date}}</strong>) musst du nur noch diesen
Barcode vorzeigen, damit erhältst du deine Läuferkarte.
Am Lauftag (<strong>{{event_date}}</strong>) musst du nur noch
diesen Barcode vorzeigen, damit erhältst du deine Läuferkarte.<br />Der
<b>Bürgerlauf</b> findet von
<b>14:00 bis 18:00 Uhr</b> statt.<br />Der
<b>Firmenlauf</b> beginnt um <b>13:30 Uhr</b>.
</p>
<table
align="center"
@ -204,6 +208,7 @@
max-width: 601px;
max-height: 315.2938461538462px;
"
height="150"
/>
</td>
</tr>
@ -223,20 +228,68 @@
"
>
Deinen Registrierungs-Code, Rundenzeiten und weitere Infos kannst
du jederzeit im
du jederzeit im Lauf für Kaya! Selfservice einsehen.
</p>
<table
align="center"
width="100%"
border="0"
cellpadding="0"
cellspacing="0"
role="presentation"
style="max-width: 100%; text-align: center; margin-bottom: 20px"
>
<tbody>
<tr style="width: 100%">
<td>
<a
href="{{link}}"
rel="noopener noreferrer nofollow"
style="
color: #111827;
text-decoration: underline;
line-height: 100%;
text-decoration: none;
display: inline-block;
max-width: 100%;
mso-padding-alt: 0px;
color: #ffffff;
background-color: #3a4bdd;
border-color: #3a4bdd;
border-width: 2px;
border-style: solid;
font-size: 14px;
font-weight: 500;
border-radius: 0px;
padding: 12px 32px 12px 32px;
"
target="_blank"
>Lauf für Kaya! Selfservice</a
><span
><!--[if mso
]><i
style="mso-font-width: 400%; mso-text-raise: 18"
hidden
>&#8202;&#8202;&#8202;&#8202;</i
><!
[endif]--></span
><span
style="
max-width: 100%;
display: inline-block;
line-height: 120%;
mso-padding-alt: 0px;
mso-text-raise: 9px;
"
>Zum Selfservice Portal</span
><span
><!--[if mso
]><i style="mso-font-width: 400%" hidden
>&#8202;&#8202;&#8202;&#8202;&#8203;</i
><!
[endif]--></span
></a
>
einsehen.
</p>
</td>
</tr>
</tbody>
</table>
<p
style="
font-size: 15px;

View File

@ -3,6 +3,9 @@ Hallo {{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.
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.
Wir freuen uns schon auf dich und einen erfolgreichen Lauf für Kaya!

View File

@ -114,6 +114,7 @@
width: 64px;
height: 64px;
"
height="64"
/>
</td>
</tr>
@ -175,7 +176,11 @@
-moz-osx-font-smoothing: grayscale;
"
>
On the day of the run (<strong>{{event_date}}</strong>) you only have to show your barcode to receive your runner's card.
On the day of the run (<strong>{{event_date}}</strong>) you only
have to show your barcode to receive your runner's card.<br />The
<b>Citizens' Run</b> takes place from
<b>2:00 PM to 6:00 PM</b>.<br />The <b>Corporate Run</b> begins at
<b>1:30 PM</b>.
</p>
<table
align="center"
@ -203,6 +208,7 @@
max-width: 601px;
max-height: 315.2938461538462px;
"
height="150"
/>
</td>
</tr>
@ -221,19 +227,69 @@
-moz-osx-font-smoothing: grayscale;
"
>
You can view your registration code, lap times and further information at any time from the
You can view your registration code, lap times and further
information at any time from the Lauf für Kaya! Selfservice
</p>
<table
align="center"
width="100%"
border="0"
cellpadding="0"
cellspacing="0"
role="presentation"
style="max-width: 100%; text-align: center; margin-bottom: 20px"
>
<tbody>
<tr style="width: 100%">
<td>
<a
href="{{link}}"
rel="noopener noreferrer nofollow"
style="
color: #111827;
text-decoration: underline;
line-height: 100%;
text-decoration: none;
display: inline-block;
max-width: 100%;
mso-padding-alt: 0px;
color: #ffffff;
background-color: #3a4bdd;
border-color: #3a4bdd;
border-width: 2px;
border-style: solid;
font-size: 14px;
font-weight: 500;
border-radius: 0px;
padding: 12px 32px 12px 32px;
"
target="_blank"
>Lauf für Kaya! Selfservice</a
><span
><!--[if mso
]><i
style="mso-font-width: 400%; mso-text-raise: 18"
hidden
>&#8202;&#8202;&#8202;&#8202;</i
><!
[endif]--></span
><span
style="
max-width: 100%;
display: inline-block;
line-height: 120%;
mso-padding-alt: 0px;
mso-text-raise: 9px;
"
>To the self-service portal</span
><span
><!--[if mso
]><i style="mso-font-width: 400%" hidden
>&#8202;&#8202;&#8202;&#8202;&#8203;</i
><!
[endif]--></span
></a
>
</p>
</td>
</tr>
</tbody>
</table>
<p
style="
font-size: 15px;
@ -262,7 +318,8 @@
-moz-osx-font-smoothing: grayscale;
"
>
If you have any questions, please reply to this e-mail at any time or write to
If you have any questions, please reply to this e-mail at any time
or write to
<u
><strong
><a

View File

@ -3,6 +3,9 @@ Hello {{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.
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}}.
We look forward to seeing you and to a successful Lauf für Kaya!