@abtnode/router-provider 1.16.44 → 1.16.45-beta-20250609-025419-7fd1f86c
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/lib/default/index.js +1 -0
- package/lib/default/proxy.js +0 -12
- package/package.json +8 -8
package/lib/default/index.js
CHANGED
package/lib/default/proxy.js
CHANGED
|
@@ -18,8 +18,6 @@ const isArray = require('lodash/isArray');
|
|
|
18
18
|
const isString = require('lodash/isString');
|
|
19
19
|
const isObject = require('lodash/isObject');
|
|
20
20
|
const isFunction = require('lodash/isFunction');
|
|
21
|
-
const hash = require('object-hash');
|
|
22
|
-
const { LRUCache } = require('lru-cache');
|
|
23
21
|
const tls = require('tls');
|
|
24
22
|
|
|
25
23
|
// eslint-disable-next-line global-require
|
|
@@ -40,8 +38,6 @@ const prepareUrl = (url) => {
|
|
|
40
38
|
return url;
|
|
41
39
|
};
|
|
42
40
|
|
|
43
|
-
const routeCache = new LRUCache({ max: 5000 });
|
|
44
|
-
|
|
45
41
|
module.exports = class ReverseProxy {
|
|
46
42
|
opts = {};
|
|
47
43
|
|
|
@@ -413,13 +409,6 @@ module.exports = class ReverseProxy {
|
|
|
413
409
|
return route;
|
|
414
410
|
}
|
|
415
411
|
|
|
416
|
-
// to bust cache for route, you can attach an id to the route object in business layer
|
|
417
|
-
const cacheKey = isString(route) ? route : hash(route);
|
|
418
|
-
const entry = routeCache.get(cacheKey);
|
|
419
|
-
if (entry) {
|
|
420
|
-
return entry;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
412
|
const routeObject = { rr: 0, isResolved: true };
|
|
424
413
|
if (isString(route)) {
|
|
425
414
|
routeObject.urls = [ReverseProxy.buildTarget(route)];
|
|
@@ -436,7 +425,6 @@ module.exports = class ReverseProxy {
|
|
|
436
425
|
routeObject.path = route.path || '/';
|
|
437
426
|
routeObject.opts = route.opts || {};
|
|
438
427
|
}
|
|
439
|
-
routeCache.set(cacheKey, routeObject);
|
|
440
428
|
return routeObject;
|
|
441
429
|
}
|
|
442
430
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abtnode/router-provider",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.45-beta-20250609-025419-7fd1f86c",
|
|
4
4
|
"description": "Routing engine implementations for abt node",
|
|
5
5
|
"author": "polunzh <polunzh@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/ArcBlock/blocklet-server#readme",
|
|
@@ -32,13 +32,14 @@
|
|
|
32
32
|
"url": "https://github.com/ArcBlock/blocklet-server/issues"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@abtnode/constant": "1.16.
|
|
36
|
-
"@abtnode/
|
|
37
|
-
"@abtnode/
|
|
38
|
-
"@abtnode/
|
|
35
|
+
"@abtnode/constant": "1.16.45-beta-20250609-025419-7fd1f86c",
|
|
36
|
+
"@abtnode/db-cache": "1.16.45-beta-20250609-025419-7fd1f86c",
|
|
37
|
+
"@abtnode/logger": "1.16.45-beta-20250609-025419-7fd1f86c",
|
|
38
|
+
"@abtnode/router-templates": "1.16.45-beta-20250609-025419-7fd1f86c",
|
|
39
|
+
"@abtnode/util": "1.16.45-beta-20250609-025419-7fd1f86c",
|
|
39
40
|
"@arcblock/http-proxy": "^1.19.1",
|
|
40
41
|
"@arcblock/is-valid-domain": "^1.0.5",
|
|
41
|
-
"@ocap/util": "^1.20.
|
|
42
|
+
"@ocap/util": "^1.20.14",
|
|
42
43
|
"axios": "^1.7.9",
|
|
43
44
|
"debug": "^4.3.7",
|
|
44
45
|
"fast-glob": "^3.3.2",
|
|
@@ -47,7 +48,6 @@
|
|
|
47
48
|
"fs-extra": "^11.2.0",
|
|
48
49
|
"get-port": "^5.1.1",
|
|
49
50
|
"lodash": "^4.17.21",
|
|
50
|
-
"lru-cache": "^11.0.2",
|
|
51
51
|
"nginx-conf": "^1.7.0",
|
|
52
52
|
"object-hash": "^3.0.0",
|
|
53
53
|
"port-used": "^2.0.8",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"bluebird": "^3.7.2",
|
|
63
63
|
"fs-extra": "^11.2.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "0457b82da528653a1b903149ea1fb1966c31bee3"
|
|
66
66
|
}
|