Compare commits
154 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c8dc998ecd | |||
| 3df3d26708 | |||
| 922e762aa2 | |||
| c3beb3e103 | |||
| 457ea26cf8 | |||
| c2d2b66f2f | |||
| 289a0d8671 | |||
| ce3053c0ba | |||
| 6608456c68 | |||
| 1cbe5a1614 | |||
| 9584bfed8b | |||
| 0839ff6359 | |||
| 4739193709 | |||
| 0ade57536e | |||
| d17108f4b9 | |||
| 3c42ca3042 | |||
| 073433f308 | |||
| 8bac1fadd6 | |||
| a478081727 | |||
| b1978e796f | |||
| c51ec74d30 | |||
| b8f0d1fa60 | |||
| 96886c74bc | |||
| 8d3cc34395 | |||
| 85519bc2e4 | |||
| ed02306738 | |||
| 31a59500fa | |||
| d01b4a0b99 | |||
| d9919404b5 | |||
| b180e04045 | |||
| 7f28525ec2 | |||
| 677bd86133 | |||
| b612562d34 | |||
| e9d3574599 | |||
| 9dd62cefa9 | |||
| 0797c678c8 | |||
| 5e4d6f44da | |||
| 885765ac71 | |||
| 03ed6d5bc1 | |||
| 4e1e124d0d | |||
| 19fbf50f6f | |||
| 21b5e048ed | |||
| c012b4943d | |||
| 7c23dba493 | |||
| ba566bcc33 | |||
| a386c5bef8 | |||
| 1ca5d3ea07 | |||
| fd8b7e56da | |||
| 55877de2aa | |||
| d1a29c1cbb | |||
| e6f7dd2be8 | |||
| 49590b897e | |||
| a9019e4c67 | |||
| cc6a53b258 | |||
| e0db6f6a78 | |||
| 0fcfb30d5c | |||
| c2909082a2 | |||
| 92c52401b3 | |||
| 7ca7266ea4 | |||
| adf11ab1c3 | |||
| db91661556 | |||
| 9d7d044384 | |||
| 95099c5fbd | |||
| 782861bd93 | |||
| dcde424b77 | |||
| b7c6c6e157 | |||
| 2d031dae03 | |||
| 729f2d7240 | |||
| 454309278e | |||
| 7be211f8b7 | |||
| bdeadd274b | |||
| e306cdb2c8 | |||
| 406add3d51 | |||
| e74b9a4c9d | |||
| 449a96b302 | |||
| 703eaa0e9d | |||
| b4dc1d2be7 | |||
| cf0f5839ee | |||
| 29376a7782 | |||
| 08e858726c | |||
| 68a1b8f3e0 | |||
| 9697d53a15 | |||
| d38923c4ad | |||
| 03c7d590d0 | |||
| 8a90f63b09 | |||
| 491cdb8d71 | |||
| 68572b194e | |||
| 1eb634fe11 | |||
| dbccbf68f4 | |||
| 96204d809e | |||
| 7ac8edb5cf | |||
| 05561db5b8 | |||
| 149bf1849d | |||
| b952ac4d72 | |||
| 5c075bce8b | |||
| b77945a9e4 | |||
| aefe5493b0 | |||
| 75b8b281b8 | |||
| 44f139aa01 | |||
| a1b0a1918d | |||
| 467d8df6db | |||
| fea0b1dc05 | |||
| 7122fe7dbe | |||
| ff36b4871f | |||
| 03f63e3777 | |||
| ecd02a1af7 | |||
| b0d42939a6 | |||
| 502345782f | |||
| 9a7c1d64fd | |||
| 4b79b29ee6 | |||
| edc846ab05 | |||
| 0d27916188 | |||
| 0894446085 | |||
| 4187a8e820 | |||
| e1ec193a4f | |||
| ad9a8a4fe0 | |||
| 6a14232889 | |||
| b6296b8d97 | |||
| bc4d16e6f8 | |||
| e3a45a61ac | |||
| 7f58dd694b | |||
| 68f46a45b5 | |||
| 016f746c7c | |||
| b77bb3ad9d | |||
| b4ebae283b | |||
| 3bb322ede5 | |||
| b92a6f7b2b | |||
| d3a213ce33 | |||
| 8fc6c7176e | |||
| 929ac81515 | |||
| 75d2ac3c5f | |||
| 3e2b011d28 | |||
| 1c06689800 | |||
| a35f8cfd3a | |||
| 27d1d69360 | |||
| 8072d0b194 | |||
| a30600943d | |||
| 123cf8ad48 | |||
| 22b1e0097e | |||
| 7e507d4cc4 | |||
| f7dfd6d0c3 | |||
| cbff3074d1 | |||
| 9755e437c2 | |||
| fe0f45ea92 | |||
| b07c5a96f2 | |||
| dba765cb01 | |||
| 8ca015ecf8 | |||
| 6ab3946c31 | |||
| 603a814ad4 | |||
| 7736ccdc0c | |||
| d1b07f39fd | |||
| 8d4e7a16d1 | |||
| 4fca5afdfa | |||
| ea8028dfd5 |
48
.drone.yml
48
.drone.yml
@@ -1,6 +1,27 @@
|
|||||||
|
---
|
||||||
|
kind: secret
|
||||||
|
name: docker_username
|
||||||
|
get:
|
||||||
|
path: odit-registry-builder
|
||||||
|
name: username
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: secret
|
||||||
|
name: docker_password
|
||||||
|
get:
|
||||||
|
path: odit-registry-builder
|
||||||
|
name: password
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: secret
|
||||||
|
name: git_ssh
|
||||||
|
get:
|
||||||
|
path: odit-git-bot
|
||||||
|
name: sshkey
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: kubernetes
|
||||||
name: build:dev
|
name: build:dev
|
||||||
clone:
|
clone:
|
||||||
disable: true
|
disable: true
|
||||||
@@ -16,13 +37,14 @@ steps:
|
|||||||
depends_on: [clone]
|
depends_on: [clone]
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
from_secret: DOCKER_REGISTRY_USER
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: DOCKER_REGISTRY_PASSWORD
|
from_secret: docker_password
|
||||||
repo: registry.odit.services/lfk/document-server
|
repo: registry.odit.services/lfk/document-server
|
||||||
tags:
|
tags:
|
||||||
- dev
|
- dev
|
||||||
registry: registry.odit.services
|
registry: registry.odit.services
|
||||||
|
mtu: 1000
|
||||||
- name: run changelog export
|
- name: run changelog export
|
||||||
depends_on: ["clone"]
|
depends_on: ["clone"]
|
||||||
image: node:latest
|
image: node:latest
|
||||||
@@ -38,7 +60,7 @@ steps:
|
|||||||
author_email: bot@odit.services
|
author_email: bot@odit.services
|
||||||
remote: git@git.odit.services:lfk/document-server.git
|
remote: git@git.odit.services:lfk/document-server.git
|
||||||
ssh_key:
|
ssh_key:
|
||||||
from_secret: GITLAB_SSHKEY
|
from_secret: git_ssh
|
||||||
- name: run full license export
|
- name: run full license export
|
||||||
depends_on: ["clone"]
|
depends_on: ["clone"]
|
||||||
image: node:14.15.1-alpine3.12
|
image: node:14.15.1-alpine3.12
|
||||||
@@ -56,7 +78,7 @@ steps:
|
|||||||
remote: git@git.odit.services:lfk/document-server.git
|
remote: git@git.odit.services:lfk/document-server.git
|
||||||
skip_verify: true
|
skip_verify: true
|
||||||
ssh_key:
|
ssh_key:
|
||||||
from_secret: GITLAB_SSHKEY
|
from_secret: git_ssh
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
@@ -66,7 +88,7 @@ trigger:
|
|||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: kubernetes
|
||||||
name: build:latest
|
name: build:latest
|
||||||
clone:
|
clone:
|
||||||
disable: true
|
disable: true
|
||||||
@@ -84,13 +106,14 @@ steps:
|
|||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
from_secret: DOCKER_REGISTRY_USER
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: DOCKER_REGISTRY_PASSWORD
|
from_secret: docker_password
|
||||||
repo: registry.odit.services/lfk/document-server
|
repo: registry.odit.services/lfk/document-server
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
registry: registry.odit.services
|
registry: registry.odit.services
|
||||||
|
mtu: 1000
|
||||||
- name: push merge to repo
|
- name: push merge to repo
|
||||||
depends_on: ["clone"]
|
depends_on: ["clone"]
|
||||||
image: appleboy/drone-git-push
|
image: appleboy/drone-git-push
|
||||||
@@ -99,7 +122,7 @@ steps:
|
|||||||
commit: false
|
commit: false
|
||||||
remote: git@git.odit.services:lfk/document-server.git
|
remote: git@git.odit.services:lfk/document-server.git
|
||||||
ssh_key:
|
ssh_key:
|
||||||
from_secret: GITLAB_SSHKEY
|
from_secret: git_ssh
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
@@ -109,7 +132,7 @@ trigger:
|
|||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: kubernetes
|
||||||
name: build:tags
|
name: build:tags
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -118,13 +141,14 @@ steps:
|
|||||||
depends_on: [clone]
|
depends_on: [clone]
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
from_secret: DOCKER_REGISTRY_USER
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: DOCKER_REGISTRY_PASSWORD
|
from_secret: docker_password
|
||||||
repo: registry.odit.services/lfk/document-server
|
repo: registry.odit.services/lfk/document-server
|
||||||
tags:
|
tags:
|
||||||
- '${DRONE_TAG}'
|
- '${DRONE_TAG}'
|
||||||
registry: registry.odit.services
|
registry: registry.odit.services
|
||||||
|
mtu: 1000
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
302
CHANGELOG.md
302
CHANGELOG.md
@@ -2,4 +2,304 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
|
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
|
||||||
|
|
||||||
#### 0.1.0
|
#### [v0.4.3](https://git.odit.services/lfk/document-server/compare/v0.4.2...v0.4.3)
|
||||||
|
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`289a0d8`](https://git.odit.services/lfk/document-server/commit/289a0d8671575dda911c64f79d24726d3bbee071)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`457ea26`](https://git.odit.services/lfk/document-server/commit/457ea26cf8124009084415d12c7a0e31912a3eb1)
|
||||||
|
- 🚀Bumped version to v0.4.3 [`c3beb3e`](https://git.odit.services/lfk/document-server/commit/c3beb3e1032492f9a8304c4b099a700ad0d1d2cf)
|
||||||
|
- Pipeline mtu fix [`c2d2b66`](https://git.odit.services/lfk/document-server/commit/c2d2b66f2f6fbd30c2027fd3dab393db5219eb44)
|
||||||
|
|
||||||
|
#### [v0.4.2](https://git.odit.services/lfk/document-server/compare/v0.4.0...v0.4.2)
|
||||||
|
|
||||||
|
> 29 March 2021
|
||||||
|
|
||||||
|
- Merge pull request 'Release 0.4.2' (#39) from dev into main [`ce3053c`](https://git.odit.services/lfk/document-server/commit/ce3053c0ba5404ebd8d4cbd5386c454d8cd8c4d2)
|
||||||
|
- 🚀Bumped version to v0.4.1 [`d17108f`](https://git.odit.services/lfk/document-server/commit/d17108f4b9f041727afcee5c171d5d8f9a3c677c)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`0ade575`](https://git.odit.services/lfk/document-server/commit/0ade57536e372a62356fe2f329f6cfe04bcfc397)
|
||||||
|
- Fixed faulty object mapping [`9584bfe`](https://git.odit.services/lfk/document-server/commit/9584bfed8ba5b8c856b55aa90969874d4d6751ff)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`8bac1fa`](https://git.odit.services/lfk/document-server/commit/8bac1fadd6b4257e5062a1b1673e122c5b535046)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`b8f0d1f`](https://git.odit.services/lfk/document-server/commit/b8f0d1fa60da4e3262623cecf4a78c8a9a322f8c)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`073433f`](https://git.odit.services/lfk/document-server/commit/073433f308f2f8e7ada97dd0b3896fb541e85711)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`a478081`](https://git.odit.services/lfk/document-server/commit/a47808172797e12800c46d17ccf4b458f4a506de)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`6608456`](https://git.odit.services/lfk/document-server/commit/6608456c686e51d3aa16e630ba72c7c29e428b2a)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`0839ff6`](https://git.odit.services/lfk/document-server/commit/0839ff63593cfb9e8339b2b2a86dbe7e2afb5dcb)
|
||||||
|
- Now using our own images to build stuff 🚀 [`96886c7`](https://git.odit.services/lfk/document-server/commit/96886c74bc397e1ee793e83e0d01a6bbaa953da3)
|
||||||
|
- 🚀Bumped version to v0.4.2 [`1cbe5a1`](https://git.odit.services/lfk/document-server/commit/1cbe5a1614c40fbf23f032be60039ddb1472ca94)
|
||||||
|
- Emergency bugfixes 🐞 [`3c42ca3`](https://git.odit.services/lfk/document-server/commit/3c42ca30427174c21e0db6426d8f0d91a1ebc501)
|
||||||
|
- Let's try the mtu fix [`c51ec74`](https://git.odit.services/lfk/document-server/commit/c51ec74d30334b156668de4719c77f2e9c6d023f)
|
||||||
|
|
||||||
|
#### [v0.4.0](https://git.odit.services/lfk/document-server/compare/v0.3.3...v0.4.0)
|
||||||
|
|
||||||
|
> 14 March 2021
|
||||||
|
|
||||||
|
- Merge pull request 'Alpha Release 0.4.0' (#38) from dev into main [`8d3cc34`](https://git.odit.services/lfk/document-server/commit/8d3cc34395922a271da1032310da6ec6f7a164f7)
|
||||||
|
- Updated ci with new kubernetes secrets 🚀🚀🚀 [`b180e04`](https://git.odit.services/lfk/document-server/commit/b180e0404537404d0564453fde5976f4de672a8b)
|
||||||
|
- Updated styleing [`03ed6d5`](https://git.odit.services/lfk/document-server/commit/03ed6d5bc18c5b26edd7b1d698c9de936e008f32)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`b612562`](https://git.odit.services/lfk/document-server/commit/b612562d347f5fafcf4ce94a4508b7c0bb9370c6)
|
||||||
|
- 🚀Bumped version to v0.4.0 [`85519bc`](https://git.odit.services/lfk/document-server/commit/85519bc2e4e8906732dc5f99e417014a14bad7d0)
|
||||||
|
- Merge pull request 'Configureable contracts amount feature/35-contracts_per_runner' (#37) from feature/35-contracts_per_runner into dev [`ed02306`](https://git.odit.services/lfk/document-server/commit/ed023067386551dc92d60ba63dff8bc4cc44ce00)
|
||||||
|
- Added disclaimer to template [`4e1e124`](https://git.odit.services/lfk/document-server/commit/4e1e124d0dc08f96aeb05dd1c975064fe785b80f)
|
||||||
|
- Changed ci pipeline type to kubernetes [`677bd86`](https://git.odit.services/lfk/document-server/commit/677bd861335302269baec96a59916475bbdd405f)
|
||||||
|
- Added config for amount of contracts per runner [`d01b4a0`](https://git.odit.services/lfk/document-server/commit/d01b4a0b99f3c1aa088b02d766d21bfb6b9e3a29)
|
||||||
|
- Added logic for generateing multiple contracts per runner [`d991940`](https://git.odit.services/lfk/document-server/commit/d9919404b5b90151318d20258a273ca6c7640393)
|
||||||
|
- MAde disclaimer configurable via env [`5e4d6f4`](https://git.odit.services/lfk/document-server/commit/5e4d6f44dab581483135594432bd8c8d65ba74ef)
|
||||||
|
- MAde disclaimer configurable via env [`885765a`](https://git.odit.services/lfk/document-server/commit/885765ac71b6a65c869ee841c383667f4947dcde)
|
||||||
|
- Documented the new config var [`31a5950`](https://git.odit.services/lfk/document-server/commit/31a59500fa77f1ad7c54fa297d00c8707ae6db9c)
|
||||||
|
- Merge pull request 'Configurable sponsoring disclaimer feature/33-disclaimer' (#34) from feature/33-disclaimer into dev [`e9d3574`](https://git.odit.services/lfk/document-server/commit/e9d35745997a9e948509ea67b59f5a7658f9d652)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`19fbf50`](https://git.odit.services/lfk/document-server/commit/19fbf50f6f6057c5321a999b6551d05db32b5fd8)
|
||||||
|
- Added reamde entry for the new env var [`9dd62ce`](https://git.odit.services/lfk/document-server/commit/9dd62cefa94bf3f0bf8e77fd25e7ca1ec4b30e2b)
|
||||||
|
|
||||||
|
#### [v0.3.3](https://git.odit.services/lfk/document-server/compare/v0.3.2...v0.3.3)
|
||||||
|
|
||||||
|
> 19 February 2021
|
||||||
|
|
||||||
|
- Merge pull request 'Alpha Release 0.3.3 - Download options' (#32) from dev into main [`21b5e04`](https://git.odit.services/lfk/document-server/commit/21b5e048ed5ed72f88304e5c737639c54cc71483)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`d1a29c1`](https://git.odit.services/lfk/document-server/commit/d1a29c1cbb8845a1adf8a414d158ebcabd48dc04)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`fd8b7e5`](https://git.odit.services/lfk/document-server/commit/fd8b7e56da4a1601141f63627e3990660c521ea6)
|
||||||
|
- Added download option to cards [`1ca5d3e`](https://git.odit.services/lfk/document-server/commit/1ca5d3ea078ef51818657e2b3c9f114c67bff86d)
|
||||||
|
- Added download header [`55877de`](https://git.odit.services/lfk/document-server/commit/55877de2aa46583f30d033467037e0454d1236be)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`c012b49`](https://git.odit.services/lfk/document-server/commit/c012b4943d96ee3a9442c65389c4dcea08642109)
|
||||||
|
- 🚀Bumped version to v0.3.3 [`ba566bc`](https://git.odit.services/lfk/document-server/commit/ba566bcc33ed920324cd9977b3f293a2c629f92c)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`a386c5b`](https://git.odit.services/lfk/document-server/commit/a386c5bef88da29e4447399d4edca0234b674ed5)
|
||||||
|
|
||||||
|
#### [v0.3.2](https://git.odit.services/lfk/document-server/compare/v0.3.0...v0.3.2)
|
||||||
|
|
||||||
|
> 18 February 2021
|
||||||
|
|
||||||
|
- Merge pull request 'Alpha Release 0.3.2' (#31) from dev into main [`e6f7dd2`](https://git.odit.services/lfk/document-server/commit/e6f7dd2be8d729f5fc7fbb458cc859b113f5aa86)
|
||||||
|
- 🚀Bumped version to v0.3.1 [`dcde424`](https://git.odit.services/lfk/document-server/commit/dcde424b77dcc9753859f94f7bcbe24fe3523c27)
|
||||||
|
- 📖New license file version [CI SKIP] [skip ci] [`92c5240`](https://git.odit.services/lfk/document-server/commit/92c52401b398f6a2f247c10879e17f6dc105aa8e)
|
||||||
|
- Now manually parsing runnergroup full names [`c290908`](https://git.odit.services/lfk/document-server/commit/c2909082a2dbb38041ae0fc695bd0fa1451b39ff)
|
||||||
|
- Implemented basic auth [`bdeadd2`](https://git.odit.services/lfk/document-server/commit/bdeadd274bc0f9c8cbab35a8a5605bef4c22ba6c)
|
||||||
|
- 📖New license file version [CI SKIP] [skip ci] [`9d7d044`](https://git.odit.services/lfk/document-server/commit/9d7d0443848522e5bdfdb6a80c836bea4bc200a1)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`cc6a53b`](https://git.odit.services/lfk/document-server/commit/cc6a53b25895594874acca370a1439d37bb280de)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`e306cdb`](https://git.odit.services/lfk/document-server/commit/e306cdb2c8e58fc1aef79b95cba5d4cc96ac7658)
|
||||||
|
- Added auth to openapi spec [`729f2d7`](https://git.odit.services/lfk/document-server/commit/729f2d7240b54ffe2d4db36cce29de0afdfc9417)
|
||||||
|
- Pinned routing controllers version as temp workaround for routing controllers openapi being broken again [`7ca7266`](https://git.odit.services/lfk/document-server/commit/7ca7266ea46965251c9df637a2556f2a1706e7e6)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`b7c6c6e`](https://git.odit.services/lfk/document-server/commit/b7c6c6e15708e471f5c3d0ca4cf11b1c08c88c9c)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`95099c5`](https://git.odit.services/lfk/document-server/commit/95099c5fbd7e6cb07c68151a998eebb0f00556f3)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`49590b8`](https://git.odit.services/lfk/document-server/commit/49590b897ed5ee5c9386d34408ac6868f43cc27c)
|
||||||
|
- 🚀Bumped version to v0.3.2 [`a9019e4`](https://git.odit.services/lfk/document-server/commit/a9019e4c67e7620b65650d60b0ebd57bc11a854e)
|
||||||
|
- Merge pull request 'Now using full group names feature/18-group_names' (#30) from feature/18-group_names into dev [`e0db6f6`](https://git.odit.services/lfk/document-server/commit/e0db6f6a78d0026a8485a57c88af1e9407bd68a4)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`adf11ab`](https://git.odit.services/lfk/document-server/commit/adf11ab1c356b6964230541331836abd363170b0)
|
||||||
|
- Updated templates with full group name [`0fcfb30`](https://git.odit.services/lfk/document-server/commit/0fcfb30d5c13266ca4faf7697308dfb7a0f91b4f)
|
||||||
|
- Merge pull request 'Alpha Release 0.3.1 - API Keys' (#29) from dev into main [`db91661`](https://git.odit.services/lfk/document-server/commit/db916615564813e8d21e3672581e4f3a4d748b89)
|
||||||
|
- Merge pull request 'API Key based auth feature/26-api_auth' (#27) from feature/26-api_auth into dev [`2d031da`](https://git.odit.services/lfk/document-server/commit/2d031dae035866a4aa247398ea68ff338ab58cbd)
|
||||||
|
- Added api key to env doc [`4543092`](https://git.odit.services/lfk/document-server/commit/454309278ef20a2b97248277b07a7b58a063618d)
|
||||||
|
- Fixed bug [`7be211f`](https://git.odit.services/lfk/document-server/commit/7be211f8b7b26f7f620df81af4ebde5eec2feec2)
|
||||||
|
|
||||||
|
#### [v0.3.0](https://git.odit.services/lfk/document-server/compare/v0.2.0...v0.3.0)
|
||||||
|
|
||||||
|
> 12 February 2021
|
||||||
|
|
||||||
|
- Merge pull request 'Alpha Release 0.3.0 - Runnercard generation' (#25) from dev into main [`406add3`](https://git.odit.services/lfk/document-server/commit/406add3d517473d01628b6405569de6cb85114e0)
|
||||||
|
- 🚀Bumped version to v0.2.0 [`491cdb8`](https://git.odit.services/lfk/document-server/commit/491cdb8d71a80ea196d16334c0c80b8f7cc859c5)
|
||||||
|
- Added card generation speed tests (part 1) [`68572b1`](https://git.odit.services/lfk/document-server/commit/68572b194eb740238be8101efed6fdb2a207f65b)
|
||||||
|
- Implemented first experimental speedtest [`e3a45a6`](https://git.odit.services/lfk/document-server/commit/e3a45a61ac3b2d691c2f75d36155896b7ed301d8)
|
||||||
|
- Added basic logic to generate two-sided runnercards [`d3a213c`](https://git.odit.services/lfk/document-server/commit/d3a213ce3326aeb96d924e16a31fc87bf82eb5b3)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`149bf18`](https://git.odit.services/lfk/document-server/commit/149bf1849db20b863ec998a72c77559ec401bc32)
|
||||||
|
- Fixed double-sided printing [`7f58dd6`](https://git.odit.services/lfk/document-server/commit/7f58dd694b53152069c2095b2e18dd3a46cd04dd)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`e74b9a4`](https://git.odit.services/lfk/document-server/commit/e74b9a4c9d041780e0cfd8c4d68a5b63f916e091)
|
||||||
|
- Added basic card generation function [`8fc6c71`](https://git.odit.services/lfk/document-server/commit/8fc6c7176ee92f813db1e1d4b3e5ef1b2f4e1aef)
|
||||||
|
- Beautified output a bit [`aefe549`](https://git.odit.services/lfk/document-server/commit/aefe5493b06c04cc2b20029e1f7fc5f15ec9c04e)
|
||||||
|
- Added barcode generatin [`5c075bc`](https://git.odit.services/lfk/document-server/commit/5c075bce8b94ff4482448c3cd56bdc28cbe0a7d9)
|
||||||
|
- Implemented runner generation using fakerjs [`0894446`](https://git.odit.services/lfk/document-server/commit/08944460854c78cd4368cf178b022c31b624c8d9)
|
||||||
|
- Styled front [`016f746`](https://git.odit.services/lfk/document-server/commit/016f746c7cec29ab391b3918c7589dea0cff9890)
|
||||||
|
- Now loading sponsor logos from env [`29376a7`](https://git.odit.services/lfk/document-server/commit/29376a7782ce39f04f856ec78775e65aa11f0ed7)
|
||||||
|
- Implmented sponsoring image selection from array [`68a1b8f`](https://git.odit.services/lfk/document-server/commit/68a1b8f3e0515e56c7c6069f7f3ef8db24c92674)
|
||||||
|
- 📖New license file version [CI SKIP] [skip ci] [`dbccbf6`](https://git.odit.services/lfk/document-server/commit/dbccbf68f4e22470b4fc93c894527cc78973e324)
|
||||||
|
- Added cards api endpoint [`929ac81`](https://git.odit.services/lfk/document-server/commit/929ac81515b3b426ff06f1d6d913bab930421a92)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`96204d8`](https://git.odit.services/lfk/document-server/commit/96204d809e852c1bcea808a9c8f5ca0f8475c87f)
|
||||||
|
- Fixed runnercard backside padding [`08e8587`](https://git.odit.services/lfk/document-server/commit/08e858726c1462b599ba9cb3f7fb057f35178b83)
|
||||||
|
- Added sizing for the real cards [`b92a6f7`](https://git.odit.services/lfk/document-server/commit/b92a6f7b2b98fb0074d5a563d9918295e9ec0274)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`8a90f63`](https://git.odit.services/lfk/document-server/commit/8a90f63b0919376beefef6a52aae9a59337aea59)
|
||||||
|
- 🚀Bumped version to v0.3.0 [`449a96b`](https://git.odit.services/lfk/document-server/commit/449a96b3027fe93d8042b30420245f66e92f14b8)
|
||||||
|
- Merge pull request 'Card generation feature/14-card_generation' (#24) from feature/14-card_generation into dev [`703eaa0`](https://git.odit.services/lfk/document-server/commit/703eaa0e9d667b628eab4e8496689fe66238f896)
|
||||||
|
- Added speedtest script to package [`75b8b28`](https://git.odit.services/lfk/document-server/commit/75b8b281b87d9b173093f16beae12d707ec05052)
|
||||||
|
- Fixed bug in array swapping function [`9697d53`](https://git.odit.services/lfk/document-server/commit/9697d53a1527854536f8ddf5426f7ca902772f51)
|
||||||
|
- Added **very** basic backside [`68f46a4`](https://git.odit.services/lfk/document-server/commit/68f46a45b5a51c8a8edafca852cb274af388fa76)
|
||||||
|
- Added card generation speed tests (part 2) [`d38923c`](https://git.odit.services/lfk/document-server/commit/d38923c4ad3a2cf8872e236dd42f078e2a0e1045)
|
||||||
|
- Implemented basic contracts tests in various sizes [`a1b0a19`](https://git.odit.services/lfk/document-server/commit/a1b0a1918db552eb385fedcbaa576ad493a1d605)
|
||||||
|
- tmp [`0d27916`](https://git.odit.services/lfk/document-server/commit/0d27916188114fa41e666170135de2b714ff113a)
|
||||||
|
- Added new env vars to readme [`cf0f583`](https://git.odit.services/lfk/document-server/commit/cf0f5839ee1e1b87f7b5bd5a299a35574fd1bb3c)
|
||||||
|
- Merge pull request 'Added speedtest feature/19-speed_test' (#23) from feature/19-speed_test into dev [`7ac8edb`](https://git.odit.services/lfk/document-server/commit/7ac8edb5cf4b7317a703faa32ded482a8c2b9b91)
|
||||||
|
|
||||||
|
#### [v0.2.0](https://git.odit.services/lfk/document-server/compare/v0.1.3...v0.2.0)
|
||||||
|
|
||||||
|
> 9 February 2021
|
||||||
|
|
||||||
|
- Merge pull request 'Alpha Release 0.2.0 - The barcode release' (#22) from dev into main [`b952ac4`](https://git.odit.services/lfk/document-server/commit/b952ac4d728952e1fb6d26b0929e3f946748b85b)
|
||||||
|
- Implemented async barcode generation using async helpers [`edc846a`](https://git.odit.services/lfk/document-server/commit/edc846ab05319a4e60422625678f204bc145884c)
|
||||||
|
- 📖New license file version [CI SKIP] [skip ci] [`fea0b1d`](https://git.odit.services/lfk/document-server/commit/fea0b1dc0582d2906bad22f2ff5e5aad90a1c885)
|
||||||
|
- Reworked template layout for barcode [`1c06689`](https://git.odit.services/lfk/document-server/commit/1c066898009883f510fa204c66800e5f6228a15d)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`7122fe7`](https://git.odit.services/lfk/document-server/commit/7122fe7dbe3fae64806492636255147078eb03c8)
|
||||||
|
- Merge pull request 'Barcode generation feature/13-barcode_generation' (#21) from feature/13-barcode_generation into dev [`ff36b48`](https://git.odit.services/lfk/document-server/commit/ff36b4871f2d696c0b86883d529365ee8f1c6132)
|
||||||
|
- Now with working code scaleing [`4b79b29`](https://git.odit.services/lfk/document-server/commit/4b79b29ee6319559c9d68ddb11f831d25f12b3da)
|
||||||
|
- Added basic barcode generation [`8072d0b`](https://git.odit.services/lfk/document-server/commit/8072d0b1940ef6f316ce78dcbcb9e5af5bab04e7)
|
||||||
|
- Now loading barcode format from env with overwrite via query param [`9a7c1d6`](https://git.odit.services/lfk/document-server/commit/9a7c1d64fdbdadbd104739133a87773e4d2bca01)
|
||||||
|
- Added fallback error image [`5023457`](https://git.odit.services/lfk/document-server/commit/502345782f26895ccf3089d15c3817709b62dfcc)
|
||||||
|
- First part of the handlebars barcode generation [`a35f8cf`](https://git.odit.services/lfk/document-server/commit/a35f8cfd3aa94923968fd77425c074844d28ec0d)
|
||||||
|
- Added todo [`75d2ac3`](https://git.odit.services/lfk/document-server/commit/75d2ac3c5f80f8440b6d48c33b15ef17565559b3)
|
||||||
|
- Removed promise [`e1ec193`](https://git.odit.services/lfk/document-server/commit/e1ec193a4ff1cd618da90f5f2d029ec848a6f669)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`03f63e3`](https://git.odit.services/lfk/document-server/commit/03f63e3777381a4475910e6fa4a3986f87b73f39)
|
||||||
|
- Fixed broken mime-type [`4187a8e`](https://git.odit.services/lfk/document-server/commit/4187a8e82015495c0e0362e957e236ed6935a908)
|
||||||
|
- Switched to using the current runner's id as the barcode text [`3e2b011`](https://git.odit.services/lfk/document-server/commit/3e2b011d2887d261fb9c36820982095d6dd6d847)
|
||||||
|
- Added barcode field to template [`27d1d69`](https://git.odit.services/lfk/document-server/commit/27d1d69360c8513079abcfe3a6fc2a50309a2b61)
|
||||||
|
|
||||||
|
#### [v0.1.3](https://git.odit.services/lfk/document-server/compare/v0.1.2...v0.1.3)
|
||||||
|
|
||||||
|
> 9 February 2021
|
||||||
|
|
||||||
|
- Merge pull request 'Alpha Release 0.1.3 - More env vars' (#20) from dev into main [`ecd02a1`](https://git.odit.services/lfk/document-server/commit/ecd02a1af7431d0bf615c4ec064f64e023946e49)
|
||||||
|
- 🚀Bumped version to v0.1.3 [`6a14232`](https://git.odit.services/lfk/document-server/commit/6a142328898d5b89fa11eaf033372971d1093b0c)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`ad9a8a4`](https://git.odit.services/lfk/document-server/commit/ad9a8a4fe0649d48db924771be8ecb4cbf5c162a)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`b6296b8`](https://git.odit.services/lfk/document-server/commit/b6296b8d97cda943dfb5e11bc9dfbb2f363f5b81)
|
||||||
|
- Merge pull request 'Load more stuff from env feature/16-env_vars' (#17) from feature/16-env_vars into dev [`bc4d16e`](https://git.odit.services/lfk/document-server/commit/bc4d16e6f8959ed35d7e87647de84584cdfddd7b)
|
||||||
|
- Added new env vars to config [`3bb322e`](https://git.odit.services/lfk/document-server/commit/3bb322ede5db15a147c0d7a8db2a68ccb7fa2112)
|
||||||
|
- Added new env vars to readme [`b77bb3a`](https://git.odit.services/lfk/document-server/commit/b77bb3ad9dba9d73c2c81215ba57936192155a9a)
|
||||||
|
- Now loading interpolation vars from config/env [`b4ebae2`](https://git.odit.services/lfk/document-server/commit/b4ebae283b472b2f0c6e28caed49b30edb119585)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`a306009`](https://git.odit.services/lfk/document-server/commit/a30600943d01116b99e946cb705a16d0372b5095)
|
||||||
|
|
||||||
|
#### [v0.1.2](https://git.odit.services/lfk/document-server/compare/v0.1.1...v0.1.2)
|
||||||
|
|
||||||
|
> 7 February 2021
|
||||||
|
|
||||||
|
- Merge pull request 'Alpha Release 0.1.2 - Hotfix release' (#15) from dev into main [`123cf8a`](https://git.odit.services/lfk/document-server/commit/123cf8ad48a45fa10dcd5208215a6e525f31115a)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`22b1e00`](https://git.odit.services/lfk/document-server/commit/22b1e0097efc865de9cc150cb0d0b99bf789b519)
|
||||||
|
- 🚀Bumped version to v0.1.2 [`7e507d4`](https://git.odit.services/lfk/document-server/commit/7e507d4cc415877ac0b25503dc0ff9ecdceabf42)
|
||||||
|
- PAtch: Copy locales [`f7dfd6d`](https://git.odit.services/lfk/document-server/commit/f7dfd6d0c3c69881338bc1f66d5d33ae9abff628)
|
||||||
|
|
||||||
|
#### [v0.1.1](https://git.odit.services/lfk/document-server/compare/v0.1.0...v0.1.1)
|
||||||
|
|
||||||
|
> 7 February 2021
|
||||||
|
|
||||||
|
- Merge pull request 'Alpha Release 0.1.1 - Hotfix release' (#12) from dev into main [`cbff307`](https://git.odit.services/lfk/document-server/commit/cbff3074d10110dbb64dda1ed516d2a18402eeca)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`4fca5af`](https://git.odit.services/lfk/document-server/commit/4fca5afdfa15d3260ac28c1feb89d50221b1f03f)
|
||||||
|
- Updated dockerfile & build for dockerized puppeteer [`ea8028d`](https://git.odit.services/lfk/document-server/commit/ea8028dfd54861335e9752334db335ad21e75cf2)
|
||||||
|
- 📖New license file version [CI SKIP] [skip ci] [`8d4e7a1`](https://git.odit.services/lfk/document-server/commit/8d4e7a16d1ebae6976ec183b761ca3e6a8946629)
|
||||||
|
- Revert "Now only using our mirror to build" [`fe0f45e`](https://git.odit.services/lfk/document-server/commit/fe0f45ea92099a65d998e342ef885af39d06915f)
|
||||||
|
- Now only using our mirror to build [`b07c5a9`](https://git.odit.services/lfk/document-server/commit/b07c5a96f2a670f2279a6575b03f9c553b59e0a9)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`9755e43`](https://git.odit.services/lfk/document-server/commit/9755e437c2b68c09e9b0ffa47c6bc1729e6bee14)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`603a814`](https://git.odit.services/lfk/document-server/commit/603a814ad4783c0b29c1f6a1db638f269b29f775)
|
||||||
|
- Switched to using our mirrored images for buildi [`dba765c`](https://git.odit.services/lfk/document-server/commit/dba765cb017998ad636f3f91fb00a8a277d3b225)
|
||||||
|
- 🚀Bumped version to v0.1.1 [`d1b07f3`](https://git.odit.services/lfk/document-server/commit/d1b07f39fd7e3c282a631924bf45367e866e667a)
|
||||||
|
- Pinned alpine version [`6ab3946`](https://git.odit.services/lfk/document-server/commit/6ab3946c31a7716d1c42fb217b0a0f7be8172dba)
|
||||||
|
|
||||||
|
#### v0.1.0
|
||||||
|
|
||||||
|
> 7 February 2021
|
||||||
|
|
||||||
|
- Merge pull request 'Alpha Release 0.1.0 - Contract generation' (#11) from dev into main [`bc2b6fa`](https://git.odit.services/lfk/document-server/commit/bc2b6fadd912f275bc05be29c6fbd87367d617df)
|
||||||
|
- 📖New license file version [CI SKIP] [skip ci] [`ee19efa`](https://git.odit.services/lfk/document-server/commit/ee19efa0e63f21a10fed1cf24beb16118bbe6cde)
|
||||||
|
- 🚀Bumped version to v0.0.2 [`de432c4`](https://git.odit.services/lfk/document-server/commit/de432c448129a8acb36fef6b40ef920eeb2f7887)
|
||||||
|
- First working (TM) template code [`a9e3360`](https://git.odit.services/lfk/document-server/commit/a9e3360ee258e4d48c8dbe3a55468409bb6ee0f7)
|
||||||
|
- Working Styleing [`c617c40`](https://git.odit.services/lfk/document-server/commit/c617c40e9d7e03382f647eafde9ff458db3c6c15)
|
||||||
|
- Removed base64 image [`e401d0e`](https://git.odit.services/lfk/document-server/commit/e401d0ec7219e88fbb277b2dcf456a22dae0d1e5)
|
||||||
|
- Updated the contract template to use external css [`6121b1e`](https://git.odit.services/lfk/document-server/commit/6121b1e3bfcf6fc9f88e0589205044c59859b4a7)
|
||||||
|
- Sorted locales [`1962499`](https://git.odit.services/lfk/document-server/commit/1962499d18685347302fd7d8491c6e3e7a355fcb)
|
||||||
|
- Switched to puppeteer for pdf generation [`5afd26e`](https://git.odit.services/lfk/document-server/commit/5afd26ea22cff3b8a339cf658ed37d2053db24ba)
|
||||||
|
- Added a coupple of real replacement strings to the sponsoring template [`041c0ed`](https://git.odit.services/lfk/document-server/commit/041c0ed6bbe5f8645e4e96b57c02d4e45b445402)
|
||||||
|
- Added automatic img to base64 conversion [`42443af`](https://git.odit.services/lfk/document-server/commit/42443af734ccc9ce202aec045a07775f4a054b92)
|
||||||
|
- Added i18n strings [`e345c36`](https://git.odit.services/lfk/document-server/commit/e345c36dd0b03f276259521aebf423853a81a04d)
|
||||||
|
- first working pdf generation from class 🎉 [`3af76a5`](https://git.odit.services/lfk/document-server/commit/3af76a53e3156bdc2d1d3ade6ff940db9d7b24b5)
|
||||||
|
- Added a bunch of english and german translations 🌎 [`784d7c6`](https://git.odit.services/lfk/document-server/commit/784d7c656fd2dfc726722459f3ccb7612021b882)
|
||||||
|
- Added translations using i18next [`75eb925`](https://git.odit.services/lfk/document-server/commit/75eb9252672883f7b6f89a812a37d2b96f9f626e)
|
||||||
|
- Switched to handlebars for templateing [`4acf3e3`](https://git.odit.services/lfk/document-server/commit/4acf3e39ce55c0ad9e697cf9598569ec1c1dcb44)
|
||||||
|
- Moved pdf creatior initialization to new function [`47a05fa`](https://git.odit.services/lfk/document-server/commit/47a05facb33c178e9bf3f99c25049abc010361c4)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`f3de80a`](https://git.odit.services/lfk/document-server/commit/f3de80af78c96bd697715a30dee7cae6806f9f9f)
|
||||||
|
- 🚀Bumped version to v0.1.0 [`6a42fe3`](https://git.odit.services/lfk/document-server/commit/6a42fe37d053a6a00005e3c5781edfcefe61183e)
|
||||||
|
- Merge pull request 'Sponsoring contract generation feature/5-sponsoring_contracts' (#10) from feature/5-sponsoring_contracts into dev [`84259d3`](https://git.odit.services/lfk/document-server/commit/84259d37d42234e1be75f3a5c95f4b442a9e5844)
|
||||||
|
- Added optimization args [`140fda1`](https://git.odit.services/lfk/document-server/commit/140fda11cc88cb93218116d4cbdbf13c014a659d)
|
||||||
|
- Added first parts of template [`13776d1`](https://git.odit.services/lfk/document-server/commit/13776d1ecb2db03f19dd0c01a930d4c98222cf6b)
|
||||||
|
- Added pdf merging for big requests (over 100 runners) [`785544c`](https://git.odit.services/lfk/document-server/commit/785544ca16cd4907a378eb2d48e4269778e3dccc)
|
||||||
|
- Fixed file broken in merge [`c07c6ae`](https://git.odit.services/lfk/document-server/commit/c07c6aeeab70589a4e1ddf025a07bde96c68ef6e)
|
||||||
|
- Now with workin i18n-ally config🥳 [`7c3813b`](https://git.odit.services/lfk/document-server/commit/7c3813b94d06ca38b83db90b7f9fba6c33716a05)
|
||||||
|
- Now with workin i18n-ally config🥳 [`b4232e5`](https://git.odit.services/lfk/document-server/commit/b4232e51e084f491d1a7fb4f929327e88f3b4c00)
|
||||||
|
- Now accepting arrays for sponsoring contract generation [`f833ae2`](https://git.odit.services/lfk/document-server/commit/f833ae222e68b7df9b8f8a8ec7ce17d679a9710f)
|
||||||
|
- Added full interpolation support to the i18n [`f755f4f`](https://git.odit.services/lfk/document-server/commit/f755f4f9fb1463af6bec3cf73b7fabf95ef3fb2e)
|
||||||
|
- Added option to generate empty sponsoring contracts [`1ced0e3`](https://git.odit.services/lfk/document-server/commit/1ced0e317544217599a42c6b270c9136dc73676d)
|
||||||
|
- Added translation sorting secript [`1e67672`](https://git.odit.services/lfk/document-server/commit/1e67672ef0d28f94a50b0377cca8e8ff2a87e983)
|
||||||
|
- Removed the example data from the fill-in fields [`5e12525`](https://git.odit.services/lfk/document-server/commit/5e1252545b7eafeee6c3a1d67567d00e5d615d85)
|
||||||
|
- Edited html template [`d58453f`](https://git.odit.services/lfk/document-server/commit/d58453faf9840037c583e029c41ef1b31a0bafa8)
|
||||||
|
- PDF Creator now accepts single instances of class [`78205ee`](https://git.odit.services/lfk/document-server/commit/78205ee8c7659ae0dc2e4a184554b042251d9271)
|
||||||
|
- PDF Creator now accepts single instances of class [`ba7cedd`](https://git.odit.services/lfk/document-server/commit/ba7cedd187dbc51a53ba169889d8e0ca22a97b5d)
|
||||||
|
- Updated template for i18n [`a596188`](https://git.odit.services/lfk/document-server/commit/a596188c00444c285565eecbb1f0bc668bb4706c)
|
||||||
|
- Parellized the chunks [`e92820e`](https://git.odit.services/lfk/document-server/commit/e92820e12f289b4fd28b4ebc985b5b711777fc35)
|
||||||
|
- Fixed the controller not waiting for initialization [`ee8ba99`](https://git.odit.services/lfk/document-server/commit/ee8ba99cc7778f89a8bb99400c7d1cf1a12898f7)
|
||||||
|
- Implemented language selection by query param [`6f81566`](https://git.odit.services/lfk/document-server/commit/6f81566cb82a0801a20523a7177996ea40cb3968)
|
||||||
|
- Added comments [`cd51e78`](https://git.odit.services/lfk/document-server/commit/cd51e78282278cae6cb86bd0c9616746612a97e3)
|
||||||
|
- Added example locales [`1969769`](https://git.odit.services/lfk/document-server/commit/19697692bcb6c0c1c978918916caccd95a8f2035)
|
||||||
|
- Fixed data validation problem [`bd6ec62`](https://git.odit.services/lfk/document-server/commit/bd6ec6215d362325c510611e4545b7643b918200)
|
||||||
|
- Removed fullname from groups (to be renabled later) [`388d8a2`](https://git.odit.services/lfk/document-server/commit/388d8a2dc6ee06d39e621e1e45ae595dae587483)
|
||||||
|
- Updated comments [`119102a`](https://git.odit.services/lfk/document-server/commit/119102aef8f43a68f537e7542c2f2cd3b41cd28e)
|
||||||
|
- Updated readme for handlebars [`05e4718`](https://git.odit.services/lfk/document-server/commit/05e471878f2321a1873b21730ae85ad6b8af5766)
|
||||||
|
- Updated readme [`f69e777`](https://git.odit.services/lfk/document-server/commit/f69e7779e42f18df7ec3ccb1cdf9dcf7fa845ee6)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`f4a34dd`](https://git.odit.services/lfk/document-server/commit/f4a34dd36b57bd122a650f2de4ea8e00816276ed)
|
||||||
|
- Typos [`95b882a`](https://git.odit.services/lfk/document-server/commit/95b882aceded275ad89446ad92a10cf36b166ab7)
|
||||||
|
- Added sentence about large requests to the /contracts openapi description [`4773a5f`](https://git.odit.services/lfk/document-server/commit/4773a5f18c866b6e9d50b421d7917416860cb6b5)
|
||||||
|
- Removed puppeteer args [`06dedc0`](https://git.odit.services/lfk/document-server/commit/06dedc0797b649f3fa8934f0d774ccae2b062849)
|
||||||
|
- Expanded max request body size to 500mb [`4f191dc`](https://git.odit.services/lfk/document-server/commit/4f191dcb52cd727e34770ab4304937cd1e7e480d)
|
||||||
|
- Now awaiting language change [`c07319b`](https://git.odit.services/lfk/document-server/commit/c07319b250db9452f6122e797b6059151031e2a9)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`42d6c40`](https://git.odit.services/lfk/document-server/commit/42d6c40d0c673f39c27e3d5a6484f01a4da77266)
|
||||||
|
- Formatting [`2d0b7ce`](https://git.odit.services/lfk/document-server/commit/2d0b7ce79ed47d4827096a2bbccfe3bbcd061810)
|
||||||
|
- Removed useless await [`4cd437b`](https://git.odit.services/lfk/document-server/commit/4cd437b6afe40e4c09027c0e2004a1130bc51870)
|
||||||
|
- Updated comments [`cf9cd29`](https://git.odit.services/lfk/document-server/commit/cf9cd298b638012e079be0a04d1b48efea20026f)
|
||||||
|
- Merge pull request 'Patch 0.0.2' (#9) from dev into main [`4585a83`](https://git.odit.services/lfk/document-server/commit/4585a83838b80552160c9d9e5be0af891eae39c8)
|
||||||
|
- Merge pull request 'Basic documentation feature/6-documentation' (#8) from feature/6-documentation into dev [`73915da`](https://git.odit.services/lfk/document-server/commit/73915da20321940e22145b4c5d830b9f700be566)
|
||||||
|
- 📖New license file version [CI SKIP] [skip ci] [`465efe0`](https://git.odit.services/lfk/document-server/commit/465efe03000ecc00d14479ac38710ffdba2cafb5)
|
||||||
|
- Typos [`68e34a9`](https://git.odit.services/lfk/document-server/commit/68e34a9054a195545b0bd10ce888f7274854fae6)
|
||||||
|
- Merge pull request 'Implemented the basics for templateing feature/3-pdf_templateing' (#4) from feature/3-pdf_templateing into dev [`15f1641`](https://git.odit.services/lfk/document-server/commit/15f16415c0ac5012df8126c8df6bd4da93ad0a20)
|
||||||
|
- Merge pull request 'Implemented the basic request classes feature/1-input_classes' (#2) from feature/1-input_classes into dev [`b5e79e5`](https://git.odit.services/lfk/document-server/commit/b5e79e51ef5d751a67e7a1763809ece91a7627f2)
|
||||||
|
- Added openapi viewers [`6435c8a`](https://git.odit.services/lfk/document-server/commit/6435c8a88e2ea3f4417ad5d8be9a07b9c043b41b)
|
||||||
|
- 📖New license file version [CI SKIP] [skip ci] [`d493e74`](https://git.odit.services/lfk/document-server/commit/d493e74bf39bc85de842ac7cd3e3d37ba8797a04)
|
||||||
|
- Initial commit [`0908bcd`](https://git.odit.services/lfk/document-server/commit/0908bcd63529b44463bc57ad7d6b8785564e4ddc)
|
||||||
|
- Added address class and errors [`d291cf0`](https://git.odit.services/lfk/document-server/commit/d291cf0d1bf375e96fda822543d5ceb29dc67010)
|
||||||
|
- Added drone file [`48d7cad`](https://git.odit.services/lfk/document-server/commit/48d7cad9f37485656cfb1c70abef158b5dd8d847)
|
||||||
|
- Added the donation classes [`1d73e4e`](https://git.odit.services/lfk/document-server/commit/1d73e4ed9ccb3dfb7709cb89957ed5bbcefad870)
|
||||||
|
- Added openapi related classes [`9d62225`](https://git.odit.services/lfk/document-server/commit/9d6222547811fd3c94b91496d9917b7df5115fc6)
|
||||||
|
- Added a bs example template [`f726a6e`](https://git.odit.services/lfk/document-server/commit/f726a6e699575b839d332c15e61c9008fe996fa9)
|
||||||
|
- Added a basic donor class [`cfa65e8`](https://git.odit.services/lfk/document-server/commit/cfa65e83cafcefbd6261a99ab7a4eaf099665a81)
|
||||||
|
- Added input class for contract generation [`63f9523`](https://git.odit.services/lfk/document-server/commit/63f952376698c3561754bfb206a64c58c1ae86f1)
|
||||||
|
- Initialized package [`b0427a6`](https://git.odit.services/lfk/document-server/commit/b0427a6d810656096c467881a302eef244f86d29)
|
||||||
|
- Added a simplified runnergroup class [`e29c17a`](https://git.odit.services/lfk/document-server/commit/e29c17a29a6ee84944f8d67d7b6f3c4292763c10)
|
||||||
|
- Resolved fun issues with promises [`4617f2c`](https://git.odit.services/lfk/document-server/commit/4617f2c5bdcb29534b46865ebe21d15e2b1cd72f)
|
||||||
|
- Added a runnercard class [`cb7325b`](https://git.odit.services/lfk/document-server/commit/cb7325bbf906b405955bd81e199abae5edc27d91)
|
||||||
|
- Added a basic readme [`df94b1b`](https://git.odit.services/lfk/document-server/commit/df94b1b750922989d870546150ff8d9ff8af4102)
|
||||||
|
- Added base app [`915ff92`](https://git.odit.services/lfk/document-server/commit/915ff92418a2859c11e0ce58b79220fb5ea06c7f)
|
||||||
|
- Added vscode workspace config [`ae466b4`](https://git.odit.services/lfk/document-server/commit/ae466b4d7e5b67c5cd1bc440214f477d15f768a2)
|
||||||
|
- Created a pdf class that takes care of the pdf wrapping [`7d5b575`](https://git.odit.services/lfk/document-server/commit/7d5b5750ad78fd979cb1b647d8b318a84513532a)
|
||||||
|
- Added editor and stageing infos to the README [`56b7227`](https://git.odit.services/lfk/document-server/commit/56b72275aca57b227c775c4a61e91fd03471f987)
|
||||||
|
- Added dockerfile and docker-compose [`b9d4cc3`](https://git.odit.services/lfk/document-server/commit/b9d4cc36199b8f0090d555e961a3454bf35f4bd6)
|
||||||
|
- Added loaders [`57afbd4`](https://git.odit.services/lfk/document-server/commit/57afbd4b6c48cf641b69a2fcbb28783ff84e1cfd)
|
||||||
|
- Added a certificaterunner class [`d08bdfd`](https://git.odit.services/lfk/document-server/commit/d08bdfd961f4128981b969cf149df7397a257193)
|
||||||
|
- Added a template section to the readme [`8141269`](https://git.odit.services/lfk/document-server/commit/8141269dd99f03b33019e5a8f4a010954c4fc44a)
|
||||||
|
- Created a barebones pdf controller [`64bd1ff`](https://git.odit.services/lfk/document-server/commit/64bd1ffc3ad8459c13154e2cd9a568f27baa2bf2)
|
||||||
|
- Moved distance to the main runner object [`1d1fa50`](https://git.odit.services/lfk/document-server/commit/1d1fa50327927328ce77af33c1abbf994df9ac8b)
|
||||||
|
- Added tsconfig [`e1f0378`](https://git.odit.services/lfk/document-server/commit/e1f03788dbdddcb1cb138556c1fed4da9ca104a8)
|
||||||
|
- Added basic dependencies [`43bb728`](https://git.odit.services/lfk/document-server/commit/43bb728d0d8b75239f1db765071d28a839300102)
|
||||||
|
- Added typeing to the buffer and stream conversion [`3fb8be2`](https://git.odit.services/lfk/document-server/commit/3fb8be22b74204accabed8a8c8fb5161c5ad7504)
|
||||||
|
- Added basic dependencies [`d450cea`](https://git.odit.services/lfk/document-server/commit/d450ceac74959bdfb694f9b12fb1fd14ff85b598)
|
||||||
|
- Added release-it config [`185e66f`](https://git.odit.services/lfk/document-server/commit/185e66fb5b2e4330233ff2e74101c4447c317b5a)
|
||||||
|
- Added config class [`278c563`](https://git.odit.services/lfk/document-server/commit/278c56386b0e9079a71d3339b40d08f046255a3e)
|
||||||
|
- Added Barebones pdf creator class [`557cc26`](https://git.odit.services/lfk/document-server/commit/557cc26f281da0b47621dff667435a788c42c103)
|
||||||
|
- Added a simple status controller [`1d62e7f`](https://git.odit.services/lfk/document-server/commit/1d62e7f14c8d6219607ed6ecf774ae152e362cc1)
|
||||||
|
- Added errorhandler middleware [`6539fd7`](https://git.odit.services/lfk/document-server/commit/6539fd785568971330639fb7055827417424c81a)
|
||||||
|
- Runners now use the runnergroup class instead of strings [`aae4f50`](https://git.odit.services/lfk/document-server/commit/aae4f507eafbfd51cd9972cf0fac4c5afafbb45a)
|
||||||
|
- Added files to gitignore [`66134c0`](https://git.odit.services/lfk/document-server/commit/66134c0e1e5dce2ebd9eae3f88a6ad893bad0283)
|
||||||
|
- Switched to the splitted functions [`3ca38ab`](https://git.odit.services/lfk/document-server/commit/3ca38abe9359e436fe0f80400ad0308ad9d64a4f)
|
||||||
|
- Cleaned up openapi stuff [`4efb629`](https://git.odit.services/lfk/document-server/commit/4efb62921bced79c817499b48bbc55b05e6371e5)
|
||||||
|
- Updated apidoc viewer settings [`36396af`](https://git.odit.services/lfk/document-server/commit/36396af50a1f7d1842effbd24e08a8d34946a375)
|
||||||
|
- Updated apidoc viewer settings [`4d45e0f`](https://git.odit.services/lfk/document-server/commit/4d45e0f80d5721c91de0b25334d040448d92e01d)
|
||||||
|
- 🧾New changelog file version [CI SKIP] [skip ci] [`8f250f7`](https://git.odit.services/lfk/document-server/commit/8f250f747a95feb246b1698a7c9be9ee19a1be12)
|
||||||
|
- Added missing dependencies [`c2d7141`](https://git.odit.services/lfk/document-server/commit/c2d714116e02bb4c2ff6501ba32417cd998e2f3e)
|
||||||
|
- Added license export and release scripts [`0c4e5a1`](https://git.odit.services/lfk/document-server/commit/0c4e5a182c91b99a657c83f2c24f4cfaae1ef48d)
|
||||||
|
- Added build script [`cbc421c`](https://git.odit.services/lfk/document-server/commit/cbc421cd838b6c874fbe50556350edeb08a7b882)
|
||||||
|
- Added dev script [`814b564`](https://git.odit.services/lfk/document-server/commit/814b564752aa95ed2c034a9a98c800b43452bf88)
|
||||||
|
- Adjusted template font styleing [`2c7b025`](https://git.odit.services/lfk/document-server/commit/2c7b0254ec7e49c31f8f33eed334ab4156052fb6)
|
||||||
|
- Added html-pdf package [`a7d4001`](https://git.odit.services/lfk/document-server/commit/a7d4001ad992d60e2af69e9bbed53366bc0a46d3)
|
||||||
|
- Added PDFs to gitignore [`9f3758d`](https://git.odit.services/lfk/document-server/commit/9f3758de39ef1d5b591a24868eb683caa742f694)
|
||||||
|
- Added version to config [`b1747f6`](https://git.odit.services/lfk/document-server/commit/b1747f6374c029e1e9c3a87584ea54b9d3714d92)
|
||||||
|
- fixed license-exporter call [`83c4bd6`](https://git.odit.services/lfk/document-server/commit/83c4bd62cbbb13ae33a790baa45cc15a77d99e41)
|
||||||
|
- Added version to config [`cff7011`](https://git.odit.services/lfk/document-server/commit/cff70110fde72c7fede0625872acdc0666703fa1)
|
||||||
|
- Added openapi dependency [`94e5e51`](https://git.odit.services/lfk/document-server/commit/94e5e51f8d421ea7fd64ded2281b89ff4a252b29)
|
||||||
|
- Added templates folder [`8a30265`](https://git.odit.services/lfk/document-server/commit/8a30265fc600dad17f584f95dd51db976945d4c5)
|
||||||
|
|||||||
35
Dockerfile
35
Dockerfile
@@ -1,5 +1,5 @@
|
|||||||
# Typescript Build
|
# Typescript Build
|
||||||
FROM node:14.15.1-alpine3.12
|
FROM registry.odit.services/hub/library/node:14.15.1-alpine3.12
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
RUN npm i -g pnpm
|
RUN npm i -g pnpm
|
||||||
@@ -8,9 +8,32 @@ COPY tsconfig.json ./
|
|||||||
COPY src ./src
|
COPY src ./src
|
||||||
RUN pnpm run build
|
RUN pnpm run build
|
||||||
# final image
|
# final image
|
||||||
FROM node:14.15.1-alpine3.12
|
FROM registry.odit.services/hub/library/alpine:3.13.1
|
||||||
|
WORKDIR /app
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
chromium \
|
||||||
|
nss \
|
||||||
|
freetype \
|
||||||
|
freetype-dev \
|
||||||
|
harfbuzz \
|
||||||
|
ca-certificates \
|
||||||
|
ttf-freefont \
|
||||||
|
nodejs \
|
||||||
|
yarn
|
||||||
|
|
||||||
|
# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
|
||||||
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
|
||||||
|
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
||||||
|
|
||||||
|
RUN addgroup -S pptruser && adduser -S -g pptruser pptruser \
|
||||||
|
&& mkdir -p /home/pptruser/Downloads /app \
|
||||||
|
&& chown -R pptruser:pptruser /home/pptruser \
|
||||||
|
&& chown -R pptruser:pptruser /app
|
||||||
|
|
||||||
|
# Run everything after as non-privileged user.
|
||||||
|
USER pptruser
|
||||||
|
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
RUN npm i -g pnpm
|
RUN yarn
|
||||||
RUN pnpm i --prod
|
COPY --from=0 /app/dist app
|
||||||
COPY --from=0 /app/dist dist
|
ENTRYPOINT ["node", "app/app.js"]
|
||||||
ENTRYPOINT ["node", "dist/app.js"]
|
|
||||||
155
README.md
155
README.md
@@ -1,75 +1,82 @@
|
|||||||
# @lfk/document-server
|
# @lfk/document-server
|
||||||
|
|
||||||
The document generation server responsible for creating pdfs for sponsoring contracts, certificates and more.
|
The document generation server responsible for creating pdfs for sponsoring contracts, certificates and more.
|
||||||
This server doesn't interact with any database and can therefor be deployed on it's own.
|
This server doesn't interact with any database and can therefor be deployed on it's own.
|
||||||
The basic generation mechanism makes the templates and routes interchangeable (if you want to expand or modify it).
|
The basic generation mechanism makes the templates and routes interchangeable (if you want to expand or modify it).
|
||||||
|
|
||||||
## Quickstart 🐳
|
## Quickstart 🐳
|
||||||
> Use this to run the document server in docker.
|
> Use this to run the document server in docker.
|
||||||
|
|
||||||
1. Clone the repo or copy the docker-compose
|
1. Clone the repo or copy the docker-compose
|
||||||
2. Run in the folder that contains the docker-compose file: `docker-compose up -d`
|
2. Run in the folder that contains the docker-compose file: `docker-compose up -d`
|
||||||
3. Visit http://127.0.0.1:4010/docs to check if the server is running
|
3. Visit http://127.0.0.1:4010/docs to check if the server is running
|
||||||
|
|
||||||
## Dev Setup 🛠
|
## Dev Setup 🛠
|
||||||
> Local dev setup
|
> Local dev setup
|
||||||
|
|
||||||
1. Rename the .env.example file to .env (you can adjust app port and other settings, if needed)
|
1. Rename the .env.example file to .env (you can adjust app port and other settings, if needed)
|
||||||
2. Install Dependencies
|
2. Install Dependencies
|
||||||
```bash
|
```bash
|
||||||
yarn
|
yarn
|
||||||
```
|
```
|
||||||
3. Start the server
|
3. Start the server
|
||||||
```bash
|
```bash
|
||||||
yarn dev
|
yarn dev
|
||||||
```
|
```
|
||||||
|
|
||||||
## ENV Vars
|
## ENV Vars
|
||||||
> You can provide them via .env file or docker env vars.
|
> You can provide them via .env file or docker env vars.
|
||||||
|
|
||||||
| Name | Type | Default | Description
|
| Name | Type | Default | Description
|
||||||
| - | - | - | -
|
| - | - | - | -
|
||||||
| APP_PORT | Number | 4010 | The port the backend server listens on. Is optional.
|
| APP_PORT | Number | 4010 | The port the backend server listens on. Is optional.
|
||||||
| NODE_ENV | String | dev | The apps env - influences debug info.
|
| NODE_ENV | String | dev | The apps env - influences debug info.
|
||||||
|
| EVENT_NAME | String | "Please set the event name" | The event's name - used to generate pdf text.
|
||||||
## Templates
|
| CURRENCY_SYMBOL | String | "€" | The your currency's symbol - used to generate pdf text.
|
||||||
> The document server uses html templates to generate various pdf documents.
|
| SPONSORING_RECEIPT_MINIMUM_AMOUNT | String | "10" | The mimimum total donation amount a sponsor has to donate to be able to receive a donation receipt - used to generate pdf text.
|
||||||
> The templates are stored in src/templates by default.
|
| SPONOR_LOGOS | Array<String> | Empty png | The sponsor images you want to loop through. You can provide them via http url, local file or base64-encoded image.
|
||||||
|
| API_KEY | String(min length: 64) | Random generated string | The api key you want to use for auth (query-param `key`), has to be at least 64 chars long.
|
||||||
We provide a set of default templates that we use for the ["Lauf für Kaya!" charity run](https://lauf-fuer-kaya.de).
|
| DISCLAIMER_TEXT | String | N/A | A disclaimer that will get displayed on the bottom of each sponsoring contract. R/N You can only provide the disclaimer for one language.
|
||||||
We use handlebars for templateing utilizing i18next for translation - the i18n string format in the templates is : `{{__ "string"}}`
|
| CONTRACTS_PER_RUNNER | Number | 1 | The amount of contracts that get created per runner (per request).
|
||||||
You can provide your own templates by replacing the ones we provided before compiling the project or by simply mounting your custom templates into the docker container.
|
|
||||||
|
## Templates
|
||||||
The server currently needs the following templates to work:
|
> The document server uses html templates to generate various pdf documents.
|
||||||
* sponsoring_contract.html
|
> The templates are stored in src/templates by default.
|
||||||
|
|
||||||
### Sponsoring Contracts
|
We provide a set of default templates that we use for the ["Lauf für Kaya!" charity run](https://lauf-fuer-kaya.de).
|
||||||
|
We use handlebars for templateing utilizing i18next for translation - the i18n string format in the templates is : `{{__ "string"}}`
|
||||||
| Template Data | Type | Optional | Description
|
You can provide your own templates by replacing the ones we provided before compiling the project or by simply mounting your custom templates into the docker container.
|
||||||
| - | - | - | -
|
|
||||||
| runners | array(Runner) | ❌ | The runner objects. We generate a contract for each runner on a new DIN-A5 page.
|
The server currently needs the following templates to work:
|
||||||
|
* sponsoring_contract.html
|
||||||
|
|
||||||
## Recommended Editor
|
### Sponsoring Contracts
|
||||||
|
|
||||||
[Visual Studio Code](https://code.visualstudio.com/)
|
| Template Data | Type | Optional | Description
|
||||||
|
| - | - | - | -
|
||||||
### Recommended Extensions
|
| runners | array(Runner) | ❌ | The runner objects. We generate a contract for each runner on a new DIN-A5 page.
|
||||||
|
|
||||||
* will be automatically recommended via ./vscode/extensions.json
|
|
||||||
* we also provide a config for i18n-ally in the .vscode folder
|
## Recommended Editor
|
||||||
|
|
||||||
## Staging
|
[Visual Studio Code](https://code.visualstudio.com/)
|
||||||
### Branches & Tags
|
|
||||||
* vX.Y.Z: Release tags created from the main branch
|
### Recommended Extensions
|
||||||
* The version numbers follow the semver standard
|
|
||||||
* A new release tag automaticly triggers the release ci pipeline
|
* will be automatically recommended via ./vscode/extensions.json
|
||||||
* main: Protected "release" branch
|
* we also provide a config for i18n-ally in the .vscode folder
|
||||||
* The latest tag of the docker image get's build from this
|
|
||||||
* New releases get created as tags from this
|
## Staging
|
||||||
* dev: Current dev branch for merging the different feature branches and bugfixes
|
### Branches & Tags
|
||||||
* The dev tag of the docker image get's build from this
|
* vX.Y.Z: Release tags created from the main branch
|
||||||
* Only push minor changes to this branch!
|
* The version numbers follow the semver standard
|
||||||
* To merge a feature branch into this please create a pull request
|
* A new release tag automaticly triggers the release ci pipeline
|
||||||
* feature/xyz: Feature branches - nameing scheme: `feature/issueid-title`
|
* main: Protected "release" branch
|
||||||
|
* The latest tag of the docker image get's build from this
|
||||||
|
* New releases get created as tags from this
|
||||||
|
* dev: Current dev branch for merging the different feature branches and bugfixes
|
||||||
|
* The dev tag of the docker image get's build from this
|
||||||
|
* Only push minor changes to this branch!
|
||||||
|
* To merge a feature branch into this please create a pull request
|
||||||
|
* feature/xyz: Feature branches - nameing scheme: `feature/issueid-title`
|
||||||
* bugfix/xyz: Branches for bugfixes - nameing scheme:`bugfix/issueid-title`
|
* bugfix/xyz: Branches for bugfixes - nameing scheme:`bugfix/issueid-title`
|
||||||
@@ -1,9 +1,15 @@
|
|||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
document_server:
|
document_server:
|
||||||
build: .
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- 4010:4010
|
- 4010:4010
|
||||||
environment:
|
environment:
|
||||||
APP_PORT: 4010
|
APP_PORT: 4010
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
|
EVENT_NAME: "Lauf für Kaya! 2021"
|
||||||
|
CURRENCY_SYMBOL: "€"
|
||||||
|
API_KEY: RYRccAJ4SKZnZaEci6Nyk9Z6mw3sD94fyKJ74WNzi6hLkxGNyJDrKPkxBmPwvR4f
|
||||||
|
CONTRACTS_PER_RUNNER: 2
|
||||||
|
SPONSORING_RECEIPT_MINIMUM_AMOUNT: 50
|
||||||
|
DISCLAIMER_TEXT: "Rechtsgrundlage unserer Datenverarbeitung aufgrund freiwilliger Einwilligung ist Art. 6 Abs. 1 e), Abs. 3 DSGVO i.V.m. Art. 85 BayEUG. Mit Ihrer Unterschrift willigen Sie in unsere Datennutzung zum Zwecke des Lauf für Kaya! ein. Die Daten für Spendenquittungen"
|
||||||
142
licenses.md
142
licenses.md
@@ -27,9 +27,38 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# async-helpers
|
||||||
|
**Author**: Brian Woodward (https://github.com/doowb)
|
||||||
|
**Repo**: doowb/async-helpers
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: Use async helpers in templates with engines that typically only handle sync helpers. Handlebars and Lodash have been tested.
|
||||||
|
## License Text
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2015-2017, Brian Woodward.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
# axios
|
# axios
|
||||||
**Author**: Matt Zabriskie
|
**Author**: Matt Zabriskie
|
||||||
**Repo**: [object Object]
|
**Repo**: https://github.com/axios/axios.git
|
||||||
**License**: MIT
|
**License**: MIT
|
||||||
**Description**: Promise based HTTP client for the browser and node.js
|
**Description**: Promise based HTTP client for the browser and node.js
|
||||||
## License Text
|
## License Text
|
||||||
@@ -54,9 +83,41 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# bwip-js
|
||||||
|
**Author**: Mark Warren <mwarren@metafloor.com>
|
||||||
|
**Repo**: https://github.com/metafloor/bwip-js.git
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: JavaScript barcode generator supporting over 100 types and standards.
|
||||||
|
## License Text
|
||||||
|
bwip-js : Barcode Writer in Pure JavaScript
|
||||||
|
|
||||||
|
Copyright (c) 2011-2019 Mark Warren
|
||||||
|
|
||||||
|
The MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# cheerio
|
# cheerio
|
||||||
**Author**: Matt Mueller <mattmuelle@gmail.com> (mat.io)
|
**Author**: Matt Mueller <mattmuelle@gmail.com> (mat.io)
|
||||||
**Repo**: [object Object]
|
**Repo**: git://github.com/cheeriojs/cheerio.git
|
||||||
**License**: MIT
|
**License**: MIT
|
||||||
**Description**: Tiny, fast, and elegant implementation of core jQuery designed specifically for the server
|
**Description**: Tiny, fast, and elegant implementation of core jQuery designed specifically for the server
|
||||||
## License Text
|
## License Text
|
||||||
@@ -84,7 +145,7 @@ SOFTWARE.
|
|||||||
|
|
||||||
# class-transformer
|
# class-transformer
|
||||||
**Author**: [object Object]
|
**Author**: [object Object]
|
||||||
**Repo**: [object Object]
|
**Repo**: https://github.com/typestack/class-transformer.git
|
||||||
**License**: MIT
|
**License**: MIT
|
||||||
**Description**: Proper decorator-based transformation / serialization / deserialization of plain javascript objects to class constructors
|
**Description**: Proper decorator-based transformation / serialization / deserialization of plain javascript objects to class constructors
|
||||||
## License Text
|
## License Text
|
||||||
@@ -112,7 +173,7 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
# class-validator
|
# class-validator
|
||||||
**Author**: TypeStack contributors
|
**Author**: TypeStack contributors
|
||||||
**Repo**: [object Object]
|
**Repo**: https://github.com/typestack/class-validator.git
|
||||||
**License**: MIT
|
**License**: MIT
|
||||||
**Description**: Decorator-based property validation for classes.
|
**Description**: Decorator-based property validation for classes.
|
||||||
## License Text
|
## License Text
|
||||||
@@ -179,7 +240,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
# dotenv
|
# dotenv
|
||||||
**Author**: undefined
|
**Author**: undefined
|
||||||
**Repo**: [object Object]
|
**Repo**: git://github.com/motdotla/dotenv.git
|
||||||
**License**: BSD-2-Clause
|
**License**: BSD-2-Clause
|
||||||
**Description**: Loads environment variables from .env file
|
**Description**: Loads environment variables from .env file
|
||||||
## License Text
|
## License Text
|
||||||
@@ -242,7 +303,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
# handlebars
|
# handlebars
|
||||||
**Author**: Yehuda Katz
|
**Author**: Yehuda Katz
|
||||||
**Repo**: [object Object]
|
**Repo**: https://github.com/wycats/handlebars.js.git
|
||||||
**License**: MIT
|
**License**: MIT
|
||||||
**Description**: Handlebars provides the power necessary to let you build semantic templates effectively with no frustration
|
**Description**: Handlebars provides the power necessary to let you build semantic templates effectively with no frustration
|
||||||
## License Text
|
## License Text
|
||||||
@@ -269,7 +330,7 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
# i18next
|
# i18next
|
||||||
**Author**: Jan Mühlemann <jan.muehlemann@gmail.com> (https://github.com/jamuhl)
|
**Author**: Jan Mühlemann <jan.muehlemann@gmail.com> (https://github.com/jamuhl)
|
||||||
**Repo**: [object Object]
|
**Repo**: https://github.com/i18next/i18next.git
|
||||||
**License**: MIT
|
**License**: MIT
|
||||||
**Description**: i18next internationalization framework
|
**Description**: i18next internationalization framework
|
||||||
## License Text
|
## License Text
|
||||||
@@ -298,7 +359,7 @@ SOFTWARE.
|
|||||||
|
|
||||||
# i18next-fs-backend
|
# i18next-fs-backend
|
||||||
**Author**: undefined
|
**Author**: undefined
|
||||||
**Repo**: [object Object]
|
**Repo**: git@github.com:i18next/i18next-fs-backend.git
|
||||||
**License**: undefined
|
**License**: undefined
|
||||||
**Description**: i18next-fs-backend is a backend layer for i18next using in Node.js and for Deno to load translations from the filesystem.
|
**Description**: i18next-fs-backend is a backend layer for i18next using in Node.js and for Deno to load translations from the filesystem.
|
||||||
## License Text
|
## License Text
|
||||||
@@ -576,7 +637,7 @@ SOFTWARE.
|
|||||||
|
|
||||||
# reflect-metadata
|
# reflect-metadata
|
||||||
**Author**: [object Object]
|
**Author**: [object Object]
|
||||||
**Repo**: [object Object]
|
**Repo**: https://github.com/rbuckton/reflect-metadata.git
|
||||||
**License**: Apache-2.0
|
**License**: Apache-2.0
|
||||||
**Description**: Polyfill for Metadata Reflection API
|
**Description**: Polyfill for Metadata Reflection API
|
||||||
## License Text
|
## License Text
|
||||||
@@ -638,7 +699,7 @@ END OF TERMS AND CONDITIONS
|
|||||||
|
|
||||||
# routing-controllers
|
# routing-controllers
|
||||||
**Author**: [object Object]
|
**Author**: [object Object]
|
||||||
**Repo**: [object Object]
|
**Repo**: https://github.com/typestack/routing-controllers.git
|
||||||
**License**: MIT
|
**License**: MIT
|
||||||
**Description**: Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage for Express / Koa using TypeScript.
|
**Description**: Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage for Express / Koa using TypeScript.
|
||||||
## License Text
|
## License Text
|
||||||
@@ -675,7 +736,7 @@ SOFTWARE.
|
|||||||
|
|
||||||
# @odit/license-exporter
|
# @odit/license-exporter
|
||||||
**Author**: ODIT.Services
|
**Author**: ODIT.Services
|
||||||
**Repo**: [object Object]
|
**Repo**: https://git.odit.services/odit/license-exporter
|
||||||
**License**: MIT
|
**License**: MIT
|
||||||
**Description**: A simple license crawler for crediting open source work
|
**Description**: A simple license crawler for crediting open source work
|
||||||
## License Text
|
## License Text
|
||||||
@@ -702,7 +763,7 @@ OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
# @types/express
|
# @types/express
|
||||||
**Author**: undefined
|
**Author**: undefined
|
||||||
**Repo**: [object Object]
|
**Repo**: https://github.com/DefinitelyTyped/DefinitelyTyped.git
|
||||||
**License**: MIT
|
**License**: MIT
|
||||||
**Description**: TypeScript definitions for Express
|
**Description**: TypeScript definitions for Express
|
||||||
## License Text
|
## License Text
|
||||||
@@ -731,7 +792,7 @@ OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
# @types/node
|
# @types/node
|
||||||
**Author**: undefined
|
**Author**: undefined
|
||||||
**Repo**: [object Object]
|
**Repo**: https://github.com/DefinitelyTyped/DefinitelyTyped.git
|
||||||
**License**: MIT
|
**License**: MIT
|
||||||
**Description**: TypeScript definitions for Node.js
|
**Description**: TypeScript definitions for Node.js
|
||||||
## License Text
|
## License Text
|
||||||
@@ -760,7 +821,7 @@ OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
# @types/puppeteer
|
# @types/puppeteer
|
||||||
**Author**: undefined
|
**Author**: undefined
|
||||||
**Repo**: [object Object]
|
**Repo**: https://github.com/DefinitelyTyped/DefinitelyTyped.git
|
||||||
**License**: MIT
|
**License**: MIT
|
||||||
**Description**: TypeScript definitions for puppeteer
|
**Description**: TypeScript definitions for puppeteer
|
||||||
## License Text
|
## License Text
|
||||||
@@ -787,9 +848,46 @@ OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
SOFTWARE
|
SOFTWARE
|
||||||
|
|
||||||
|
|
||||||
|
# cp-cli
|
||||||
|
**Author**: undefined
|
||||||
|
**Repo**: git+https://github.com/screendriver/cp-cli.git
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: A 'cp' CLI util for Node.js
|
||||||
|
## License Text
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2016 Christian Rackerseder
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# faker
|
||||||
|
**Author**: undefined
|
||||||
|
**Repo**: http://github.com/Marak/Faker.js.git
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: Generate massive amounts of fake contextual data
|
||||||
|
## License Text
|
||||||
|
|
||||||
|
|
||||||
# nodemon
|
# nodemon
|
||||||
**Author**: [object Object]
|
**Author**: [object Object]
|
||||||
**Repo**: [object Object]
|
**Repo**: https://github.com/remy/nodemon.git
|
||||||
**License**: MIT
|
**License**: MIT
|
||||||
**Description**: Simple monitor script for use during development of a node.js app.
|
**Description**: Simple monitor script for use during development of a node.js app.
|
||||||
## License Text
|
## License Text
|
||||||
@@ -818,7 +916,7 @@ SOFTWARE.
|
|||||||
|
|
||||||
# release-it
|
# release-it
|
||||||
**Author**: [object Object]
|
**Author**: [object Object]
|
||||||
**Repo**: [object Object]
|
**Repo**: https://github.com/release-it/release-it.git
|
||||||
**License**: MIT
|
**License**: MIT
|
||||||
**Description**: Generic CLI tool to automate versioning and package publishing related tasks.
|
**Description**: Generic CLI tool to automate versioning and package publishing related tasks.
|
||||||
## License Text
|
## License Text
|
||||||
@@ -868,9 +966,17 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|||||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
# start-server-and-test
|
||||||
|
**Author**: Gleb Bahmutov <gleb.bahmutov@gmail.com>
|
||||||
|
**Repo**: https://github.com/bahmutov/start-server-and-test.git
|
||||||
|
**License**: MIT
|
||||||
|
**Description**: Starts server, waits for URL, then runs test command; when the tests end, shuts down server
|
||||||
|
## License Text
|
||||||
|
|
||||||
|
|
||||||
# ts-node
|
# ts-node
|
||||||
**Author**: [object Object]
|
**Author**: [object Object]
|
||||||
**Repo**: [object Object]
|
**Repo**: git://github.com/TypeStrong/ts-node.git
|
||||||
**License**: MIT
|
**License**: MIT
|
||||||
**Description**: TypeScript execution environment and REPL for node.js, with source map support
|
**Description**: TypeScript execution environment and REPL for node.js, with source map support
|
||||||
## License Text
|
## License Text
|
||||||
@@ -899,7 +1005,7 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
# typescript
|
# typescript
|
||||||
**Author**: Microsoft Corp.
|
**Author**: Microsoft Corp.
|
||||||
**Repo**: [object Object]
|
**Repo**: https://github.com/Microsoft/TypeScript.git
|
||||||
**License**: Apache-2.0
|
**License**: Apache-2.0
|
||||||
**Description**: TypeScript is a language for application scale JavaScript development
|
**Description**: TypeScript is a language for application scale JavaScript development
|
||||||
## License Text
|
## License Text
|
||||||
|
|||||||
19
package.json
19
package.json
@@ -1,14 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "@odit/lfk-document-server",
|
"name": "@odit/lfk-document-server",
|
||||||
"version": "0.1.0",
|
"version": "0.4.3",
|
||||||
"description": "The document generation server for the LfK! runner system. This generates certificates, sponsoring aggreements and more",
|
"description": "The document generation server for the LfK! runner system. This generates certificates, sponsoring aggreements and more",
|
||||||
"main": "src/app.ts",
|
"main": "src/app.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nodemon src/app.ts",
|
"dev": "nodemon src/app.ts",
|
||||||
"build": "rimraf ./dist && tsc",
|
"build": "rimraf ./dist && tsc && cp-cli ./src/templates ./dist/templates && cp-cli ./src/locales ./dist/locales",
|
||||||
"licenses:export": "license-exporter --markdown",
|
"licenses:export": "license-exporter --markdown",
|
||||||
"release": "release-it --only-version",
|
"release": "release-it --only-version",
|
||||||
"translations:sort": "node sort_translations.js"
|
"translations:sort": "node sort_translations.js",
|
||||||
|
"test:speed": "start-server-and-test dev http://localhost:4010/docs/openapi.json test:speed:run",
|
||||||
|
"test:speed:run": "ts-node src/tests/speedtest.ts"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -40,7 +42,9 @@
|
|||||||
"license": "CC-BY-NC-SA-4.0",
|
"license": "CC-BY-NC-SA-4.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@odit/class-validator-jsonschema": "^2.1.1",
|
"@odit/class-validator-jsonschema": "^2.1.1",
|
||||||
|
"async-helpers": "^0.3.17",
|
||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
|
"bwip-js": "^2.0.12",
|
||||||
"cheerio": "^1.0.0-rc.5",
|
"cheerio": "^1.0.0-rc.5",
|
||||||
"class-transformer": "0.3.1",
|
"class-transformer": "0.3.1",
|
||||||
"class-validator": "^0.13.1",
|
"class-validator": "^0.13.1",
|
||||||
@@ -55,17 +59,20 @@
|
|||||||
"pdf-lib": "^1.16.0",
|
"pdf-lib": "^1.16.0",
|
||||||
"puppeteer": "^7.0.1",
|
"puppeteer": "^7.0.1",
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"routing-controllers": "^0.9.0-alpha.6",
|
"routing-controllers": "0.9.0-alpha.6",
|
||||||
"routing-controllers-openapi": "^2.2.0"
|
"routing-controllers-openapi": "2.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@odit/license-exporter": "^0.0.9",
|
"@odit/license-exporter": "^0.0.10",
|
||||||
"@types/express": "^4.17.11",
|
"@types/express": "^4.17.11",
|
||||||
"@types/node": "^14.14.22",
|
"@types/node": "^14.14.22",
|
||||||
"@types/puppeteer": "^5.4.3",
|
"@types/puppeteer": "^5.4.3",
|
||||||
|
"cp-cli": "^2.0.0",
|
||||||
|
"faker": "^5.3.1",
|
||||||
"nodemon": "^2.0.7",
|
"nodemon": "^2.0.7",
|
||||||
"release-it": "^14.2.2",
|
"release-it": "^14.2.2",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
|
"start-server-and-test": "^1.12.0",
|
||||||
"ts-node": "^9.1.1",
|
"ts-node": "^9.1.1",
|
||||||
"typescript": "^4.1.3"
|
"typescript": "^4.1.3"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,8 +8,12 @@ import mime from "mime-types";
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { PDFDocument } from 'pdf-lib';
|
import { PDFDocument } from 'pdf-lib';
|
||||||
import puppeteer from "puppeteer";
|
import puppeteer from "puppeteer";
|
||||||
|
import { awaitAsyncHandlebarHelpers, helpers } from './asyncHelpers';
|
||||||
|
import { config } from './config';
|
||||||
import { Runner } from './models/Runner';
|
import { Runner } from './models/Runner';
|
||||||
|
import { RunnerCard } from './models/RunnerCard';
|
||||||
import { RunnerGroup } from './models/RunnerGroup';
|
import { RunnerGroup } from './models/RunnerGroup';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is responsible for all things pdf creation.
|
* This class is responsible for all things pdf creation.
|
||||||
* This uses the html templates from src/templates.
|
* This uses the html templates from src/templates.
|
||||||
@@ -17,7 +21,8 @@ import { RunnerGroup } from './models/RunnerGroup';
|
|||||||
export class PdfCreator {
|
export class PdfCreator {
|
||||||
private templateDir = path.join(__dirname, '/templates');
|
private templateDir = path.join(__dirname, '/templates');
|
||||||
private browser;
|
private browser;
|
||||||
private static interpolations = { eventname: "Lauf für Kaya! 2021", sponsoring_receipt_minimum_amount: '10', currency_symbol: "€" }
|
private static interpolations = { eventname: config.eventname, sponsoring_receipt_minimum_amount: config.sponsoring_receipt_minimum_amount, currency_symbol: config.currency_symbol }
|
||||||
|
private static contractsPerRunner = config.contracts_per_runner;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main constructor.
|
* Main constructor.
|
||||||
@@ -64,9 +69,9 @@ export class PdfCreator {
|
|||||||
'--no-pings',
|
'--no-pings',
|
||||||
'--no-zygote',
|
'--no-zygote',
|
||||||
'--password-store=basic',
|
'--password-store=basic',
|
||||||
'--use-gl=swiftshader'
|
'--use-gl=swiftshader',
|
||||||
|
'--no-sandbox'
|
||||||
];
|
];
|
||||||
|
|
||||||
await i18next
|
await i18next
|
||||||
.use(Backend)
|
.use(Backend)
|
||||||
.init({
|
.init({
|
||||||
@@ -76,11 +81,22 @@ export class PdfCreator {
|
|||||||
loadPath: path.join(__dirname, '/locales/{{lng}}.json')
|
loadPath: path.join(__dirname, '/locales/{{lng}}.json')
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await Handlebars.registerHelper(helpers);
|
||||||
await Handlebars.registerHelper('__',
|
await Handlebars.registerHelper('__',
|
||||||
function (str) {
|
function (str) {
|
||||||
return i18next.t(str, PdfCreator.interpolations).toString();
|
return i18next.t(str, PdfCreator.interpolations).toString();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
await Handlebars.registerHelper('--sponsor',
|
||||||
|
function (str) {
|
||||||
|
const index = (parseInt(str) % config.sponor_logos.length);
|
||||||
|
if (isNaN(index)) {
|
||||||
|
return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+P+/HgAFhAJ/wlseKgAAAABJRU5ErkJggg=="
|
||||||
|
}
|
||||||
|
return config.sponor_logos[index];
|
||||||
|
}
|
||||||
|
);
|
||||||
this.browser = await puppeteer.launch({ headless: true, args: minimal_args });
|
this.browser = await puppeteer.launch({ headless: true, args: minimal_args });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,10 +105,15 @@ export class PdfCreator {
|
|||||||
* @param runner The runner you want to generate the contracts for.
|
* @param runner The runner you want to generate the contracts for.
|
||||||
* @param locale The locale used for the contracts (default:en)
|
* @param locale The locale used for the contracts (default:en)
|
||||||
*/
|
*/
|
||||||
public async generateSponsoringContract(runners: Runner[], locale: string = "en"): Promise<Buffer> {
|
public async generateSponsoringContract(runners: Runner[], locale: string = "en", codeformat: string = config.codeformat): Promise<Buffer> {
|
||||||
if (runners.length == 1 && Object.keys(runners[0]).length == 0) {
|
if (runners.length == 1 && Object.keys(runners[0]).length == 0) {
|
||||||
runners[0] = this.generateEmptyRunner();
|
runners[0] = this.generateEmptyRunner();
|
||||||
}
|
}
|
||||||
|
for (var i = 1; i < PdfCreator.contractsPerRunner; i++) {
|
||||||
|
runners = runners.reduce(function (res, current, index, array) {
|
||||||
|
return res.concat([current, current]);
|
||||||
|
}, []);
|
||||||
|
}
|
||||||
if (runners.length > 50) {
|
if (runners.length > 50) {
|
||||||
let pdf_promises = new Array<Promise<Buffer>>();
|
let pdf_promises = new Array<Promise<Buffer>>();
|
||||||
let i, j;
|
let i, j;
|
||||||
@@ -106,11 +127,39 @@ export class PdfCreator {
|
|||||||
await i18next.changeLanguage(locale);
|
await i18next.changeLanguage(locale);
|
||||||
const template_source = fs.readFileSync(`${this.templateDir}/sponsoring_contract.html`, 'utf8');
|
const template_source = fs.readFileSync(`${this.templateDir}/sponsoring_contract.html`, 'utf8');
|
||||||
const template = Handlebars.compile(template_source);
|
const template = Handlebars.compile(template_source);
|
||||||
const result = template({ runners })
|
let result = template({ runners, codeformat, disclaimer: config.disclaimer_text });
|
||||||
|
result = await awaitAsyncHandlebarHelpers(result);
|
||||||
const pdf = await this.renderPdf(result, { format: "A5", landscape: true });
|
const pdf = await this.renderPdf(result, { format: "A5", landscape: true });
|
||||||
return pdf
|
return pdf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate runner card pdfs.
|
||||||
|
* @param cards The runner cars you want to generate the cards for.
|
||||||
|
* @param locale The locale used for the cards (default:en)
|
||||||
|
*/
|
||||||
|
public async generateRunnerCards(cards: RunnerCard[], locale: string = "en", codeformat: string = config.codeformat): Promise<Buffer> {
|
||||||
|
if (cards.length > 10) {
|
||||||
|
let pdf_promises = new Array<Promise<Buffer>>();
|
||||||
|
let i, j;
|
||||||
|
for (i = 0, j = cards.length; i < j; i += 10) {
|
||||||
|
let chunk = cards.slice(i, i + 10);
|
||||||
|
pdf_promises.push(this.generateRunnerCards(chunk, locale));
|
||||||
|
}
|
||||||
|
const pdfs = await Promise.all(pdf_promises);
|
||||||
|
return await this.mergePdfs(pdfs);
|
||||||
|
}
|
||||||
|
const cards_swapped = this.swapArrayPairs(cards);
|
||||||
|
await i18next.changeLanguage(locale);
|
||||||
|
const template_source = fs.readFileSync(`${this.templateDir}/runner_card.html`, 'utf8');
|
||||||
|
const template = Handlebars.compile(template_source);
|
||||||
|
let result = template({ cards, cards_swapped, eventname: "LfK! 2069", codeformat: "qrcode" })
|
||||||
|
result = await awaitAsyncHandlebarHelpers(result);
|
||||||
|
fs.writeFileSync("lelelelele.tmp", result);
|
||||||
|
const pdf = await this.renderPdf(result, { format: "A4", landscape: false });
|
||||||
|
return pdf
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts all images in html to base64.
|
* Converts all images in html to base64.
|
||||||
* Works with image files in the template directory or images from urls.
|
* Works with image files in the template directory or images from urls.
|
||||||
@@ -120,6 +169,9 @@ export class PdfCreator {
|
|||||||
const $ = cheerio.load(html)
|
const $ = cheerio.load(html)
|
||||||
$('img').each(async (index, element) => {
|
$('img').each(async (index, element) => {
|
||||||
let imgsrc = $(element).attr("src");
|
let imgsrc = $(element).attr("src");
|
||||||
|
if (imgsrc.startsWith("data:image")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const img_type = mime.lookup(imgsrc);
|
const img_type = mime.lookup(imgsrc);
|
||||||
|
|
||||||
if (!(img_type.includes("image"))) {
|
if (!(img_type.includes("image"))) {
|
||||||
@@ -194,4 +246,26 @@ export class PdfCreator {
|
|||||||
runner.group = group;
|
runner.group = group;
|
||||||
return runner;
|
return runner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Swaps pairs (0/1, 2/3, ...) of elements in an array recursively.
|
||||||
|
* If the last element has no partner it inserts an empty element at the end and swaps the two
|
||||||
|
* This is needed to generate pdfs with front- and backside that get printet on one paper.
|
||||||
|
* @param array The array which's pairs shall get switched.
|
||||||
|
* @returns Array with swapped pairs,
|
||||||
|
*/
|
||||||
|
private swapArrayPairs(array): Array<any> {
|
||||||
|
if (array.length == 1) {
|
||||||
|
return [null, array[0]];
|
||||||
|
}
|
||||||
|
if (array.length == 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const rest = this.swapArrayPairs(array.slice(2))
|
||||||
|
if (!rest) {
|
||||||
|
return [array[1], array[0]]
|
||||||
|
}
|
||||||
|
return [array[1], array[0]].concat(rest);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,25 +1,33 @@
|
|||||||
import { MetadataArgsStorage } from 'routing-controllers';
|
import { MetadataArgsStorage } from 'routing-controllers';
|
||||||
import { routingControllersToSpec } from 'routing-controllers-openapi';
|
import { routingControllersToSpec } from 'routing-controllers-openapi';
|
||||||
import { config } from './config';
|
import { config } from './config';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function generates a the openapi spec from route metadata and type schemas.
|
* This function generates a the openapi spec from route metadata and type schemas.
|
||||||
* @param storage MetadataArgsStorage object generated by routing-controllers.
|
* @param storage MetadataArgsStorage object generated by routing-controllers.
|
||||||
* @param schemas MetadataArgsStorage object generated by class-validator-jsonschema.
|
* @param schemas MetadataArgsStorage object generated by class-validator-jsonschema.
|
||||||
*/
|
*/
|
||||||
export function generateSpec(storage: MetadataArgsStorage, schemas) {
|
export function generateSpec(storage: MetadataArgsStorage, schemas) {
|
||||||
return routingControllersToSpec(
|
return routingControllersToSpec(
|
||||||
storage,
|
storage,
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
components: {
|
components: {
|
||||||
schemas,
|
schemas,
|
||||||
},
|
"securitySchemes": {
|
||||||
info: {
|
"AuthToken": {
|
||||||
description: "The the API for the LfK! document server.",
|
"type": "apiKey",
|
||||||
title: "LfK! document server API",
|
"in": "query",
|
||||||
version: config.version
|
"name": "key",
|
||||||
},
|
description: "A simple api key. See the README's env section for more details."
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
|
},
|
||||||
|
info: {
|
||||||
|
description: "The the API for the LfK! document server.",
|
||||||
|
title: "LfK! document server API",
|
||||||
|
version: config.version
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
60
src/app.ts
60
src/app.ts
@@ -1,29 +1,31 @@
|
|||||||
import consola from "consola";
|
import consola from "consola";
|
||||||
import "reflect-metadata";
|
import "reflect-metadata";
|
||||||
import { createExpressServer } from "routing-controllers";
|
import { createExpressServer } from "routing-controllers";
|
||||||
import { config, e as errors } from './config';
|
import { config, e as errors } from './config';
|
||||||
import loaders from "./loaders/index";
|
import loaders from "./loaders/index";
|
||||||
import { ErrorHandler } from './middlewares/ErrorHandler';
|
import AuthChecker from './middlewares/AuthChecker';
|
||||||
|
import { ErrorHandler } from './middlewares/ErrorHandler';
|
||||||
const CONTROLLERS_FILE_EXTENSION = process.env.NODE_ENV === 'production' ? 'js' : 'ts';
|
|
||||||
const app = createExpressServer({
|
const CONTROLLERS_FILE_EXTENSION = process.env.NODE_ENV === 'production' ? 'js' : 'ts';
|
||||||
middlewares: [ErrorHandler],
|
const app = createExpressServer({
|
||||||
development: config.development,
|
middlewares: [ErrorHandler],
|
||||||
cors: true,
|
authorizationChecker: AuthChecker,
|
||||||
controllers: [`${__dirname}/controllers/*.${CONTROLLERS_FILE_EXTENSION}`],
|
development: config.development,
|
||||||
});
|
cors: true,
|
||||||
|
controllers: [`${__dirname}/controllers/*.${CONTROLLERS_FILE_EXTENSION}`],
|
||||||
async function main() {
|
});
|
||||||
await loaders(app);
|
|
||||||
app.listen(config.internal_port, () => {
|
async function main() {
|
||||||
consola.success(
|
await loaders(app);
|
||||||
`⚡️[server]: Server is running at http://localhost:${config.internal_port}`
|
app.listen(config.internal_port, () => {
|
||||||
);
|
consola.success(
|
||||||
});
|
`⚡️[server]: Server is running at http://localhost:${config.internal_port}`
|
||||||
}
|
);
|
||||||
if (errors === 0) {
|
});
|
||||||
main();
|
}
|
||||||
} else {
|
if (errors === 0) {
|
||||||
consola.error("error");
|
main();
|
||||||
// something's wrong
|
} else {
|
||||||
}
|
consola.error("error");
|
||||||
|
// something's wrong
|
||||||
|
}
|
||||||
|
|||||||
45
src/asyncHelpers.ts
Normal file
45
src/asyncHelpers.ts
Normal file
File diff suppressed because one or more lines are too long
@@ -1,16 +1,57 @@
|
|||||||
import { config as configDotenv } from 'dotenv';
|
import consola from "consola";
|
||||||
|
import { config as configDotenv } from 'dotenv';
|
||||||
configDotenv();
|
|
||||||
export const config = {
|
configDotenv();
|
||||||
internal_port: parseInt(process.env.APP_PORT) || 4010,
|
export const config = {
|
||||||
development: process.env.NODE_ENV === "production",
|
internal_port: parseInt(process.env.APP_PORT) || 4010,
|
||||||
version: process.env.VERSION || require('../package.json').version
|
development: process.env.NODE_ENV === "production",
|
||||||
}
|
version: process.env.VERSION || require('../package.json').version,
|
||||||
let errors = 0
|
eventname: process.env.EVENT_NAME || "Please set the event name",
|
||||||
if (typeof config.internal_port !== "number") {
|
currency_symbol: process.env.CURRENCY_SYMBOL || "€",
|
||||||
errors++
|
sponsoring_receipt_minimum_amount: process.env.SPONSORING_RECEIPT_MINIMUM_AMOUNT || "10",
|
||||||
}
|
codeformat: process.env.CODEFORMAT || "qrcode",
|
||||||
if (typeof config.development !== "boolean") {
|
sponor_logos: getSponsorLogos(),
|
||||||
errors++
|
api_key: getApiKey(),
|
||||||
}
|
disclaimer_text: process.env.DISCLAIMER_TEXT || "",
|
||||||
|
contracts_per_runner: parseInt(process.env.CONTRACTS_PER_RUNNER) || 1,
|
||||||
|
}
|
||||||
|
let errors = 0
|
||||||
|
if (typeof config.internal_port !== "number") {
|
||||||
|
errors++
|
||||||
|
}
|
||||||
|
if (typeof config.contracts_per_runner !== "number") {
|
||||||
|
errors++
|
||||||
|
}
|
||||||
|
if (typeof config.development !== "boolean") {
|
||||||
|
errors++
|
||||||
|
}
|
||||||
|
function getSponsorLogos(): string[] {
|
||||||
|
try {
|
||||||
|
const logos = JSON.parse(process.env.SPONOR_LOGOS);
|
||||||
|
if (!Array.isArray(logos)) { throw new Error("Not an array.") }
|
||||||
|
return logos;
|
||||||
|
} catch (error) {
|
||||||
|
return ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+P+/HgAFhAJ/wlseKgAAAABJRU5ErkJggg=="];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getApiKey(): string {
|
||||||
|
const key = process.env.API_KEY;
|
||||||
|
if (!key) {
|
||||||
|
consola.info("No API key set - generating a random one...");
|
||||||
|
let result = '';
|
||||||
|
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||||
|
const charactersLength = characters.length;
|
||||||
|
for (var i = 0; i < 64; i++) {
|
||||||
|
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
||||||
|
}
|
||||||
|
consola.info(`API KEY: ${result}`)
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
if (key.length < 64) {
|
||||||
|
consola.error(`API key is too short - minimum: 64, current: ${key.length}`)
|
||||||
|
throw new Error("API_KEY too short.")
|
||||||
|
}
|
||||||
|
return key
|
||||||
|
}
|
||||||
export let e = errors
|
export let e = errors
|
||||||
@@ -1,30 +1,97 @@
|
|||||||
import { Body, JsonController, Post, QueryParam, Res } from 'routing-controllers';
|
import { Authorized, Body, JsonController, Post, QueryParam, Res } from 'routing-controllers';
|
||||||
import { OpenAPI } from 'routing-controllers-openapi';
|
import { OpenAPI } from 'routing-controllers-openapi';
|
||||||
import { Runner } from '../models/Runner';
|
import { Runner } from '../models/Runner';
|
||||||
import { PdfCreator } from '../PdfCreator';
|
import { RunnerCard } from '../models/RunnerCard';
|
||||||
|
import { PdfCreator } from '../PdfCreator';
|
||||||
/**
|
|
||||||
* The pdf controller handels all endpoints concerning pdf generation.
|
/**
|
||||||
* It therefore is the hearth of the document-generation server's endpoints.
|
* The pdf controller handels all endpoints concerning pdf generation.
|
||||||
* All endpoints have to accept a locale query-param to support i18n.
|
* It therefore is the hearth of the document-generation server's endpoints.
|
||||||
*/
|
* All endpoints have to accept a locale query-param to support i18n.
|
||||||
@JsonController()
|
*/
|
||||||
export class PdfController {
|
@JsonController()
|
||||||
private pdf: PdfCreator = new PdfCreator();
|
@Authorized()
|
||||||
private initialized: boolean = false;
|
@OpenAPI({ security: [{ "AuthToken": [] }] })
|
||||||
|
export class PdfController {
|
||||||
@Post('/contracts')
|
private pdf: PdfCreator = new PdfCreator();
|
||||||
@OpenAPI({ description: "Generate Sponsoring contract pdfs from runner objects.<br>You can choose your prefered locale by passing the 'locale' query-param.<br> If you provide more than 100 runenrs this could take a moment or two (we tested up to 1000 runners in about 70sec so far)." })
|
private initialized: boolean = false;
|
||||||
async generateContracts(@Body({ validate: true, options: { limit: "500mb" } }) runners: Runner | Runner[], @Res() res: any, @QueryParam("locale") locale: string) {
|
|
||||||
if (!this.initialized) {
|
@Post('/contracts')
|
||||||
await this.pdf.init();
|
@OpenAPI({ description: "Generate Sponsoring contract pdfs from runner objects.<br>You can choose your prefered locale by passing the 'locale' query-param.<br> If you provide more than 100 runenrs this could take a moment or two (we tested up to 1000 runners in about 70sec so far)." })
|
||||||
this.initialized = true;
|
async generateContracts(@Body({ validate: true, options: { limit: "500mb" } }) runners: Runner[], @Res() res: any, @QueryParam("locale") locale: string, @QueryParam("codeformat") codeformat: string, @QueryParam("download") download: boolean) {
|
||||||
}
|
if (!this.initialized) {
|
||||||
if (!Array.isArray(runners)) {
|
await this.pdf.init();
|
||||||
runners = [runners];
|
this.initialized = true;
|
||||||
}
|
}
|
||||||
const contracts = await this.pdf.generateSponsoringContract(runners, locale);
|
if (!Array.isArray(runners)) {
|
||||||
res.setHeader('content-type', 'application/pdf');
|
runners = [runners];
|
||||||
return contracts;
|
}
|
||||||
}
|
runners = this.mapRunnerGroupNames(runners)
|
||||||
}
|
const contracts = await this.pdf.generateSponsoringContract(runners, locale, codeformat);
|
||||||
|
res.setHeader('content-type', 'application/pdf');
|
||||||
|
if (download) {
|
||||||
|
res.setHeader('Content-Disposition', 'attachment; filename="contracts.pdf"')
|
||||||
|
}
|
||||||
|
return contracts;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Post('/cards')
|
||||||
|
@OpenAPI({ description: "Generate runner card pdfs from runner card objects.<br>You can choose your prefered locale by passing the 'locale' query-param." })
|
||||||
|
async generateCards(@Body({ validate: true, options: { limit: "500mb" } }) cards: RunnerCard | RunnerCard[], @Res() res: any, @QueryParam("locale") locale: string, @QueryParam("download") download: boolean) {
|
||||||
|
if (!this.initialized) {
|
||||||
|
await this.pdf.init();
|
||||||
|
this.initialized = true;
|
||||||
|
}
|
||||||
|
if (!Array.isArray(cards)) {
|
||||||
|
cards = [cards];
|
||||||
|
}
|
||||||
|
cards = this.mapCardGroupNames(cards);
|
||||||
|
const contracts = await this.pdf.generateRunnerCards(cards, locale);
|
||||||
|
res.setHeader('content-type', 'application/pdf');
|
||||||
|
if (download) {
|
||||||
|
res.setHeader('Content-Disposition', 'attachment; filename="cards.pdf"')
|
||||||
|
}
|
||||||
|
return contracts;
|
||||||
|
}
|
||||||
|
|
||||||
|
private mapRunnerGroupNames(runners: Runner[]): Runner[] {
|
||||||
|
let response = new Array<Runner>();
|
||||||
|
for (let runner of runners) {
|
||||||
|
if (!runner.group.parentGroup) {
|
||||||
|
runner.group.fullName = runner.group.name;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
runner.group.fullName = `${runner.group.parentGroup.name}/${runner.group.name}`;
|
||||||
|
}
|
||||||
|
response.push(runner)
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
private mapCardGroupNames(cards: RunnerCard[]): RunnerCard[] {
|
||||||
|
let response = new Array<RunnerCard>();
|
||||||
|
for (let card of cards) {
|
||||||
|
if (!card.runner) {
|
||||||
|
card.runner = {
|
||||||
|
id: 0,
|
||||||
|
firstname: "Blank",
|
||||||
|
lastname: "Blank",
|
||||||
|
distance: 0,
|
||||||
|
group: {
|
||||||
|
id: 0,
|
||||||
|
name: "Blank",
|
||||||
|
fullName: "Blank"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!card.runner.group.parentGroup) {
|
||||||
|
card.runner.group.fullName = card.runner.group.name;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
card.runner.group.fullName = `${card.runner.group.parentGroup.name}/${card.runner.group.name}`;
|
||||||
|
}
|
||||||
|
response.push(card)
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
14
src/middlewares/AuthChecker.ts
Normal file
14
src/middlewares/AuthChecker.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { Action } from "routing-controllers";
|
||||||
|
import { config } from '../config';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles authentication via jwt's (Bearer authorization header) for all api endpoints using the @Authorized decorator.
|
||||||
|
* @param action Routing-Controllers action object that provides request and response objects among other stuff.
|
||||||
|
* @param permissions The permissions that the endpoint using @Authorized requires.
|
||||||
|
*/
|
||||||
|
const AuthChecker = async (action: Action) => {
|
||||||
|
const provided_token = action.request.query.key;
|
||||||
|
return provided_token == config.api_key;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AuthChecker
|
||||||
@@ -13,7 +13,8 @@ import {
|
|||||||
|
|
||||||
IsPositive,
|
IsPositive,
|
||||||
|
|
||||||
IsString
|
IsString,
|
||||||
|
ValidateNested
|
||||||
} from "class-validator";
|
} from "class-validator";
|
||||||
import { RunnerGroup } from './RunnerGroup';
|
import { RunnerGroup } from './RunnerGroup';
|
||||||
|
|
||||||
@@ -53,6 +54,7 @@ export class Runner {
|
|||||||
* The runner's group.
|
* The runner's group.
|
||||||
*/
|
*/
|
||||||
@IsObject()
|
@IsObject()
|
||||||
|
@ValidateNested()
|
||||||
group: RunnerGroup;
|
group: RunnerGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -60,4 +62,8 @@ export class Runner {
|
|||||||
*/
|
*/
|
||||||
@IsInt()
|
@IsInt()
|
||||||
distance: number;
|
distance: number;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
console.log("called")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,4 +25,6 @@ export class RunnerGroup {
|
|||||||
@IsObject()
|
@IsObject()
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
parentGroup?: RunnerGroup;
|
parentGroup?: RunnerGroup;
|
||||||
|
|
||||||
|
fullName: string;
|
||||||
}
|
}
|
||||||
|
|||||||
71
src/templates/runner_card.html
Normal file
71
src/templates/runner_card.html
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf8">
|
||||||
|
<title>Sponsoring contract</title>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css">
|
||||||
|
<style>
|
||||||
|
.sheet {
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
|
page-break-after: always;
|
||||||
|
padding: 1.2cm 2cm 1.2cm 2cm
|
||||||
|
}
|
||||||
|
|
||||||
|
body.A4 .sheet {
|
||||||
|
width: 210mm;
|
||||||
|
height: 296mm
|
||||||
|
}
|
||||||
|
|
||||||
|
.runnercard {
|
||||||
|
border: 1px solid;
|
||||||
|
height: 5.5cm;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="A4 landscape">
|
||||||
|
<div class="sheet">
|
||||||
|
<div class="columns is-multiline">
|
||||||
|
{{#each cards}}
|
||||||
|
<div class="column is-half runnercard">
|
||||||
|
<p class="title is-5" style="text-align: center; padding-bottom: 0; margin-top: -0.75rem;">{{../eventname}}</p>
|
||||||
|
<p style="text-align: center; margin-top: -1.5rem; font-size: small;">lauf-fuer-kaya.de - am 01.01.2021</p>
|
||||||
|
<p style="font-size: small;">Mit unterstützung von:</p>
|
||||||
|
<div class="columns" style="height: 6rem; overflow: hidden;">
|
||||||
|
<div class="column is-two-thirds">
|
||||||
|
<!--SPONSOR LOGO HERE-->
|
||||||
|
<img style="vertical-align: revert; margin-top: auto; object-fit: cover; max-height: 2cm;"
|
||||||
|
src="{{--sponsor this.id}}" />
|
||||||
|
</div>
|
||||||
|
<div class="column is-one-third">
|
||||||
|
<!--BARCODE HERE-->
|
||||||
|
<img style="vertical-align: revert; margin-top: auto; object-fit: cover; max-height: 2cm;"
|
||||||
|
src="{{--bc this.id ../codeformat}}" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>{{this.runner.lastname}}, {{this.runner.firstname}} {{this.runner.middlename}}</p>
|
||||||
|
<p>{{this.runner.group.fullName}}</p>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sheet">
|
||||||
|
<div class="columns is-multiline">
|
||||||
|
{{#each cards_swapped}}
|
||||||
|
<div class="column is-half runnercard" style="justify-content: center; align-items: center; text-align: center;">
|
||||||
|
<!--SPONSOR LOGO FIRST-->
|
||||||
|
<div style="height: 2cm; padding: 0 0 2.25cm 0">
|
||||||
|
<img style="object-fit: cover; max-height: 2cm;" src="{{--sponsor this.id}}" />
|
||||||
|
</div>
|
||||||
|
<img style="object-fit: cover; max-height: 2.5cm; position: relative;" src="{{--bc this.id ../codeformat}}" />
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -29,42 +29,47 @@
|
|||||||
<div class="sheet">
|
<div class="sheet">
|
||||||
<img id="header_img" width="100%" src="sponsoringheader.png" />
|
<img id="header_img" width="100%" src="sponsoringheader.png" />
|
||||||
<div style=" padding: 0 1rem 0 1rem;">
|
<div style=" padding: 0 1rem 0 1rem;">
|
||||||
<div class="columns" style="padding-bottom: 0;">
|
|
||||||
<div class="column is-two-fifths">
|
|
||||||
<p style="font-size: large; font-weight: bold;">{{__ "sponsoring_title"}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="column">
|
|
||||||
<p style="font-size: x-small; vertical-align: revert; margin-top: auto;">{{__ "please_use_blockletters"}}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p> {{__ "sponsoring_subtitle"}} </p>
|
|
||||||
<div class="columns" style="padding-top: 0;">
|
|
||||||
<div class="column is-8">
|
|
||||||
<span style="border-bottom: 1px solid; width: 100%; display: block;">{{this.firstname}}
|
|
||||||
{{this.middlename}}</span>
|
|
||||||
<p style="font-size: x-small; display: block;">{{__ "firstname"}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="column is-2">
|
|
||||||
<span style="border-bottom: 1px solid; width: 100%; display: block;">{{this.id}}</span>
|
|
||||||
<p style="font-size: x-small; display: block;">ID</p>
|
|
||||||
</div>
|
|
||||||
<div class="column">
|
|
||||||
<!-- CODE Here -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
|
<div class="column is-10">
|
||||||
|
<div class="columns" style="padding-bottom: 0;">
|
||||||
|
<div class="column is-two-fifths">
|
||||||
|
<p style="font-size: large; font-weight: bold;">{{__ "sponsoring_title"}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<p style="font-size: x-small; vertical-align: revert; margin-top: auto;">{{__ "please_use_blockletters"}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p> {{__ "sponsoring_subtitle"}} </p>
|
||||||
|
<div class="columns">
|
||||||
|
<div class="column is-9">
|
||||||
|
<span style="border-bottom: 1px solid; width: 100%; display: block;">{{this.firstname}}
|
||||||
|
{{this.middlename}}</span>
|
||||||
|
<p style="font-size: x-small; display: block;">{{__ "firstname"}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="column is-3">
|
||||||
|
<span style="border-bottom: 1px solid; width: 100%; display: block;">{{this.id}}</span>
|
||||||
|
<p style="font-size: x-small; display: block;">ID</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<img style="vertical-align: revert; margin-top: auto; object-fit: cover; max-height: 2cm;"
|
||||||
|
src="{{--bc this.id ../codeformat}}" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="columns" style="padding-top: 1rem;">
|
||||||
<div class="column is-6">
|
<div class="column is-6">
|
||||||
<span style="border-bottom: 1px solid; width: 100%; display: block;">{{this.lastname}}</span>
|
<span style="border-bottom: 1px solid; width: 100%; display: block;">{{this.lastname}}</span>
|
||||||
<p style="font-size: x-small; display: block;">{{__ "lastname"}}</p>
|
<p style="font-size: x-small; display: block;">{{__ "lastname"}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="column is-6">
|
<div class="column is-6">
|
||||||
<span style="border-bottom: 1px solid; width: 100%; display: block;">{{this.group.name}}</span>
|
<span style="border-bottom: 1px solid; width: 100%; display: block;">{{this.group.fullName}}</span>
|
||||||
<p style="font-size: x-small; display: block;">{{__ "group"}}</p>
|
<p style="font-size: x-small; display: block;">{{__ "group"}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p>{{__ "sponsoring_amount_per_distance"}}</p>
|
<p style="margin-top: -0.5rem">{{__ "sponsoring_amount_per_distance"}}</p>
|
||||||
<div class="columns">
|
<div class="columns" style="margin-top: -1rem;">
|
||||||
<div class="column is-6">
|
<div class="column is-6">
|
||||||
<span style="border-bottom: 1px solid; width: 100%; display: block;"> </span>
|
<span style="border-bottom: 1px solid; width: 100%; display: block;"> </span>
|
||||||
<p style="font-size: x-small; display: block;">{{__ "lastname"}}</p>
|
<p style="font-size: x-small; display: block;">{{__ "lastname"}}</p>
|
||||||
@@ -74,9 +79,9 @@
|
|||||||
<p style="font-size: x-small; display: block;">{{__ "firstname"}}</p>
|
<p style="font-size: x-small; display: block;">{{__ "firstname"}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p style="font-size: medium;">{{__ "address"}} ({{__ "sponsor"}})</p>
|
<p style="font-size: medium; margin-top: -0.5rem;">{{__ "address"}} ({{__ "sponsor"}})</p>
|
||||||
<p style="font-size: x-small;">({{__ "sponsoring_address_condition"}})</p>
|
<p style="font-size: x-small;">({{__ "sponsoring_address_condition"}})</p>
|
||||||
<div class="columns">
|
<div class="columns" style="margin-top: -1rem;">
|
||||||
<div class="column is-8">
|
<div class="column is-8">
|
||||||
<span style="border-bottom: 1px solid; width: 100%; display: block;"> </span>
|
<span style="border-bottom: 1px solid; width: 100%; display: block;"> </span>
|
||||||
<p style="font-size: x-small; display: block;">{{__ "street"}}</p>
|
<p style="font-size: x-small; display: block;">{{__ "street"}}</p>
|
||||||
@@ -86,7 +91,7 @@
|
|||||||
<p style="font-size: x-small; display: block;">{{__ "house_number"}}</p>
|
<p style="font-size: x-small; display: block;">{{__ "house_number"}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="columns">
|
<div class="columns" style="margin-top: -1rem;">
|
||||||
<div class="column is-4">
|
<div class="column is-4">
|
||||||
<span style="border-bottom: 1px solid; width: 100%; display: block;"> </span>
|
<span style="border-bottom: 1px solid; width: 100%; display: block;"> </span>
|
||||||
<p style="font-size: x-small; display: block;">{{__ "postalcode"}}</p>
|
<p style="font-size: x-small; display: block;">{{__ "postalcode"}}</p>
|
||||||
@@ -96,8 +101,7 @@
|
|||||||
<p style="font-size: x-small; display: block;">{{__ "city"}}</p>
|
<p style="font-size: x-small; display: block;">{{__ "city"}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<div class="columns" style="margin-top: -1rem;">
|
||||||
<div class="columns">
|
|
||||||
<div class="column is-7">
|
<div class="column is-7">
|
||||||
<span style="border-bottom: 1px solid; width: 100%; display: block;"> </span>
|
<span style="border-bottom: 1px solid; width: 100%; display: block;"> </span>
|
||||||
<p style="font-size: x-small; display: block;">{{__ "location"}}, {{__ "date"}}</p>
|
<p style="font-size: x-small; display: block;">{{__ "location"}}, {{__ "date"}}</p>
|
||||||
@@ -107,6 +111,7 @@
|
|||||||
<p style="font-size: x-small; display: block;">{{__ "signature"}}</p>
|
<p style="font-size: x-small; display: block;">{{__ "signature"}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<p style="font-size: xx-small; overflow: hidden; height: 4rem; text-align: center;">{{../disclaimer}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
128
src/tests/speedtest.ts
Normal file
128
src/tests/speedtest.ts
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
import axios from "axios"
|
||||||
|
import faker from "faker"
|
||||||
|
import { Runner } from '../models/Runner'
|
||||||
|
import { RunnerCard } from '../models/RunnerCard'
|
||||||
|
import { RunnerGroup } from '../models/RunnerGroup'
|
||||||
|
|
||||||
|
const baseurl = "http://localhost:4010"
|
||||||
|
|
||||||
|
axios.interceptors.request.use((config) => {
|
||||||
|
config.headers['request-startTime'] = process.hrtime()
|
||||||
|
return config
|
||||||
|
})
|
||||||
|
|
||||||
|
axios.interceptors.response.use((response) => {
|
||||||
|
const start = response.config.headers['request-startTime']
|
||||||
|
const end = process.hrtime(start)
|
||||||
|
const milliseconds = Math.round((end[0] * 1000) + (end[1] / 1000000))
|
||||||
|
response.headers['request-duration'] = milliseconds
|
||||||
|
return response
|
||||||
|
})
|
||||||
|
|
||||||
|
function generateRunners(amount: number): Runner[] {
|
||||||
|
let runners: Runner[] = new Array<Runner>();
|
||||||
|
let group = new RunnerGroup();
|
||||||
|
let runner = new Runner();
|
||||||
|
for (var i = 0; i < amount; i++) {
|
||||||
|
group.name = faker.company.bsBuzz();
|
||||||
|
group.id = Math.floor(Math.random() * (9999999 - 1) + 1);
|
||||||
|
runner.firstname = faker.name.firstName();
|
||||||
|
runner.lastname = faker.name.lastName();
|
||||||
|
runner.id = Math.floor(Math.random() * (9999999 - 1) + 1);
|
||||||
|
runners.push(runner);
|
||||||
|
}
|
||||||
|
return runners;
|
||||||
|
}
|
||||||
|
|
||||||
|
function generateCards(amount: number): RunnerCard[] {
|
||||||
|
let cards: RunnerCard[] = new Array<RunnerCard>();
|
||||||
|
let card = new RunnerCard();
|
||||||
|
for (let runner of generateRunners(amount)) {
|
||||||
|
card.id = runner.id;
|
||||||
|
card.code = idToEan13(card.id);
|
||||||
|
card.runner = runner;
|
||||||
|
cards.push(card);
|
||||||
|
}
|
||||||
|
return cards;
|
||||||
|
}
|
||||||
|
|
||||||
|
function idToEan13(id): string {
|
||||||
|
const multiply = [1, 3];
|
||||||
|
id = id.toString();
|
||||||
|
|
||||||
|
if (id.length > 12) {
|
||||||
|
throw new Error("id too long");
|
||||||
|
}
|
||||||
|
while (id.length < 12) { id = '0' + id; }
|
||||||
|
|
||||||
|
let total = 0;
|
||||||
|
id.split('').forEach((letter, index) => {
|
||||||
|
total += parseInt(letter, 10) * multiply[index % 2];
|
||||||
|
});
|
||||||
|
const checkSum = (Math.ceil(total / 10) * 10) - total;
|
||||||
|
return id + checkSum.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function postContracts(runners: Runner[]): Promise<Measurement> {
|
||||||
|
const res = await axios.post(`${baseurl}/contracts`, runners);
|
||||||
|
return new Measurement("contract", runners.length, parseInt(res.headers['request-duration']))
|
||||||
|
}
|
||||||
|
|
||||||
|
async function postCards(cards: RunnerCard[]): Promise<Measurement> {
|
||||||
|
const res = await axios.post(`${baseurl}/cards`, cards);
|
||||||
|
return new Measurement("card", cards.length, parseInt(res.headers['request-duration']))
|
||||||
|
}
|
||||||
|
|
||||||
|
async function testContracts(sizes): Promise<Measurement[]> {
|
||||||
|
let measurements = new Array<Measurement>();
|
||||||
|
console.log("#### Testing contracts ####");
|
||||||
|
|
||||||
|
for (let size of sizes) {
|
||||||
|
const m = await postContracts(generateRunners(size));
|
||||||
|
console.log(m.toString());
|
||||||
|
measurements.push(m);
|
||||||
|
}
|
||||||
|
return measurements;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function testCards(sizes): Promise<Measurement[]> {
|
||||||
|
let measurements = new Array<Measurement>();
|
||||||
|
console.log("#### Testing Cards ####");
|
||||||
|
|
||||||
|
for (let size of sizes) {
|
||||||
|
const m = await postCards(generateCards(size));
|
||||||
|
console.log(m.toString());
|
||||||
|
measurements.push(m);
|
||||||
|
}
|
||||||
|
return measurements;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const sizes = [0, 1, 10, 50, 100, 200, 500, 1000]
|
||||||
|
console.log("########### Speedtest ###########");
|
||||||
|
console.log(`Document server version (according to the api): ${(await axios.get("http://localhost:4010/version")).data.version}`);
|
||||||
|
console.log("####### Running tests #######");
|
||||||
|
const contractResults = await testContracts(sizes);
|
||||||
|
const cardResults = await testCards(sizes);
|
||||||
|
console.log("####### Results #######");
|
||||||
|
console.table(contractResults);
|
||||||
|
console.table(cardResults);
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
||||||
|
|
||||||
|
class Measurement {
|
||||||
|
public type: string;
|
||||||
|
public inputcount: number;
|
||||||
|
public responsetime: number;
|
||||||
|
|
||||||
|
constructor(type: string, input: number, time: number) {
|
||||||
|
this.type = type;
|
||||||
|
this.inputcount = input;
|
||||||
|
this.responsetime = time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public toString(): string {
|
||||||
|
return `It took ${this.responsetime}ms to generate ${this.inputcount} pdfs for the type ${this.type}.`
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user