daveappserver 0.5.46 → 0.5.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/appserver.js CHANGED
@@ -1,4 +1,4 @@
1
- var myVersion = "0.5.46", myProductName = "daveAppServer";
1
+ var myVersion = "0.5.47", myProductName = "daveAppServer";
2
2
 
3
3
  exports.start = startup;
4
4
  exports.notifySocketSubscribers = notifySocketSubscribers;
@@ -1005,7 +1005,7 @@ function startup (options, callback) {
1005
1005
  }
1006
1006
  });
1007
1007
  }
1008
- function returnServerHomePage (screenname) {
1008
+ function returnServerHomePage () {
1009
1009
  function servePage (templatetext) {
1010
1010
  var pagetable = {
1011
1011
  productName: config.productName,
@@ -1016,8 +1016,7 @@ function startup (options, callback) {
1016
1016
  flEnableLogin: config.flEnableLogin,
1017
1017
  prefsPath: config.prefsPath,
1018
1018
  docsPath: config.docsPath,
1019
- idGitHubClient: config.githubClientId, //11/9/21 by DW
1020
- screenname //4/30/22 by DW
1019
+ idGitHubClient: config.githubClientId //11/9/21 by DW
1021
1020
  };
1022
1021
  if (theRequest.addToPagetable !== undefined) { //3/9/21 by DW
1023
1022
  for (var x in theRequest.addToPagetable) {
@@ -1048,15 +1047,10 @@ function startup (options, callback) {
1048
1047
  });
1049
1048
  }
1050
1049
  }
1051
- function callWithScreenname (callback, flMustHaveToken=true) {
1050
+ function callWithScreenname (callback) {
1052
1051
  davetwitter.getScreenName (token, secret, function (screenname) {
1053
1052
  if (screenname === undefined) {
1054
- if (flMustHaveToken) {
1055
- returnError ({message: "Can't do the thing you want because the accessToken is not valid."});
1056
- }
1057
- else {
1058
- callback (undefined);
1059
- }
1053
+ returnError ({message: "Can't do the thing you want because the accessToken is not valid."});
1060
1054
  }
1061
1055
  else {
1062
1056
  callback (screenname);
@@ -1102,9 +1096,7 @@ function startup (options, callback) {
1102
1096
  case "get":
1103
1097
  switch (theRequest.lowerpath) {
1104
1098
  case "/":
1105
- callWithScreenname (function (screenname) {
1106
- returnServerHomePage (screenname);
1107
- }, false);
1099
+ returnServerHomePage ();
1108
1100
  return (true);
1109
1101
  case "/now":
1110
1102
  returnPlainText (new Date ());
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "daveappserver",
3
3
  "description": "Factored code that was appearing in all my servers.",
4
- "version": "0.5.46",
4
+ "version": "0.5.47",
5
5
  "main": "appserver.js",
6
6
  "repository": {
7
7
  "type" : "git",
package/readme.md CHANGED
@@ -52,10 +52,6 @@ The second section configures the HTTP server and the connection to Twitter for
52
52
 
53
53
  ### Updates
54
54
 
55
- #### v0.5.45 -- 4/30/22 by DW
56
-
57
- pagetable now contains the user's screenname. It's important that the addMacroToPagetable callback have access to the screenname, we need it to construct the url for the user's RSS feed in littleFeedReader.
58
-
59
55
  #### v0.5.44 -- 3/18/22 by DW
60
56
 
61
57
  New callback, config.publishFile. If defined we call back with the file, screenname, relpath, flprivate, filetext and the url of the file if it's public.
package/readme.opml CHANGED
@@ -2,7 +2,7 @@
2
2
  <opml version="2.0">
3
3
  <head>
4
4
  <title>readme.md</title>
5
- <dateModified>Sat, 30 Apr 2022 14:19:31 GMT</dateModified>
5
+ <dateModified>Sat, 30 Apr 2022 14:28:41 GMT</dateModified>
6
6
  <expansionState></expansionState>
7
7
  <vertScrollState>1</vertScrollState>
8
8
  <windowTop>300</windowTop>
@@ -45,9 +45,6 @@
45
45
  </outline>
46
46
  </outline>
47
47
  <outline created="Wed, 15 Sep 2021 14:19:02 GMT" text="### Updates">
48
- <outline created="Sat, 30 Apr 2022 14:17:59 GMT" text="#### v0.5.45 -- 4/30/22 by DW">
49
- <outline created="Sat, 30 Apr 2022 14:16:10 GMT" text="pagetable now contains the user's screenname. It's important that the addMacroToPagetable callback have access to the screenname, we need it to construct the url for the user's RSS feed in littleFeedReader. "></outline>
50
- </outline>
51
48
  <outline created="Fri, 18 Mar 2022 14:21:28 GMT" text="#### v0.5.44 -- 3/18/22 by DW">
52
49
  <outline created="Fri, 18 Mar 2022 14:21:59 GMT" text="New callback, config.publishFile. If defined we call back with the file, screenname, relpath, flprivate, filetext and the url of the file if it's public."></outline>
53
50
  <outline created="Fri, 18 Mar 2022 14:22:36 GMT" text="It's called when we handle a /publishfile or /writewholefile message."></outline>