daveappserver 0.5.47 → 0.5.50
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 +9 -3
- package/package.json +1 -1
- package/readme.md +4 -0
- package/readme.opml +4 -1
package/appserver.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var myVersion = "0.5.
|
|
1
|
+
var myVersion = "0.5.50", myProductName = "daveAppServer";
|
|
2
2
|
|
|
3
3
|
exports.start = startup;
|
|
4
4
|
exports.notifySocketSubscribers = notifySocketSubscribers;
|
|
@@ -6,6 +6,8 @@ exports.saveStats = saveStats;
|
|
|
6
6
|
exports.getStats = getStats; //6/28/21 by DW
|
|
7
7
|
exports.getConfig = getConfig;
|
|
8
8
|
exports.publishFile = publishFile; //12/13/21 by DW
|
|
9
|
+
exports.readWholeFile = readWholeFile; //5/28/22 by DW
|
|
10
|
+
exports.writeWholeFile = writeWholeFile; //5/28/22 by DW
|
|
9
11
|
|
|
10
12
|
const fs = require ("fs");
|
|
11
13
|
var dns = require ("dns");
|
|
@@ -47,6 +49,8 @@ var config = {
|
|
|
47
49
|
defaultContentType: "text/plain", //8/3/21 by DW
|
|
48
50
|
|
|
49
51
|
userAgent: myProductName + " v" + myVersion //11/8/21 by DW
|
|
52
|
+
|
|
53
|
+
whitelist: undefined //7/21/22 by DW
|
|
50
54
|
};
|
|
51
55
|
const fnameConfig = "config.json";
|
|
52
56
|
|
|
@@ -623,7 +627,8 @@ function cleanFileStats (stats) { //4/19/21 by DW
|
|
|
623
627
|
}
|
|
624
628
|
else {
|
|
625
629
|
if (config.publishFile !== undefined) { //3/18/22 by DW
|
|
626
|
-
|
|
630
|
+
const url = (flprivate) ? undefined : config.urlServerForClient + screenname + "/" + relpath;
|
|
631
|
+
const type = utils.httpExt2MIME (utils.stringLastField (f, ".")); //7/3/22 by DW
|
|
627
632
|
config.publishFile (f, screenname, relpath, type, flprivate, filetext, url);
|
|
628
633
|
}
|
|
629
634
|
callback (undefined);
|
|
@@ -1016,7 +1021,8 @@ function startup (options, callback) {
|
|
|
1016
1021
|
flEnableLogin: config.flEnableLogin,
|
|
1017
1022
|
prefsPath: config.prefsPath,
|
|
1018
1023
|
docsPath: config.docsPath,
|
|
1019
|
-
idGitHubClient: config.githubClientId //11/9/21 by DW
|
|
1024
|
+
idGitHubClient: config.githubClientId, //11/9/21 by DW
|
|
1025
|
+
whitelist: config.whitelist //7/21/22 by DW
|
|
1020
1026
|
};
|
|
1021
1027
|
if (theRequest.addToPagetable !== undefined) { //3/9/21 by DW
|
|
1022
1028
|
for (var x in theRequest.addToPagetable) {
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -52,6 +52,10 @@ The second section configures the HTTP server and the connection to Twitter for
|
|
|
52
52
|
|
|
53
53
|
### Updates
|
|
54
54
|
|
|
55
|
+
#### v0.5.48 -- 3/18/22 by DW
|
|
56
|
+
|
|
57
|
+
Exports three routines: fileExists, readWholeFile, writeWholeFile.
|
|
58
|
+
|
|
55
59
|
#### v0.5.44 -- 3/18/22 by DW
|
|
56
60
|
|
|
57
61
|
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,
|
|
5
|
+
<dateModified>Sat, 28 May 2022 18:55:48 GMT</dateModified>
|
|
6
6
|
<expansionState></expansionState>
|
|
7
7
|
<vertScrollState>1</vertScrollState>
|
|
8
8
|
<windowTop>300</windowTop>
|
|
@@ -45,6 +45,9 @@
|
|
|
45
45
|
</outline>
|
|
46
46
|
</outline>
|
|
47
47
|
<outline created="Wed, 15 Sep 2021 14:19:02 GMT" text="### Updates">
|
|
48
|
+
<outline created="Sat, 28 May 2022 18:54:36 GMT" text="#### v0.5.48 -- 3/18/22 by DW">
|
|
49
|
+
<outline created="Sat, 28 May 2022 18:54:39 GMT" text="Exports three routines: fileExists, readWholeFile, writeWholeFile."></outline>
|
|
50
|
+
</outline>
|
|
48
51
|
<outline created="Fri, 18 Mar 2022 14:21:28 GMT" text="#### v0.5.44 -- 3/18/22 by DW">
|
|
49
52
|
<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>
|
|
50
53
|
<outline created="Fri, 18 Mar 2022 14:22:36 GMT" text="It's called when we handle a /publishfile or /writewholefile message."></outline>
|