cloudcms-server 0.9.268 → 0.9.272
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/launchpad/launchers/cluster.js +6 -6
- package/launchpad/launchers/redis.js +3 -3
- package/middleware/proxy/proxy.js +5 -9
- package/package.json +6 -3
- package/temp/http-proxy/.auto-changelog +6 -0
- package/temp/http-proxy/.gitattributes +1 -0
- package/temp/http-proxy/CHANGELOG.md +1872 -0
- package/temp/http-proxy/CODE_OF_CONDUCT.md +74 -0
- package/temp/http-proxy/LICENSE +23 -0
- package/temp/http-proxy/README.md +568 -0
- package/temp/http-proxy/codecov.yml +10 -0
- package/temp/http-proxy/index.js +13 -0
- package/temp/http-proxy/lib/http-proxy/common.js +220 -0
- package/temp/http-proxy/lib/http-proxy/index.js +174 -0
- package/temp/http-proxy/lib/http-proxy/passes/web-incoming.js +174 -0
- package/temp/http-proxy/lib/http-proxy/passes/web-outgoing.js +135 -0
- package/temp/http-proxy/lib/http-proxy/passes/ws-incoming.js +141 -0
- package/temp/http-proxy/lib/index.js +13 -0
- package/temp/http-proxy/package.json +41 -0
- package/temp/http-proxy/renovate.json +19 -0
- package/temp/node-http-proxy/.eslintignore +3 -0
- package/temp/node-http-proxy/.eslintrc.js +21 -0
- package/temp/node-http-proxy/.github/workflows/ci.yml +30 -0
- package/temp/node-http-proxy/.prettierrc +7 -0
- package/temp/node-http-proxy/CODE_OF_CONDUCT.md +74 -0
- package/temp/node-http-proxy/LICENSE +23 -0
- package/temp/node-http-proxy/README.md +568 -0
- package/temp/node-http-proxy/codecov.yml +10 -0
- package/temp/node-http-proxy/dist/http-proxy/common.js +220 -0
- package/temp/node-http-proxy/dist/http-proxy/index.js +174 -0
- package/temp/node-http-proxy/dist/http-proxy/passes/web-incoming.js +174 -0
- package/temp/node-http-proxy/dist/http-proxy/passes/web-outgoing.js +135 -0
- package/temp/node-http-proxy/dist/http-proxy/passes/ws-incoming.js +141 -0
- package/temp/node-http-proxy/dist/index.js +13 -0
- package/temp/node-http-proxy/lib/http-proxy/common.js +265 -0
- package/temp/node-http-proxy/lib/http-proxy/index.ts +242 -0
- package/temp/node-http-proxy/lib/http-proxy/passes/web-incoming.js +208 -0
- package/temp/node-http-proxy/lib/http-proxy/passes/web-outgoing.js +163 -0
- package/temp/node-http-proxy/lib/http-proxy/passes/ws-incoming.js +179 -0
- package/temp/node-http-proxy/lib/index.ts +13 -0
- package/temp/node-http-proxy/lib/types.d.ts +277 -0
- package/temp/node-http-proxy/package-lock.json +5028 -0
- package/temp/node-http-proxy/package.json +47 -0
- package/temp/node-http-proxy/tsconfig.build.json +4 -0
- package/temp/node-http-proxy/tsconfig.json +115 -0
- package/temp/node-http-proxy/vitest.config.ts +9 -0
- package/util/proxy-factory.js +39 -128
|
@@ -3,11 +3,6 @@ const { Server } = require("socket.io");
|
|
|
3
3
|
const { setupMaster, setupWorker } = require("@socket.io/sticky");
|
|
4
4
|
const { createAdapter, setupPrimary } = require("@socket.io/cluster-adapter");
|
|
5
5
|
|
|
6
|
-
var numCPUs = require("os").cpus().length;
|
|
7
|
-
if (process.env.FORCE_SINGLE_CPU) {
|
|
8
|
-
numCPUs = 1;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
6
|
module.exports = function(config) {
|
|
12
7
|
|
|
13
8
|
var r = {};
|
|
@@ -34,7 +29,12 @@ module.exports = function(config) {
|
|
|
34
29
|
r.afterStartCluster = function(httpServer, callback)
|
|
35
30
|
{
|
|
36
31
|
var startupCount = 0;
|
|
37
|
-
|
|
32
|
+
|
|
33
|
+
var numCPUs = require("os").cpus().length;
|
|
34
|
+
if (process.env.FORCE_SINGLE_CPU) {
|
|
35
|
+
numCPUs = 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
38
|
var workers = [];
|
|
39
39
|
for (let i = 0; i < numCPUs; i++)
|
|
40
40
|
{
|
|
@@ -32,10 +32,10 @@ module.exports = function(config) {
|
|
|
32
32
|
httpServer.io = io;
|
|
33
33
|
|
|
34
34
|
io.engine.on("connection_error", function(err) {
|
|
35
|
-
console.log("CONNECTION ERROR");
|
|
35
|
+
// console.log("CONNECTION ERROR");
|
|
36
36
|
// console.log("REQUEST: ", err.req); // the request object
|
|
37
37
|
// console.log("CODE: " + err.code); // the error code, for example 1
|
|
38
|
-
console.log("MESSAGE: ", err.message); // the error message, for example "Session ID unknown"
|
|
38
|
+
// console.log("MESSAGE: ", err.message); // the error message, for example "Session ID unknown"
|
|
39
39
|
// console.log("CONTEXT: ", err.context); // some additional error context
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -49,7 +49,7 @@ module.exports = function(config) {
|
|
|
49
49
|
|
|
50
50
|
// on connect
|
|
51
51
|
io.on("connection", (socket) => {
|
|
52
|
-
console.log("Redis Launcher on('connection') - socket id:" + socket.id);
|
|
52
|
+
//console.log("Redis Launcher on('connection') - socket id:" + socket.id);
|
|
53
53
|
socket.on('message', function(m) {
|
|
54
54
|
console.log("Socket Connection message: " + m);
|
|
55
55
|
});
|
|
@@ -82,20 +82,17 @@ exports = module.exports = function()
|
|
|
82
82
|
contentStore.existsFile(filePath, function(exists) {
|
|
83
83
|
|
|
84
84
|
if (!exists) {
|
|
85
|
-
callback();
|
|
86
|
-
return;
|
|
85
|
+
return callback();
|
|
87
86
|
}
|
|
88
87
|
|
|
89
88
|
contentStore.fileStats(filePath, function(err, stats) {
|
|
90
89
|
|
|
91
90
|
if (err) {
|
|
92
|
-
callback();
|
|
93
|
-
return;
|
|
91
|
+
return callback();
|
|
94
92
|
}
|
|
95
93
|
|
|
96
|
-
if (stats.size
|
|
97
|
-
callback();
|
|
98
|
-
return;
|
|
94
|
+
if (stats.size === 0) {
|
|
95
|
+
return callback();
|
|
99
96
|
}
|
|
100
97
|
|
|
101
98
|
var handleGoodStream = function()
|
|
@@ -117,8 +114,7 @@ exports = module.exports = function()
|
|
|
117
114
|
// check cacheInfo for expireTime
|
|
118
115
|
contentStore.readFile(filePath + ".cache", function(err, cacheInfoText) {
|
|
119
116
|
|
|
120
|
-
if (err || !cacheInfoText)
|
|
121
|
-
{
|
|
117
|
+
if (err || !cacheInfoText) {
|
|
122
118
|
return handleBadStream();
|
|
123
119
|
}
|
|
124
120
|
|
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.272",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git://github.com/gitana/cloudcms-server.git"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"handlebars": "^4.4.2",
|
|
45
45
|
"hbs": "^4.0.5",
|
|
46
46
|
"helmet": "^4.6.0",
|
|
47
|
-
"http-proxy": "
|
|
47
|
+
"http-proxy": "file:./temp/http-proxy",
|
|
48
48
|
"install": "^0.13.0",
|
|
49
49
|
"ioredis": "4.28.5",
|
|
50
50
|
"json5": "^1.0.1",
|
|
@@ -93,7 +93,10 @@
|
|
|
93
93
|
"uuid": "^3.3.2",
|
|
94
94
|
"vm2": "^3.8.4",
|
|
95
95
|
"watch": "^0.13.0",
|
|
96
|
-
"winston": "^3.3.3"
|
|
96
|
+
"winston": "^3.3.3",
|
|
97
|
+
"eventemitter3": "^4.0.0",
|
|
98
|
+
"requires-port": "^1.0.0",
|
|
99
|
+
"follow-redirects": "^1.0.0"
|
|
97
100
|
},
|
|
98
101
|
"contributors": [
|
|
99
102
|
{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
package-lock.json binary
|