@routr/location 2.0.6-alpha.1 → 2.0.7-alpha.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/dist/errors.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as grpc from "@grpc/grpc-js";
2
- export declare type LocationError = UnsupportedSchema | NotRoutesFoundForAOR;
3
- export declare type InvalidConfiguration = BadAlgorithmAndAffinityCombination | InvalidSchemaConfiguration;
2
+ export type LocationError = UnsupportedSchema | NotRoutesFoundForAOR;
3
+ export type InvalidConfiguration = BadAlgorithmAndAffinityCombination | InvalidSchemaConfiguration;
4
4
  /**
5
5
  * Error thrown when the location service returns an unsupported schema.
6
6
  */
@@ -48,23 +48,30 @@ class RedisStore {
48
48
  }
49
49
  /** @inheritdoc */
50
50
  get(key) {
51
- var e_1, _a;
51
+ var _a, e_1, _b, _c;
52
52
  return __awaiter(this, void 0, void 0, function* () {
53
53
  const routes = [];
54
54
  try {
55
55
  // eslint-disable-next-line no-loops/no-loops
56
- for (var _b = __asyncValues(yield this.client.scanIterator({
56
+ for (var _d = true, _e = __asyncValues(yield this.client.scanIterator({
57
57
  CURSOR: 0,
58
58
  MATCH: `${key}:*`
59
- })), _c; _c = yield _b.next(), !_c.done;) {
60
- const k = _c.value;
61
- routes.push(JSON.parse(yield this.client.get(k)));
59
+ })), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
60
+ _c = _f.value;
61
+ _d = false;
62
+ try {
63
+ const k = _c;
64
+ routes.push(JSON.parse(yield this.client.get(k)));
65
+ }
66
+ finally {
67
+ _d = true;
68
+ }
62
69
  }
63
70
  }
64
71
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
65
72
  finally {
66
73
  try {
67
- if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
74
+ if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
68
75
  }
69
76
  finally { if (e_1) throw e_1.error; }
70
77
  }
@@ -73,22 +80,29 @@ class RedisStore {
73
80
  }
74
81
  /** @inheritdoc */
75
82
  delete(key) {
76
- var e_2, _a;
83
+ var _a, e_2, _b, _c;
77
84
  return __awaiter(this, void 0, void 0, function* () {
78
85
  try {
79
86
  // eslint-disable-next-line no-loops/no-loops
80
- for (var _b = __asyncValues(yield this.client.scanIterator({
87
+ for (var _d = true, _e = __asyncValues(yield this.client.scanIterator({
81
88
  CURSOR: 0,
82
89
  MATCH: `${key}:*`
83
- })), _c; _c = yield _b.next(), !_c.done;) {
84
- const k = _c.value;
85
- yield this.client.del(k);
90
+ })), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
91
+ _c = _f.value;
92
+ _d = false;
93
+ try {
94
+ const k = _c;
95
+ yield this.client.del(k);
96
+ }
97
+ finally {
98
+ _d = true;
99
+ }
86
100
  }
87
101
  }
88
102
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
89
103
  finally {
90
104
  try {
91
- if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
105
+ if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
92
106
  }
93
107
  finally { if (e_2) throw e_2.error; }
94
108
  }
package/dist/runner.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/location",
3
- "version": "2.0.6-alpha.1",
3
+ "version": "2.0.7-alpha.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",
@@ -35,8 +35,8 @@
35
35
  "@opentelemetry/sdk-trace-base": "^1.0.4",
36
36
  "@opentelemetry/sdk-trace-node": "^1.0.4",
37
37
  "@opentelemetry/semantic-conventions": "^1.0.4",
38
- "@routr/common": "^2.0.6-alpha.1",
39
- "@routr/processor": "^2.0.6-alpha.1",
38
+ "@routr/common": "^2.0.7-alpha.0",
39
+ "@routr/processor": "^2.0.7-alpha.0",
40
40
  "ajv": "^6.12.6",
41
41
  "fp-ts": "^2.11.8",
42
42
  "redis": "^4.0.4"
@@ -48,5 +48,5 @@
48
48
  "bugs": {
49
49
  "url": "https://github.com/fonoster/routr/issues"
50
50
  },
51
- "gitHead": "389513636bbac9ab7ffbe14f1b8ecdb5bb93bad4"
51
+ "gitHead": "1c08d04c570d1fa156729a8f61e43c3c51b68f96"
52
52
  }