cloudcms-server 0.9.249 → 0.9.254
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/package.json +13 -13
- package/server/index.js +37 -0
- package/server/standalone.js +1 -0
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
},
|
|
7
7
|
"name": "cloudcms-server",
|
|
8
8
|
"description": "Cloud CMS Application Server Module",
|
|
9
|
-
"version": "0.9.
|
|
9
|
+
"version": "0.9.254",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git://github.com/gitana/cloudcms-server.git"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"agentkeepalive": "^4.1.3",
|
|
17
17
|
"alpaca": "^1.5.27",
|
|
18
18
|
"archiver": "^1.3.0",
|
|
19
|
-
"async": "^
|
|
19
|
+
"async": "^3.2.3",
|
|
20
20
|
"aws-sdk": "^2.544.0",
|
|
21
21
|
"basic-auth": "^1.1.0",
|
|
22
22
|
"body-parser": "^1.19.0",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"clone": "^2.1.2",
|
|
26
26
|
"connect-flash": "^0.1.1",
|
|
27
27
|
"connect-multiparty": "^2.2.0",
|
|
28
|
-
"connect-redis": "^
|
|
28
|
+
"connect-redis": "^6.1.3",
|
|
29
29
|
"consolidate": "^0.14.5",
|
|
30
30
|
"cookie-parser": "^1.4.4",
|
|
31
31
|
"debug": "^2.6.9",
|
|
32
|
-
"dustjs-helpers": "^1.
|
|
33
|
-
"dustjs-linkedin": "^
|
|
32
|
+
"dustjs-helpers": "^1.6.3",
|
|
33
|
+
"dustjs-linkedin": "^3.0.1",
|
|
34
34
|
"errorhandler": "^1.5.1",
|
|
35
35
|
"express": "^4.17.1",
|
|
36
36
|
"express-session": "^1.16.2",
|
|
37
37
|
"express-useragent": "^1.0.13",
|
|
38
38
|
"extend-with-super": "^2.0.0",
|
|
39
|
-
"gitana": "^1.0.
|
|
39
|
+
"gitana": "^1.0.322",
|
|
40
40
|
"handlebars": "^4.4.2",
|
|
41
41
|
"hbs": "^4.0.5",
|
|
42
42
|
"helmet": "^4.6.0",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"jsonwebtoken": "^8.5.1",
|
|
46
46
|
"klaw": "^1.3.1",
|
|
47
47
|
"lru-cache": "^4.1.5",
|
|
48
|
-
"marked": "^
|
|
48
|
+
"marked": "^4.0.14",
|
|
49
49
|
"memorystore": "^1.6.1",
|
|
50
50
|
"mime": "^1.6.0",
|
|
51
51
|
"mkdirp": "^0.5.1",
|
|
52
52
|
"moment": "^2.24.0",
|
|
53
53
|
"morgan": "^1.9.1",
|
|
54
|
-
"node-redis-pubsub": "^
|
|
54
|
+
"node-redis-pubsub": "^5.0.0",
|
|
55
55
|
"object-hash": "^1.3.1",
|
|
56
56
|
"object-merge": "^2.5.1",
|
|
57
57
|
"on-headers": "^1.0.2",
|
|
@@ -63,13 +63,13 @@
|
|
|
63
63
|
"passport-linkedin": "^1.0.0",
|
|
64
64
|
"passport-local": "^1.0.0",
|
|
65
65
|
"passport-oauth": "^1.0.0",
|
|
66
|
-
"passport-saml": "^2.
|
|
67
|
-
"passport-twitter": "^1.
|
|
66
|
+
"passport-saml": "^3.2.1",
|
|
67
|
+
"passport-twitter": "^0.1.5",
|
|
68
68
|
"pkginfo": "^0.4.1",
|
|
69
69
|
"q": "^1.5.1",
|
|
70
70
|
"random-js": "^1.0.8",
|
|
71
71
|
"recursive-readdir": "^2.2.2",
|
|
72
|
-
"redis": "^
|
|
72
|
+
"redis": "^4.0.6",
|
|
73
73
|
"redislock": "^1.3.0",
|
|
74
74
|
"request": "^2.88.0",
|
|
75
75
|
"request-param": "^1.0.1",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"serve-favicon": "^2.5.0",
|
|
80
80
|
"session-file-store": "^0.2.2",
|
|
81
81
|
"sha1": "^1.1.1",
|
|
82
|
-
"socket.io": "
|
|
82
|
+
"socket.io": "^4.4.1",
|
|
83
83
|
"ssl-root-cas": "^1.3.1",
|
|
84
84
|
"sticky-session": "^1.1.2",
|
|
85
85
|
"stomp-client": "^0.9.0",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"toobusy-js": "^0.5.1",
|
|
89
89
|
"uuid": "^3.3.2",
|
|
90
90
|
"vm2": "^3.8.4",
|
|
91
|
-
"watch": "^
|
|
91
|
+
"watch": "^0.13.0",
|
|
92
92
|
"winston": "^3.3.3"
|
|
93
93
|
},
|
|
94
94
|
"contributors": [
|
package/server/index.js
CHANGED
|
@@ -16,6 +16,9 @@ var session = require('express-session');
|
|
|
16
16
|
var cookieParser = require('cookie-parser');
|
|
17
17
|
var flash = require("connect-flash");
|
|
18
18
|
|
|
19
|
+
const redis = require('redis');
|
|
20
|
+
const connectRedis = require('connect-redis');
|
|
21
|
+
|
|
19
22
|
// we don't bind a single passport - instead, we get the constructor here by hand
|
|
20
23
|
var Passport = require("passport").Passport;
|
|
21
24
|
|
|
@@ -620,6 +623,18 @@ var startSlave = function(config, afterStartFn)
|
|
|
620
623
|
delete process.configuration.https;
|
|
621
624
|
}
|
|
622
625
|
|
|
626
|
+
|
|
627
|
+
// auto configuration of session store
|
|
628
|
+
if (!process.configuration.session) {
|
|
629
|
+
process.configuration.session = {};
|
|
630
|
+
}
|
|
631
|
+
if (process.env.CLOUDCMS_SESSION_TYPE) {
|
|
632
|
+
process.configuration.session.enabled = true;
|
|
633
|
+
process.configuration.session.type = process.env.CLOUDCMS_SESSION_TYPE;
|
|
634
|
+
}
|
|
635
|
+
if (process.env.CLOUDCMS_SESSION_SECRET) {
|
|
636
|
+
process.configuration.session.secret = process.env.CLOUDCMS_SESSION_SECRET;
|
|
637
|
+
}
|
|
623
638
|
|
|
624
639
|
// session store
|
|
625
640
|
var initializedSession = null;
|
|
@@ -653,6 +668,28 @@ var startSlave = function(config, afterStartFn)
|
|
|
653
668
|
var SessionFileStore = require('session-file-store')(session);
|
|
654
669
|
sessionConfig.store = new SessionFileStore(options);
|
|
655
670
|
}
|
|
671
|
+
else if (process.configuration.session.type === "redis")
|
|
672
|
+
{
|
|
673
|
+
var redisPort = process.env.CLOUDCMS_REDIS_PORT;
|
|
674
|
+
var redisHost = process.env.CLOUDCMS_REDIS_ENDPOINT;
|
|
675
|
+
|
|
676
|
+
if (!redisPort)
|
|
677
|
+
{
|
|
678
|
+
console.error("Cannot configure session for Redis storage because CLOUDCMS_REDIS_PORT is not defined");
|
|
679
|
+
}
|
|
680
|
+
else if (!redisHost)
|
|
681
|
+
{
|
|
682
|
+
console.error("Cannot configure session for Redis storage because CLOUDCMS_REDIS_ENDPOINT is not defined");
|
|
683
|
+
}
|
|
684
|
+
else
|
|
685
|
+
{
|
|
686
|
+
var redisOptions = {};
|
|
687
|
+
var redisClient = redis.createClient(redisPort, redisHost, redisOptions);
|
|
688
|
+
|
|
689
|
+
var RedisStore = connectRedis(session);
|
|
690
|
+
sessionConfig.store = new RedisStore({ client: redisClient });
|
|
691
|
+
}
|
|
692
|
+
}
|
|
656
693
|
else if (process.configuration.session.type === "memory" || !process.configuration.session.type)
|
|
657
694
|
{
|
|
658
695
|
var options = {};
|
package/server/standalone.js
CHANGED
|
@@ -69,6 +69,7 @@ server.report(function(callback) {
|
|
|
69
69
|
console.log("Hosts Directory: " + process.env.CLOUDCMS_HOSTS_PATH);
|
|
70
70
|
console.log("LaunchPad Mode: " + process.env.CLOUDCMS_LAUNCHPAD_SETUP);
|
|
71
71
|
console.log("Max Files Detected: " + process.env.CLOUDCMS_MAX_FILES);
|
|
72
|
+
console.log("Session Type: " + process.configuration.session.type);
|
|
72
73
|
|
|
73
74
|
if (process.configuration.https) {
|
|
74
75
|
console.log("Server is configured to use HTTPS");
|