Closed slifty closed 3 years ago
I decided not to add docblocks to individual methods since I believe they're somewhat auto-documented, but would be happy to add that in if desired.
An overall thought: some methods use "options" objects (e.g. `function doSomething({ firstParam, secondParam}) where others use traditional parameters. This is not inherently incorrect, but I want to do a pass to make sure there is a rhyme / reason to it.
This StackOverflow thread is a good resource when identifying rules of thumb
UPDATE: I decided to only use the options object in one method that had more than 4 parameters.
Gonna merge this in!
This PR sets the stage for moving MediaWiki authentication logic out of shell and into the
mw2pdf
code base. Specifically, it introduces a newMediaWikiSession
module which will allow us to separate the auth + rendering of a given page from the collation logic.This also begins to refactor the code base a bit, moving us to node modules and starting to add some directory structure for code organization.
The new code is not integrated / run by a calling agent, but I confirmed it works by running the following in a
sandbox.js
file (node sandbox.js
) against an instance of torque-devenv.