cloudcms-server 3.2.286 → 3.2.288

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/index.js CHANGED
@@ -48,6 +48,13 @@ if (process.env.DEFAULT_HTTP_TIMEOUT_MS)
48
48
  }
49
49
  }
50
50
 
51
+ // dns fix for Node 17 +
52
+ // see: https://nodejs.org/api/dns.html#dnssetdefaultresultorderorder
53
+ var dns = require("dns");
54
+ if (typeof(dns.setDefaultResultOrder) !== "undefined") {
55
+ dns.setDefaultResultOrder("ipv4first");
56
+ }
57
+
51
58
  // default agents
52
59
  var HttpKeepAliveAgent = require('agentkeepalive');
53
60
  var HttpsKeepAliveAgent = require('agentkeepalive').HttpsAgent;
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": "3.2.286",
9
+ "version": "3.2.288",
10
10
  "repository": {
11
11
  "type": "git",
12
12
  "url": "git://github.com/gitana/cloudcms-server.git"
@@ -50,7 +50,7 @@
50
50
  "json5": "^1.0.1",
51
51
  "jsonwebtoken": "^8.5.1",
52
52
  "klaw": "^1.3.1",
53
- "lru-cache": "^4.1.5",
53
+ "lru-cache": "^7.14.0",
54
54
  "marked": "^4.0.14",
55
55
  "memored": "^1.1.1",
56
56
  "memorystore": "^1.6.1",
package/util/auth.js CHANGED
@@ -8,16 +8,18 @@ var http = require("http");
8
8
  var https = require("https");
9
9
  var async = require("async");
10
10
 
11
+ var LRU = require("lru-cache");
12
+
11
13
  // trusted profile cache size 100
12
- var TRUSTED_PROFILE_CACHE = require("lru-cache")({
14
+ var TRUSTED_PROFILE_CACHE = new LRU({
13
15
  max:100,
14
- maxAge: 1000 * 60 * 15 // 15 minutes
16
+ ttl: 1000 * 60 * 15 // 15 minutes
15
17
  });
16
18
 
17
19
  // user entry cache size 100
18
- var USER_ENTRY_CACHE = require("lru-cache")({
20
+ var USER_ENTRY_CACHE = new LRU({
19
21
  max: 100,
20
- maxAge: 1000 * 60 * 15 // 15 minutes
22
+ ttl: 1000 * 60 * 15 // 15 minutes
21
23
  });
22
24
 
23
25
  var Gitana = require("gitana");
@@ -10,6 +10,8 @@ var oauth2 = require("./oauth2")();
10
10
  var urlTool = require("url");
11
11
  const finalhandler = require("finalhandler");
12
12
 
13
+ var LRU = require("lru-cache");
14
+
13
15
  var exports = module.exports;
14
16
 
15
17
  var _LOCK = function(lockIdentifiers, workFunction)
@@ -18,9 +20,9 @@ var _LOCK = function(lockIdentifiers, workFunction)
18
20
  process.locks.lock(name, workFunction);
19
21
  };
20
22
 
21
- var NAMED_PROXY_HANDLERS_CACHE = require("lru-cache")({
23
+ var NAMED_PROXY_HANDLERS_CACHE = new LRU({
22
24
  max: 200,
23
- maxAge: 1000 * 60 * 60 // 60 minutes
25
+ ttl: 1000 * 60 * 60 // 60 minutes
24
26
  });
25
27
 
26
28
  var acquireProxyHandler = exports.acquireProxyHandler = function(proxyTarget, pathPrefix, callback)