Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIBRARY - implement API for Etherpad v1.8.18, add return and nullable types #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

codeofmochi
Copy link

@codeofmochi codeofmochi commented Jan 6, 2023

Hi there!

Thank you for your very useful library! I've been forking it for our own purposes at @graasp 😊
I'd like to contribute back with the following improvements:

  • lockfile upgraded to v2 (generated using npm 8.3.2) 🔒
  • build the package on prepare script, so that it can be consumed from JS code as well 🏗️
  • remove dependency on is-url and use the native URL node object instead (reason is that is-url does not accept e.g. docker-local domains such as http://etherpad:9001) and it can be checked without a library 🌍
  • implement the API described at the etherpad v1.8.18 docs 📝
  • add nullable types withstrictuNullChecks: true 👮‍♀️
  • return 400 instead of 422 on bad request 🚫
  • add queries return types (derived from existing types) 🐚
  • add a deprecated notice to setPassword and isPasswordProtected (they are now absent from the docs) 👴
  • add missing getStats query 📊 as well as copyPadWithoutHistory ✂️

Somehow I am not able to make the server error - timeout pass in the test suite even though nock is appended .delay(100) on the getHtml endpoint for this test, but I think this was an issue already before these changes.

Let me know if you'd like additional changes! Feel free to squash the commits as well.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant