-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
MWS: fix a few obvious bugs that typescript caught #8886
base: multi-wiki-support
Are you sure you want to change the base?
Conversation
Confirmed: Arlen22 has already signed the Contributor License Agreement (see contributing.md) |
❌ Deploy Preview for tiddlywiki-previews failed.
|
@Arlen22 ... Did you see the tests. Some of them fail now. |
Oh, I thought they were failing before. I'll double check. |
10e47d5
to
c7dc21a
Compare
Confirmed: Arlen22 has already signed the Contributor License Agreement (see contributing.md) |
Ok, yeah, the build is failing with only one change that should not have changed anything. |
I've added the other changes back in with slightly better descriptions. |
Not sure if I'll change it, but I think these lines are supposed to be TiddlyWiki5/plugins/tiddlywiki/multiwikiserver/modules/routes/handlers/get-system.js Line 31 in c7dc21a
TiddlyWiki5/plugins/tiddlywiki/multiwikiserver/modules/routes/handlers/get-system.js Line 39 in c7dc21a
TiddlyWiki5/plugins/tiddlywiki/multiwikiserver/modules/routes/handlers/post-anon.js Lines 33 to 34 in c7dc21a
|
@@ -20,7 +20,7 @@ if($tw.node) { | |||
querystring = require("querystring"), | |||
crypto = require("crypto"), | |||
zlib = require("zlib"), | |||
aclMiddleware = require('$:/plugins/tiddlywiki/multiwikiserver/modules/routes/helpers/acl-middleware.js').middleware; | |||
aclMiddleware = require('$:/plugins/tiddlywiki/multiwikiserver/routes/helpers/acl-middleware.js').middleware; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sure that this change is wrong. There is no TW title without the modules
subdirectory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most plugins, except evernote and text-slicer, leave it out. Core appears to leave it in. I don't have an opinion either way.
@@ -12,7 +12,7 @@ POST /admin/delete-acl | |||
/*global $tw: false */ | |||
"use strict"; | |||
|
|||
var aclMiddleware = require("$:/plugins/tiddlywiki/multiwikiserver/modules/routes/helpers/acl-middleware.js").middleware; | |||
var aclMiddleware = require("$:/plugins/tiddlywiki/multiwikiserver/routes/helpers/acl-middleware.js").middleware; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The upstream title was right.
@@ -12,7 +12,7 @@ DELETE /bags/:bag_name/tiddler/:title | |||
/*global $tw: false */ | |||
"use strict"; | |||
|
|||
var aclMiddleware = require("$:/plugins/tiddlywiki/multiwikiserver/modules/routes/helpers/acl-middleware.js").middleware; | |||
var aclMiddleware = require("$:/plugins/tiddlywiki/multiwikiserver/routes/helpers/acl-middleware.js").middleware; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upstream title is right --- please check all of them
@@ -44,7 +42,7 @@ function setupStore() { | |||
return store; | |||
} | |||
|
|||
function ServerManager(store) { | |||
function ServerManager() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think removing it, is not right. But @Jermolene there is an inconsistency. Here it says: ServerManager(store)
but in line 25 it says:
serverManager: new ServerManager({
store: store
})
Which seems to be an options object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option is not used anywhere. Store is passed in somewhere else, not here.
I was playing around with Typescript support in the multiwikiserver plugin, and it caught a few bugs, so I thought I'd open a PR for them.