@routr/location 2.15.4 → 2.17.0

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/README.md CHANGED
@@ -1,3 +1,3 @@
1
- <a href="https://gitpod.io/#https://github.com/fonoster/routr"> <img src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod" alt="Contribute with Gitpod" />
1
+ <a href="https://docs.routr.io/guides/develop-with-dev-containers"> <img src="https://img.shields.io/badge/Contribute%20with-Dev%20Containers-908a85?logo=docker" alt="Contribute with Dev Containers" />
2
2
 
3
3
  This module is part of the [Routr](https://routr.io) project. By itself, it does not do much. It is intended to be used as a dependency for other modules. For more information about the project, please visit [https://github.com/fonoster/routr](https://github.com/fonoster/routr).
@@ -44,7 +44,13 @@ class MemoryStore {
44
44
  }
45
45
  /** @inheritdoc */
46
46
  delete(key) {
47
- this.collections.delete(key);
47
+ // Also drop the per-call entries findRoutes caches under `${key}:...`,
48
+ // matching the prefix match in RedisStore.delete
49
+ this.collections.forEach((_, k) => {
50
+ if (k === key || k.startsWith(`${key}:`)) {
51
+ this.collections.delete(k);
52
+ }
53
+ });
48
54
  return;
49
55
  }
50
56
  /** @inheritdoc */
package/dist/utils.js CHANGED
@@ -72,9 +72,8 @@ const getServiceInfo = (bindAddr, locator) => {
72
72
  }),
73
73
  removeRoutes: (call, callback) => __awaiter(void 0, void 0, void 0, function* () {
74
74
  try {
75
- callback(null, {
76
- routes: yield locator.findRoutes(call.request)
77
- });
75
+ yield locator.removeRoutes(call.request);
76
+ callback(null, {});
78
77
  }
79
78
  catch (e) {
80
79
  callback(e, null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/location",
3
- "version": "2.15.4",
3
+ "version": "2.17.0",
4
4
  "description": "Creates and maintains a list of routes to all registered endpoints",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/routr#readme",
@@ -27,8 +27,8 @@
27
27
  "dependencies": {
28
28
  "@fonoster/logger": "0.6.0",
29
29
  "@grpc/grpc-js": "~1.14.6",
30
- "@routr/common": "^2.15.4",
31
- "@routr/processor": "^2.15.4",
30
+ "@routr/common": "^2.17.0",
31
+ "@routr/processor": "^2.17.0",
32
32
  "ajv": "^6.12.6",
33
33
  "fp-ts": "^2.11.8",
34
34
  "redis": "^4.0.4"
@@ -40,5 +40,5 @@
40
40
  "bugs": {
41
41
  "url": "https://github.com/fonoster/routr/issues"
42
42
  },
43
- "gitHead": "3d4a72191d5ac315429570e562d20fb5807cc942"
43
+ "gitHead": "9bc2d0a407a82e7b3724bb139ba62504c7b3d49e"
44
44
  }