Thanks to all HedgeDoc team members for the time discussing,
helping with weird Nest issues, providing feedback
and suggestions!
Co-authored-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
If one wrote a frontmatter the incomplete ending dashes where interpreted as a headline and therefore the last line in the frontmatter was handled as the first heading of the document.
Signed-off-by: Philip Molares <philip.molares@udo.edu>
The frontend now doesn't try to reconnect, when the disconnection happened because of a lack of permissions
Signed-off-by: Philip Molares <philip.molares@udo.edu>
The deep partial type from redux had the problem that it could only be applied to records. This caused problems with primitive types and arrays.
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
With this commit we drop the subpath support which results in the constraint that HedgeDoc must always run on the root of a domain. This makes a lot of things in testing, rendering and security much easier.
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This shouldn't be handled here. If both sides are following the protocol then there shouldn't be any messages before this side hasn't sent the ready answer.
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
The package caused some issues while working on other features.
Mostly because bundlers have been unable to determine the correct
websocket constructor.
So I replaced it with a more object-oriented approach.
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
the error event of the websocket occurs if the connection is already closed.
Therefore, the disconnect call does nothing and the transporter won't throw the disconnected event.
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
By storing the ydoc state in the database we can reconnect lost clients easier
and enable offline editing because we continue using the crdt data that has been
used by the client before the connection loss.
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit refactors a lot of things that are not easy to separate.
It replaces the binary protocol of y-protocols with json.
It introduces event based message processing.
It implements our own code mirror plugins for synchronisation of content and remote cursors
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This is an import of 166ca8da12
with some changes to make it fit into the mono repo.
- TypedEventEmitter has been replaced with EventEmitter2 because EventEmitter2 is faster and TypedEventEmitter had some troubles with the new way of compiling.
- tsc-esm has been replaced with microbundle. The problems that lib0 doesn't export its types correctly has been solved using yarn patch.
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>