1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-24 02:27:19 +00:00
TiddlyWiki5/core/modules/server/routes
Nicolas Petton 17b4f53ba2
Add server sent events (#5279)
* Create server-sent-events.js

* Create sse-change-listener.js

* Implement server sent events

* Convert to ES5 and wrap in function

* Use the host string from tiddlyweb

* Improve comments in sse-server.js

* Can't use object reference as key

* Add retry timeout

* Fix a bug

* bug fix

* Fix formatting

* Fix ES5 compat

* capitalize comments

* more fixes

* Refactor tiddlywek/sse-server.js

* Extract helper functions for handling wikis and connections.
* Replace JSDoc comments.
* Fix formatting according to TW core.
* Simplify the logic for adding and removing connections.

* Fix formatting of tiddlyweb/sse-client.js

Fix formatting according to TW core.

* Fix formatting of server-sent-events.js

Fix formatting and comments following TW core guidelines.

* Extract a debounce function in sse-client.js

* Avoid using startsWith in server-sent-events.js

startsWith is part of ES2015, while TiddlyWiki uses the 5.1 dialect.

* New sse-enabled WebServer parameter

* If not set to "yes", disabled SSE request handling.
* Add documentation for the parameter in core/language/en-GB/Help/listen.tid
* Add new tiddler editions/tw5.com/tiddlers/webserver/WebServer Parameter_ sse-enabled.tid

* Disable polling for changes if SSE is enabled

* Add sse_enabled to /status JSON response
* Store syncer polling status in $:/config/SyncDisablePolling
* Handled disabling polling in core/modules/syncer.js

* Simply boolean logic in syncer.js

* Delete trailing whitespaces in syncer.js

Co-authored-by: Arlen22 <arlenbee@gmail.com>
2021-01-15 10:37:55 +00:00
..
delete-tiddler.js Module-ize server routes, add static file support and other enhancements(#2679) 2018-07-18 16:54:43 +01:00
get-favicon.js Module-ize server routes, add static file support and other enhancements(#2679) 2018-07-18 16:54:43 +01:00
get-file.js Allow setting boot, wiki, and pathPrefix for each request (#4649) 2020-06-11 11:36:41 +01:00
get-index.js Coding style tweaks 2019-08-14 23:00:01 +01:00
get-login-basic.js Fix basic authentication forced login 2018-12-16 18:20:33 +00:00
get-status.js Add server sent events (#5279) 2021-01-15 10:37:55 +00:00
get-tiddler-html.js Improvements to the static single tiddler view as well as documentation. (#3386) 2018-12-01 13:30:00 +00:00
get-tiddler.js HTTP Server: should include bag in returned tiddlers 2019-10-06 17:34:50 +01:00
get-tiddlers-json.js System tiddler syncing (#4987) 2020-11-19 15:59:02 +00:00
put-tiddler.js Module-ize server routes, add static file support and other enhancements(#2679) 2018-07-18 16:54:43 +01:00