Commit graph

7 commits

Author SHA1 Message Date
David Mehren
6604a6e499
Enable TypeScript strict mode
This enables strict mode, but sets strictPropertyInitialization to false,
as "the class-validator DTO pattern described in the documentation is
not compatible with strict property initialization" according to
https://github.com/nestjs/typescript-starter/pull/192

Signed-off-by: David Mehren <git@herrmehren.de>
2021-04-29 15:01:00 +02:00
David Mehren
6ee2ddead5
Use node12 TypeScript base config
TypeScript recommends using a base config from https://github.com/tsconfig/bases.

Using this config reduces compile times by ~30%
and the size of the dist folder by ~45%.
It also enables the recommended `esModuleInterop` option,
which necessitated some changes to imports.
See also https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#support-for-import-d-from-cjs-from-commonjs-modules-with---esmoduleinterop

Signed-off-by: David Mehren <git@herrmehren.de>
2021-04-29 22:47:18 +02:00
Philip Molares
0ac88439ea
Fix compilation with ts-node
ts-node by default does not respect the `files` setting in `tsconfig.json`
and therefore does not respect the d.ts file under `types/`.

This commit adds an explicit `typeRoots` option, as recommended by
https://github.com/TypeStrong/ts-node#help-my-types-are-missing

Fixes #989

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-05 00:37:35 +01:00
Philip Molares
62a5215242
auth: Encode secret in base64url
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-01-26 10:19:12 +01:00
Philip Molares
1791cb7c82
auth: Fix base64url transformation
The problem was that replace only replaces the first occurrence of a string and not all as is needed for this function.
tsconfig.json needed lib to be set to esnext or the replaceAll function won't be available…

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-01-26 10:18:52 +01:00
David Mehren
e53a8648b4
Add empty NestJS application
Signed-off-by: David Mehren <git@herrmehren.de>
2020-07-21 21:24:56 +02:00
David Mehren
d6d4f35cf5
Import meta-files
These files are imported from HedgeDoc 1 / the master branch.

Signed-off-by: David Mehren <git@herrmehren.de>
2022-01-23 22:02:58 +01:00