@aws-sdk/endpoint-cache 3.34.0 → 3.47.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/CHANGELOG.md CHANGED
@@ -3,6 +3,44 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.47.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.46.0...v3.47.0) (2022-01-15)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/endpoint-cache
9
+
10
+
11
+
12
+
13
+
14
+ # [3.46.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.45.0...v3.46.0) (2022-01-07)
15
+
16
+
17
+ ### Features
18
+
19
+ * **packages:** end support for Node.js 10.x ([#3141](https://github.com/aws/aws-sdk-js-v3/issues/3141)) ([1a62865](https://github.com/aws/aws-sdk-js-v3/commit/1a6286513f7cdb556708845c512861c5f92eb883))
20
+
21
+
22
+
23
+
24
+
25
+ # [3.36.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.35.0...v3.36.0) (2021-10-08)
26
+
27
+
28
+ ### Features
29
+
30
+ * publish files in dist-* only ([#2873](https://github.com/aws/aws-sdk-js-v3/issues/2873)) ([53b4243](https://github.com/aws/aws-sdk-js-v3/commit/53b4243b066f25ff2412d5f0dea1036054b2df32))
31
+
32
+
33
+
34
+
35
+
36
+ # [3.35.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.34.0...v3.35.0) (2021-10-04)
37
+
38
+ **Note:** Version bump only for package @aws-sdk/endpoint-cache
39
+
40
+
41
+
42
+
43
+
6
44
  # [3.34.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.33.0...v3.34.0) (2021-09-24)
7
45
 
8
46
 
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EndpointCache = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const lru_cache_1 = tslib_1.__importDefault(require("mnemonist/lru-cache"));
6
+ class EndpointCache {
7
+ constructor(capacity) {
8
+ this.cache = new lru_cache_1.default(capacity);
9
+ }
10
+ getEndpoint(key) {
11
+ const endpointsWithExpiry = this.get(key);
12
+ if (!endpointsWithExpiry || endpointsWithExpiry.length === 0) {
13
+ return undefined;
14
+ }
15
+ const endpoints = endpointsWithExpiry.map((endpoint) => endpoint.Address);
16
+ return endpoints[Math.floor(Math.random() * endpoints.length)];
17
+ }
18
+ get(key) {
19
+ if (!this.has(key)) {
20
+ return;
21
+ }
22
+ const value = this.cache.get(key);
23
+ if (!value) {
24
+ return;
25
+ }
26
+ const now = Date.now();
27
+ const endpointsWithExpiry = value.filter((endpoint) => now < endpoint.Expires);
28
+ if (endpointsWithExpiry.length === 0) {
29
+ this.delete(key);
30
+ return undefined;
31
+ }
32
+ return endpointsWithExpiry;
33
+ }
34
+ set(key, endpoints) {
35
+ const now = Date.now();
36
+ this.cache.set(key, endpoints.map(({ Address, CachePeriodInMinutes }) => ({
37
+ Address,
38
+ Expires: now + CachePeriodInMinutes * 60 * 1000,
39
+ })));
40
+ }
41
+ delete(key) {
42
+ this.cache.set(key, []);
43
+ }
44
+ has(key) {
45
+ if (!this.cache.has(key)) {
46
+ return false;
47
+ }
48
+ const endpoints = this.cache.peek(key);
49
+ if (!endpoints) {
50
+ return false;
51
+ }
52
+ return endpoints.length > 0;
53
+ }
54
+ clear() {
55
+ this.cache.clear();
56
+ }
57
+ }
58
+ exports.EndpointCache = EndpointCache;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./Endpoint"), exports);
5
+ tslib_1.__exportStar(require("./EndpointCache"), exports);
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,58 @@
1
+ import LRUCache from "mnemonist/lru-cache";
2
+ var EndpointCache = (function () {
3
+ function EndpointCache(capacity) {
4
+ this.cache = new LRUCache(capacity);
5
+ }
6
+ EndpointCache.prototype.getEndpoint = function (key) {
7
+ var endpointsWithExpiry = this.get(key);
8
+ if (!endpointsWithExpiry || endpointsWithExpiry.length === 0) {
9
+ return undefined;
10
+ }
11
+ var endpoints = endpointsWithExpiry.map(function (endpoint) { return endpoint.Address; });
12
+ return endpoints[Math.floor(Math.random() * endpoints.length)];
13
+ };
14
+ EndpointCache.prototype.get = function (key) {
15
+ if (!this.has(key)) {
16
+ return;
17
+ }
18
+ var value = this.cache.get(key);
19
+ if (!value) {
20
+ return;
21
+ }
22
+ var now = Date.now();
23
+ var endpointsWithExpiry = value.filter(function (endpoint) { return now < endpoint.Expires; });
24
+ if (endpointsWithExpiry.length === 0) {
25
+ this.delete(key);
26
+ return undefined;
27
+ }
28
+ return endpointsWithExpiry;
29
+ };
30
+ EndpointCache.prototype.set = function (key, endpoints) {
31
+ var now = Date.now();
32
+ this.cache.set(key, endpoints.map(function (_a) {
33
+ var Address = _a.Address, CachePeriodInMinutes = _a.CachePeriodInMinutes;
34
+ return ({
35
+ Address: Address,
36
+ Expires: now + CachePeriodInMinutes * 60 * 1000,
37
+ });
38
+ }));
39
+ };
40
+ EndpointCache.prototype.delete = function (key) {
41
+ this.cache.set(key, []);
42
+ };
43
+ EndpointCache.prototype.has = function (key) {
44
+ if (!this.cache.has(key)) {
45
+ return false;
46
+ }
47
+ var endpoints = this.cache.peek(key);
48
+ if (!endpoints) {
49
+ return false;
50
+ }
51
+ return endpoints.length > 0;
52
+ };
53
+ EndpointCache.prototype.clear = function () {
54
+ this.cache.clear();
55
+ };
56
+ return EndpointCache;
57
+ }());
58
+ export { EndpointCache };
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,6 @@
1
+ export interface Endpoint {
2
+
3
+ Address: string;
4
+
5
+ CachePeriodInMinutes: number;
6
+ }
@@ -0,0 +1,20 @@
1
+ import { Endpoint } from "./Endpoint";
2
+ export interface EndpointWithExpiry extends Pick<Endpoint, "Address"> {
3
+ Expires: number;
4
+ }
5
+ export declare class EndpointCache {
6
+ private readonly cache;
7
+ constructor(capacity: number);
8
+
9
+ getEndpoint(key: string): string | undefined;
10
+
11
+ get(key: string): EndpointWithExpiry[] | undefined;
12
+
13
+ set(key: string, endpoints: Endpoint[]): void;
14
+
15
+ delete(key: string): void;
16
+
17
+ has(key: string): boolean;
18
+
19
+ clear(): void;
20
+ }
File without changes
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@aws-sdk/endpoint-cache",
3
- "version": "3.34.0",
3
+ "version": "3.47.0",
4
4
  "scripts": {
5
5
  "build": "yarn build:cjs && yarn build:es && yarn build:types",
6
6
  "build:cjs": "tsc -p tsconfig.cjs.json",
7
7
  "build:es": "tsc -p tsconfig.es.json",
8
8
  "build:types": "tsc -p tsconfig.types.json",
9
- "downlevel-dts": "downlevel-dts dist/types dist/types/ts3.4",
9
+ "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
10
+ "clean": "rimraf ./dist-*",
10
11
  "test": "jest --passWithNoTests"
11
12
  },
12
13
  "author": {
@@ -14,29 +15,29 @@
14
15
  "url": "https://aws.amazon.com/javascript/"
15
16
  },
16
17
  "license": "Apache-2.0",
17
- "main": "./dist/cjs/index.js",
18
- "module": "./dist/es/index.js",
19
- "types": "./dist/types/index.d.ts",
18
+ "main": "./dist-cjs/index.js",
19
+ "module": "./dist-es/index.js",
20
+ "types": "./dist-types/index.d.ts",
20
21
  "dependencies": {
21
22
  "mnemonist": "0.38.3",
22
23
  "tslib": "^2.3.0"
23
24
  },
24
25
  "devDependencies": {
25
- "@types/jest": "^26.0.4",
26
- "@types/node": "^10.0.0",
27
- "jest": "^26.1.0",
28
- "typescript": "~4.3.5"
26
+ "@types/node": "^10.0.0"
29
27
  },
30
28
  "engines": {
31
- "node": ">= 10.0.0"
29
+ "node": ">= 12.0.0"
32
30
  },
33
31
  "typesVersions": {
34
32
  "<4.0": {
35
- "dist/types/*": [
36
- "dist/types/ts3.4/*"
33
+ "dist-types/*": [
34
+ "dist-types/ts3.4/*"
37
35
  ]
38
36
  }
39
37
  },
38
+ "files": [
39
+ "dist-*"
40
+ ],
40
41
  "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/endpoint-cache",
41
42
  "repository": {
42
43
  "type": "git",
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW5kcG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvRW5kcG9pbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBpbnRlcmZhY2UgRW5kcG9pbnQge1xuICAvKipcbiAgICogPHA+QW4gZW5kcG9pbnQgYWRkcmVzcy48L3A+XG4gICAqL1xuICBBZGRyZXNzOiBzdHJpbmc7XG5cbiAgLyoqXG4gICAqIDxwPlRoZSBUVEwgZm9yIHRoZSBlbmRwb2ludCwgaW4gbWludXRlcy48L3A+XG4gICAqL1xuICBDYWNoZVBlcmlvZEluTWludXRlczogbnVtYmVyO1xufVxuIl19
@@ -1,59 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EndpointCache = void 0;
4
- const tslib_1 = require("tslib");
5
- const lru_cache_1 = tslib_1.__importDefault(require("mnemonist/lru-cache"));
6
- class EndpointCache {
7
- constructor(capacity) {
8
- this.cache = new lru_cache_1.default(capacity);
9
- }
10
- getEndpoint(key) {
11
- const endpointsWithExpiry = this.get(key);
12
- if (!endpointsWithExpiry || endpointsWithExpiry.length === 0) {
13
- return undefined;
14
- }
15
- const endpoints = endpointsWithExpiry.map((endpoint) => endpoint.Address);
16
- return endpoints[Math.floor(Math.random() * endpoints.length)];
17
- }
18
- get(key) {
19
- if (!this.has(key)) {
20
- return;
21
- }
22
- const value = this.cache.get(key);
23
- if (!value) {
24
- return;
25
- }
26
- const now = Date.now();
27
- const endpointsWithExpiry = value.filter((endpoint) => now < endpoint.Expires);
28
- if (endpointsWithExpiry.length === 0) {
29
- this.delete(key);
30
- return undefined;
31
- }
32
- return endpointsWithExpiry;
33
- }
34
- set(key, endpoints) {
35
- const now = Date.now();
36
- this.cache.set(key, endpoints.map(({ Address, CachePeriodInMinutes }) => ({
37
- Address,
38
- Expires: now + CachePeriodInMinutes * 60 * 1000,
39
- })));
40
- }
41
- delete(key) {
42
- this.cache.set(key, []);
43
- }
44
- has(key) {
45
- if (!this.cache.has(key)) {
46
- return false;
47
- }
48
- const endpoints = this.cache.peek(key);
49
- if (!endpoints) {
50
- return false;
51
- }
52
- return endpoints.length > 0;
53
- }
54
- clear() {
55
- this.cache.clear();
56
- }
57
- }
58
- exports.EndpointCache = EndpointCache;
59
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW5kcG9pbnRDYWNoZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9FbmRwb2ludENhY2hlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSw0RUFBMkM7QUFRM0MsTUFBYSxhQUFhO0lBR3hCLFlBQVksUUFBZ0I7UUFDMUIsSUFBSSxDQUFDLEtBQUssR0FBRyxJQUFJLG1CQUFRLENBQUMsUUFBUSxDQUFDLENBQUM7SUFDdEMsQ0FBQztJQVFELFdBQVcsQ0FBQyxHQUFXO1FBQ3JCLE1BQU0sbUJBQW1CLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUMxQyxJQUFJLENBQUMsbUJBQW1CLElBQUksbUJBQW1CLENBQUMsTUFBTSxLQUFLLENBQUMsRUFBRTtZQUM1RCxPQUF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NlIHJlbW92ZS9kZWxldGUgc3VwcG9ydCBpcyBhZGRlZCB1cHN0cmVhbVxuICAgIC8vIFJlZnM6IGh0dHBzOi8vZ2l0aHViLmNvbS9Zb21ndWl0aGVyZWFsL21uZW1vbmlzdC9pc3N1ZXMvMTQzXG4gICAgY29uc3QgZW5kcG9pbnRzID0gdGhpcy5jYWNoZS5wZWVrKGtleSk7XG4gICAgaWYgKCFlbmRwb2ludHMpIHtcbiAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG4gICAgcmV0dXJuIGVuZHBvaW50cy5sZW5ndGggPiAwO1xuICB9XG5cbiAgLyoqXG4gICAqIENsZWFycyB0aGUgY2FjaGUuXG4gICAqL1xuICBjbGVhcigpIHtcbiAgICB0aGlzLmNhY2hlLmNsZWFyKCk7XG4gIH1cbn1cbiJdfQ==
package/dist/cjs/index.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./Endpoint"), exports);
5
- tslib_1.__exportStar(require("./EndpointCache"), exports);
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscURBQTJCO0FBQzNCLDBEQUFnQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL0VuZHBvaW50XCI7XG5leHBvcnQgKiBmcm9tIFwiLi9FbmRwb2ludENhY2hlXCI7XG4iXX0=
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW5kcG9pbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvRW5kcG9pbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBpbnRlcmZhY2UgRW5kcG9pbnQge1xuICAvKipcbiAgICogPHA+QW4gZW5kcG9pbnQgYWRkcmVzcy48L3A+XG4gICAqL1xuICBBZGRyZXNzOiBzdHJpbmc7XG5cbiAgLyoqXG4gICAqIDxwPlRoZSBUVEwgZm9yIHRoZSBlbmRwb2ludCwgaW4gbWludXRlcy48L3A+XG4gICAqL1xuICBDYWNoZVBlcmlvZEluTWludXRlczogbnVtYmVyO1xufVxuIl19
@@ -1,99 +0,0 @@
1
- import LRUCache from "mnemonist/lru-cache";
2
- var EndpointCache = /** @class */ (function () {
3
- function EndpointCache(capacity) {
4
- this.cache = new LRUCache(capacity);
5
- }
6
- /**
7
- * Returns an un-expired endpoint for the given key.
8
- *
9
- * @param endpointsWithExpiry
10
- * @returns
11
- */
12
- EndpointCache.prototype.getEndpoint = function (key) {
13
- var endpointsWithExpiry = this.get(key);
14
- if (!endpointsWithExpiry || endpointsWithExpiry.length === 0) {
15
- return undefined;
16
- }
17
- var endpoints = endpointsWithExpiry.map(function (endpoint) { return endpoint.Address; });
18
- return endpoints[Math.floor(Math.random() * endpoints.length)];
19
- };
20
- /**
21
- * Returns un-expired endpoints for the given key.
22
- *
23
- * @param key
24
- * @returns
25
- */
26
- EndpointCache.prototype.get = function (key) {
27
- if (!this.has(key)) {
28
- return;
29
- }
30
- var value = this.cache.get(key);
31
- if (!value) {
32
- return;
33
- }
34
- var now = Date.now();
35
- var endpointsWithExpiry = value.filter(function (endpoint) { return now < endpoint.Expires; });
36
- if (endpointsWithExpiry.length === 0) {
37
- this.delete(key);
38
- return undefined;
39
- }
40
- return endpointsWithExpiry;
41
- };
42
- /**
43
- * Stores the endpoints passed for the key in cache.
44
- * If not defined, uses empty string for the Address in endpoint.
45
- * If not defined, uses one minute for CachePeriodInMinutes in endpoint.
46
- * Stores milliseconds elapsed since the UNIX epoch in Expires param based
47
- * on value provided in CachePeriodInMinutes.
48
- *
49
- * @param key
50
- * @param endpoints
51
- */
52
- EndpointCache.prototype.set = function (key, endpoints) {
53
- var now = Date.now();
54
- this.cache.set(key, endpoints.map(function (_a) {
55
- var Address = _a.Address, CachePeriodInMinutes = _a.CachePeriodInMinutes;
56
- return ({
57
- Address: Address,
58
- Expires: now + CachePeriodInMinutes * 60 * 1000,
59
- });
60
- }));
61
- };
62
- /**
63
- * Deletes the value for the given key in the cache.
64
- *
65
- * @param {string} key
66
- */
67
- EndpointCache.prototype.delete = function (key) {
68
- // Replace with remove/delete call once support is added upstream
69
- // Refs: https://github.com/Yomguithereal/mnemonist/issues/143
70
- this.cache.set(key, []);
71
- };
72
- /**
73
- * Checks whether the key exists in cache.
74
- *
75
- * @param {string} key
76
- * @returns {boolean}
77
- */
78
- EndpointCache.prototype.has = function (key) {
79
- if (!this.cache.has(key)) {
80
- return false;
81
- }
82
- // Remove call for peek, once remove/delete support is added upstream
83
- // Refs: https://github.com/Yomguithereal/mnemonist/issues/143
84
- var endpoints = this.cache.peek(key);
85
- if (!endpoints) {
86
- return false;
87
- }
88
- return endpoints.length > 0;
89
- };
90
- /**
91
- * Clears the cache.
92
- */
93
- EndpointCache.prototype.clear = function () {
94
- this.cache.clear();
95
- };
96
- return EndpointCache;
97
- }());
98
- export { EndpointCache };
99
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW5kcG9pbnRDYWNoZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9FbmRwb2ludENhY2hlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sUUFBUSxNQUFNLHFCQUFxQixDQUFDO0FBUTNDO0lBR0UsdUJBQVksUUFBZ0I7UUFDMUIsSUFBSSxDQUFDLEtBQUssR0FBRyxJQUFJLFFBQVEsQ0FBQyxRQUFRLENBQUMsQ0FBQztJQUN0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vZGVsZXRlIGNhbGwgb25jZSBzdXBwb3J0IGlzIGFkZGVkIHVwc3RyZWFtXG4gICAgLy8gUmVmczogaHR0cHM6Ly9naXRodWIuY29tL1lvbWd1aXRoZXJlYWwvbW5lbW9uaXN0L2lzc3Vlcy8xNDNcbiAgICB0aGlzLmNhY2hlLnNldChrZXksIFtdKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBDaGVja3Mgd2hldGhlciB0aGUga2V5IGV4aXN0cyBpbiBjYWNoZS5cbiAgICpcbiAgICogQHBhcmFtIHtzdHJpbmd9IGtleVxuICAgKiBAcmV0dXJucyB7Ym9vbGVhbn1cbiAgICovXG4gIGhhcyhrZXk6IHN0cmluZyk6IGJvb2xlYW4ge1xuICAgIGlmICghdGhpcy5jYWNoZS5oYXMoa2V5KSkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cblxuICAgIC8vIFJlbW92ZSBjYWxsIGZvciBwZWVrLCBvbmNlIHJlbW92ZS9kZWxldGUgc3VwcG9ydCBpcyBhZGRlZCB1cHN0cmVhbVxuICAgIC8vIFJlZnM6IGh0dHBzOi8vZ2l0aHViLmNvbS9Zb21ndWl0aGVyZWFsL21uZW1vbmlzdC9pc3N1ZXMvMTQzXG4gICAgY29uc3QgZW5kcG9pbnRzID0gdGhpcy5jYWNoZS5wZWVrKGtleSk7XG4gICAgaWYgKCFlbmRwb2ludHMpIHtcbiAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG4gICAgcmV0dXJuIGVuZHBvaW50cy5sZW5ndGggPiAwO1xuICB9XG5cbiAgLyoqXG4gICAqIENsZWFycyB0aGUgY2FjaGUuXG4gICAqL1xuICBjbGVhcigpIHtcbiAgICB0aGlzLmNhY2hlLmNsZWFyKCk7XG4gIH1cbn1cbiJdfQ==
package/dist/es/index.js DELETED
@@ -1,3 +0,0 @@
1
- export * from "./Endpoint";
2
- export * from "./EndpointCache";
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxZQUFZLENBQUM7QUFDM0IsY0FBYyxpQkFBaUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gXCIuL0VuZHBvaW50XCI7XG5leHBvcnQgKiBmcm9tIFwiLi9FbmRwb2ludENhY2hlXCI7XG4iXX0=
@@ -1 +0,0 @@
1
- {"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","../src/Endpoint.ts","../../../node_modules/mnemonist/utils/types.d.ts","../../../node_modules/mnemonist/lru-cache.d.ts","../src/EndpointCache.ts","../src/index.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/ts3.6/base.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/base.d.ts","../node_modules/@types/node/index.d.ts","../../../node_modules/@babel/types/lib/index.d.ts","../../../node_modules/@types/babel__generator/index.d.ts","../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../node_modules/@types/babel__template/index.d.ts","../../../node_modules/@types/babel__traverse/index.d.ts","../../../node_modules/@types/babel__core/index.d.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@types/chai-as-promised/index.d.ts","../../../node_modules/@types/fs-extra/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/glob/index.d.ts","../../../node_modules/@types/graceful-fs/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../node_modules/jest-diff/build/types.d.ts","../../../node_modules/jest-diff/build/diffLines.d.ts","../../../node_modules/jest-diff/build/printDiffs.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/pretty-format/build/types.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/minimist/index.d.ts","../../../node_modules/@types/normalize-package-data/index.d.ts","../../../node_modules/@types/parse-json/index.d.ts","../../../node_modules/@types/prettier/index.d.ts","../../../node_modules/@types/stack-utils/index.d.ts","../../../node_modules/@types/uuid/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts","../../../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"12f4cfe2fe60b810c3174537bc2ddb20c1067b7768643d12cb1266fd183afb75","01df1e9fd99f179b6102c678ef1880f069a06ae3705012ccb17ff7786f4ccb75","4380c06c8d36e963c74636ccc3f5f18dca333f52224e8bd8d57175670b021211","e22fe5283f65c62cfab32e9cb8986dd8792a9044bc5d7dc4f49ea6c3c1ea7cde","7445122dcbe668336004a4c47cf8edbc31f351609d076f2ee636d7f6e6137d6c","360133226431f8678b893d4d8f599b7d7edae4f07c8f5548964f5f2f4140fb68",{"version":"fb928b21f5a16a1d64a8e2e74a3f389ace89da74820f070f893221213c50aa3c","affectsGlobalScope":true},"28693f9faf04685464c86683696587e65798fea6c12d9131eae4eaf49a0e5ac7","fe892fea1e75a442fffb4a604d7eeb451e858787a9f2f01c4e83bf12a3b5048d","d5c80b931928fbd06f967ce4bdca24fbb37523773ac2c7c87458a689154351fb","fcd718b2feb2820a9844536a1a2fbc77a3da90820e02894d40f879a789f46560","525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d","ece75b9bfc916f9ccc4e8a9ddee1dda5c987804fbe3b60a01fc120fae731c2ce","4e146a0b69c893ae1538aff8b76f4e8796755bdd45050a83099348d59863437e","a1dc9cfe8be39cbcef62692510b450ab35553ef39382715c88763d0c477704a9","05e732266b5a36789fd9eb846b1f45fec1b6e318b740e3f20fc22fd95f9ebf31","985c3d1b62a4a4f563e3ca3e3a47717cff7d82c81883d62ecf08d8417eb477c4","8059976d7f408e08be353de1833172139bbaa70fc33d01b98249f7226c122119","1733741cf2adc5926ac58c66004268cdc3d34b2ff6250f5114db14253ea02ce1","df18df925483862e8ff216d7b17e50b7311a3add2fb7feb128d321ec099352ca","b6b09f944889a23f19eba6e0f112030e55160c5e1a225012ab2349c582ba5595","152af7c23ec219f632afa2d861abc65993f56cd39a4f3a4018515dbc05950a74","3a0bdc4c5b6f84a1abb5356d7a7fa1f96ac6c5b5646eec3ef2b33c1ed095e155","03394bf8deb8781b490ae9266a843fbdf00647947d79e25fcbf1d89a9e9c8a66","56a15cc211894d79aa44cbb46c276bfd3f10458a61bff2dec99114db8a7e71e3","1a5366b0d4d0153955fd85777c72d35979dabc0537649da6eade09007c0d080a","61c84c3b0eb6e60196d15ae5e21793a1d4241c547f0bdd0529ffae838d1a073c","272522db288a7e03f14ff930407b776357082efce20369ea42239a57af9c7f81","3a8848a9c307429b861402cc69bc472ffe0c05b86474fc158723169161e16389","3f6a1fd73c9dc3bd7f4b79bc075297ca6527904df69b0f2c2c94e4c4c7d9a32c","8969e0b4d22ca77ad011c8fc4a25ec5d515bdfae4ecbd22608ed0d5c38829c1e","b2fe368abdc803b82d27bd27f168d106804422ade198c3c085e2519b195ebd26","0811662f95fabfc05b8f1cefcc46b351092cfc7d2a3e849475c51e2578c5c485","8e2f9031210a8fc27af8844bf69f964307d6013c90336bea9fb5d6ba43248c78","17e157df6125098a1a34eb4d201ee4ac03bbe97e471ab5627bb2c40fce555948","b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9","4bdb7b15b3f9a3ee0b856c7b991d0e522f8ce92f7b66ae8ac00e61d1269dd10a","978aecd2e6bc2ac094e9a35eda98ff8586713857b3655e7c98ca5ed8f7d50662","a185b8e0d7a4ae078a79339d63e98177813aac39256f69f788eaf5c360aa756f","c6b71a0585467900820167370738cfc256e9635471725a7ba1d24a3a262984e5","8bf10278b5c28698a73f800fde911bcc33d405a15f7bddab1c4ade637b69a822","e880a08fbb0d9ee2f733f9183f4d1bdb75bc9e0e64060a8a1fc30540791fcded","3cb4cbade80dde6e045b01d34582625ea45fc2f1080085ef671cefbc9c75625d","69fc4a10650eff3416ba5c2f7ce71744734928a7135ebe5a63c61d2d03ca3ec3","13918848c4e07d1094164112bd7fd151d61cbb949ceef340a2a4595cd609afb6","9af6a9de7bd818e68c4236f20027ff4b19387c2269a6952945d1a716c177cc4d","3497438242251378cf232f36a7fabac70e7bd8229d68dac8955534e63ffc8ff4","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","f6f04f1c31ff0314a67d7911e49a60e76cd5fc4e50c6374e506cb85916fadec9","b668b7fb7c52a05fb9233a27ba5099a73cd8e157b037d67399336635495ab483","b25c5f2970d06c729f464c0aeaa64b1a5b5f1355aa93554bb5f9c199b8624b1e","069733dc220affbe58d9c1d1a93af3707bc515aaed761701d8741b57da4cb964","3051751533eee92572241b3cef28333212401408c4e7aa21718714b793c0f4ed","691aea9772797ca98334eb743e7686e29325b02c6931391bcee4cc7bf27a9f3b","6f1d39d26959517da3bd105c552eded4c34702705c64d75b03f54d864b6e41c2",{"version":"e9cf450600c496a87ab96d288157b79be6c193e8623bd93553d5d64755940dea","affectsGlobalScope":true},{"version":"c8a2f72f046b5efb790cc37cfe79dcf11ce8e35e7e7d9430e10e53e0aa05c7a2","affectsGlobalScope":true},"5171627120eeb3a7e8afb8ed04ea9be7f0b53ba09bb1fc95172483e0fbb0740c","95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2","393137c76bd922ba70a2f8bf1ade4f59a16171a02fb25918c168d48875b0cfb0","3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","905c3e8f7ddaa6c391b60c05b2f4c3931d7127ad717a080359db3df510b7bdab","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9","62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"ce2169125f42515a26fa60977b6d56ae407f3462e28832fbf6a9013f6a828bab","affectsGlobalScope":true},"0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88","c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","08b428a44bc98005536a12456518797e9afe2a08e8b5d9785641713a54475881","c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57","96b49a9de749afcf92b5bce1d8cc42cfae6816cdf5ea36584fd9256b8b2e5292","3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f","5a2a25feca554a8f289ed62114771b8c63d89f2b58325e2f8b7043e4e0160d11","3845d3b64286c12c60d39fc90ac1cc5e47cbc951530658d2567d578b2faa1f26"],"options":{"downlevelIteration":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSourceMap":true,"inlineSources":true,"module":1,"noEmitHelpers":true,"noFallthroughCasesInSwitch":true,"noUnusedParameters":false,"outDir":"./cjs","preserveConstEnums":true,"removeComments":true,"rootDir":"../src","sourceMap":false,"strict":true,"target":5},"fileIdsList":[[78],[78,79,80,81,82],[78,80],[84],[47,77],[46,77,87],[90],[91],[97,99],[108],[46,62,77],[93,94],[93,94,95,96],[31],[98],[74,75],[46,53,62],[38,46,53],[62],[44,46,53],[46],[46,62,68],[46,53,62,68],[46,47,48,53,62,65,68],[46,48,65,68],[74,76],[44,46,62],[36],[46,62],[60,69,71],[42,44,53,62],[35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],[53],[59],[29],[29,30,32],[29,30,33]],"referencedMap":[[80,1],[83,2],[79,1],[81,3],[82,1],[85,4],[86,5],[88,6],[89,5],[91,7],[92,8],[100,9],[109,10],[110,11],[95,12],[97,13],[96,12],[32,14],[99,15],[76,16],[38,17],[39,18],[42,19],[43,20],[45,21],[46,21],[47,22],[48,23],[49,24],[50,25],[77,26],[51,21],[53,27],[56,28],[60,29],[61,30],[62,21],[65,31],[74,32],[67,33],[68,34],[72,29],[73,19],[30,35],[33,36],[34,37]],"exportedModulesMap":[[80,1],[83,2],[79,1],[81,3],[82,1],[85,4],[86,5],[88,6],[89,5],[91,7],[92,8],[100,9],[109,10],[110,11],[95,12],[97,13],[96,12],[32,14],[99,15],[76,16],[38,17],[39,18],[42,19],[43,20],[45,21],[46,21],[47,22],[48,23],[49,24],[50,25],[77,26],[51,21],[53,27],[56,28],[60,29],[61,30],[62,21],[65,31],[74,32],[67,33],[68,34],[72,29],[73,19],[30,35],[33,36],[34,37]],"semanticDiagnosticsPerFile":[80,78,83,79,81,82,85,84,86,88,89,90,91,92,100,101,87,102,103,104,105,106,107,108,109,110,93,95,97,96,94,32,31,99,98,29,6,8,7,2,9,10,11,12,13,14,15,16,3,4,20,17,18,19,21,22,23,5,24,25,26,27,1,28,75,36,76,37,38,39,40,41,42,43,44,45,46,47,35,48,49,50,77,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,74,67,68,69,70,71,72,73,30,33,34]},"version":"4.3.5"}
@@ -1 +0,0 @@
1
- {"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","../src/Endpoint.ts","../../../node_modules/mnemonist/utils/types.d.ts","../../../node_modules/mnemonist/lru-cache.d.ts","../src/EndpointCache.ts","../src/index.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/ts3.6/base.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/base.d.ts","../node_modules/@types/node/index.d.ts","../../../node_modules/@babel/types/lib/index.d.ts","../../../node_modules/@types/babel__generator/index.d.ts","../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../node_modules/@types/babel__template/index.d.ts","../../../node_modules/@types/babel__traverse/index.d.ts","../../../node_modules/@types/babel__core/index.d.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@types/chai-as-promised/index.d.ts","../../../node_modules/@types/fs-extra/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/glob/index.d.ts","../../../node_modules/@types/graceful-fs/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../node_modules/jest-diff/build/types.d.ts","../../../node_modules/jest-diff/build/diffLines.d.ts","../../../node_modules/jest-diff/build/printDiffs.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/pretty-format/build/types.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/minimist/index.d.ts","../../../node_modules/@types/normalize-package-data/index.d.ts","../../../node_modules/@types/parse-json/index.d.ts","../../../node_modules/@types/prettier/index.d.ts","../../../node_modules/@types/stack-utils/index.d.ts","../../../node_modules/@types/uuid/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts","../../../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"12f4cfe2fe60b810c3174537bc2ddb20c1067b7768643d12cb1266fd183afb75","01df1e9fd99f179b6102c678ef1880f069a06ae3705012ccb17ff7786f4ccb75","4380c06c8d36e963c74636ccc3f5f18dca333f52224e8bd8d57175670b021211","e22fe5283f65c62cfab32e9cb8986dd8792a9044bc5d7dc4f49ea6c3c1ea7cde","7445122dcbe668336004a4c47cf8edbc31f351609d076f2ee636d7f6e6137d6c","360133226431f8678b893d4d8f599b7d7edae4f07c8f5548964f5f2f4140fb68",{"version":"fb928b21f5a16a1d64a8e2e74a3f389ace89da74820f070f893221213c50aa3c","affectsGlobalScope":true},"28693f9faf04685464c86683696587e65798fea6c12d9131eae4eaf49a0e5ac7","fe892fea1e75a442fffb4a604d7eeb451e858787a9f2f01c4e83bf12a3b5048d","d5c80b931928fbd06f967ce4bdca24fbb37523773ac2c7c87458a689154351fb","fcd718b2feb2820a9844536a1a2fbc77a3da90820e02894d40f879a789f46560","525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d","ece75b9bfc916f9ccc4e8a9ddee1dda5c987804fbe3b60a01fc120fae731c2ce","4e146a0b69c893ae1538aff8b76f4e8796755bdd45050a83099348d59863437e","a1dc9cfe8be39cbcef62692510b450ab35553ef39382715c88763d0c477704a9","05e732266b5a36789fd9eb846b1f45fec1b6e318b740e3f20fc22fd95f9ebf31","985c3d1b62a4a4f563e3ca3e3a47717cff7d82c81883d62ecf08d8417eb477c4","8059976d7f408e08be353de1833172139bbaa70fc33d01b98249f7226c122119","1733741cf2adc5926ac58c66004268cdc3d34b2ff6250f5114db14253ea02ce1","df18df925483862e8ff216d7b17e50b7311a3add2fb7feb128d321ec099352ca","b6b09f944889a23f19eba6e0f112030e55160c5e1a225012ab2349c582ba5595","152af7c23ec219f632afa2d861abc65993f56cd39a4f3a4018515dbc05950a74","3a0bdc4c5b6f84a1abb5356d7a7fa1f96ac6c5b5646eec3ef2b33c1ed095e155","03394bf8deb8781b490ae9266a843fbdf00647947d79e25fcbf1d89a9e9c8a66","56a15cc211894d79aa44cbb46c276bfd3f10458a61bff2dec99114db8a7e71e3","1a5366b0d4d0153955fd85777c72d35979dabc0537649da6eade09007c0d080a","61c84c3b0eb6e60196d15ae5e21793a1d4241c547f0bdd0529ffae838d1a073c","272522db288a7e03f14ff930407b776357082efce20369ea42239a57af9c7f81","3a8848a9c307429b861402cc69bc472ffe0c05b86474fc158723169161e16389","3f6a1fd73c9dc3bd7f4b79bc075297ca6527904df69b0f2c2c94e4c4c7d9a32c","8969e0b4d22ca77ad011c8fc4a25ec5d515bdfae4ecbd22608ed0d5c38829c1e","b2fe368abdc803b82d27bd27f168d106804422ade198c3c085e2519b195ebd26","0811662f95fabfc05b8f1cefcc46b351092cfc7d2a3e849475c51e2578c5c485","8e2f9031210a8fc27af8844bf69f964307d6013c90336bea9fb5d6ba43248c78","17e157df6125098a1a34eb4d201ee4ac03bbe97e471ab5627bb2c40fce555948","b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9","4bdb7b15b3f9a3ee0b856c7b991d0e522f8ce92f7b66ae8ac00e61d1269dd10a","978aecd2e6bc2ac094e9a35eda98ff8586713857b3655e7c98ca5ed8f7d50662","a185b8e0d7a4ae078a79339d63e98177813aac39256f69f788eaf5c360aa756f","c6b71a0585467900820167370738cfc256e9635471725a7ba1d24a3a262984e5","8bf10278b5c28698a73f800fde911bcc33d405a15f7bddab1c4ade637b69a822","e880a08fbb0d9ee2f733f9183f4d1bdb75bc9e0e64060a8a1fc30540791fcded","3cb4cbade80dde6e045b01d34582625ea45fc2f1080085ef671cefbc9c75625d","69fc4a10650eff3416ba5c2f7ce71744734928a7135ebe5a63c61d2d03ca3ec3","13918848c4e07d1094164112bd7fd151d61cbb949ceef340a2a4595cd609afb6","9af6a9de7bd818e68c4236f20027ff4b19387c2269a6952945d1a716c177cc4d","3497438242251378cf232f36a7fabac70e7bd8229d68dac8955534e63ffc8ff4","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","f6f04f1c31ff0314a67d7911e49a60e76cd5fc4e50c6374e506cb85916fadec9","b668b7fb7c52a05fb9233a27ba5099a73cd8e157b037d67399336635495ab483","b25c5f2970d06c729f464c0aeaa64b1a5b5f1355aa93554bb5f9c199b8624b1e","069733dc220affbe58d9c1d1a93af3707bc515aaed761701d8741b57da4cb964","3051751533eee92572241b3cef28333212401408c4e7aa21718714b793c0f4ed","691aea9772797ca98334eb743e7686e29325b02c6931391bcee4cc7bf27a9f3b","6f1d39d26959517da3bd105c552eded4c34702705c64d75b03f54d864b6e41c2",{"version":"e9cf450600c496a87ab96d288157b79be6c193e8623bd93553d5d64755940dea","affectsGlobalScope":true},{"version":"c8a2f72f046b5efb790cc37cfe79dcf11ce8e35e7e7d9430e10e53e0aa05c7a2","affectsGlobalScope":true},"5171627120eeb3a7e8afb8ed04ea9be7f0b53ba09bb1fc95172483e0fbb0740c","95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2","393137c76bd922ba70a2f8bf1ade4f59a16171a02fb25918c168d48875b0cfb0","3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","905c3e8f7ddaa6c391b60c05b2f4c3931d7127ad717a080359db3df510b7bdab","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9","62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"ce2169125f42515a26fa60977b6d56ae407f3462e28832fbf6a9013f6a828bab","affectsGlobalScope":true},"0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88","c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","08b428a44bc98005536a12456518797e9afe2a08e8b5d9785641713a54475881","c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57","96b49a9de749afcf92b5bce1d8cc42cfae6816cdf5ea36584fd9256b8b2e5292","3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f","5a2a25feca554a8f289ed62114771b8c63d89f2b58325e2f8b7043e4e0160d11","3845d3b64286c12c60d39fc90ac1cc5e47cbc951530658d2567d578b2faa1f26"],"options":{"downlevelIteration":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSourceMap":true,"inlineSources":true,"module":99,"noEmitHelpers":true,"noFallthroughCasesInSwitch":true,"noUnusedParameters":false,"outDir":"./es","preserveConstEnums":true,"removeComments":false,"rootDir":"../src","sourceMap":false,"strict":true,"target":1},"fileIdsList":[[77],[77,78,79,80,81],[77,79],[83],[46,76],[45,76,86],[89],[90],[96,98],[107],[45,61,76],[92,93],[92,93,94,95],[30],[97],[73,74],[45,52,61],[37,45,52],[61],[43,45,52],[45],[45,61,67],[45,52,61,67],[45,46,47,52,61,64,67],[45,47,64,67],[73,75],[43,45,61],[35],[45,61],[59,68,70],[41,43,52,61],[34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72],[52],[58],[28],[28,29,31],[28,29,32]],"referencedMap":[[79,1],[82,2],[78,1],[80,3],[81,1],[84,4],[85,5],[87,6],[88,5],[90,7],[91,8],[99,9],[108,10],[109,11],[94,12],[96,13],[95,12],[31,14],[98,15],[75,16],[37,17],[38,18],[41,19],[42,20],[44,21],[45,21],[46,22],[47,23],[48,24],[49,25],[76,26],[50,21],[52,27],[55,28],[59,29],[60,30],[61,21],[64,31],[73,32],[66,33],[67,34],[71,29],[72,19],[29,35],[32,36],[33,37]],"exportedModulesMap":[[79,1],[82,2],[78,1],[80,3],[81,1],[84,4],[85,5],[87,6],[88,5],[90,7],[91,8],[99,9],[108,10],[109,11],[94,12],[96,13],[95,12],[31,14],[98,15],[75,16],[37,17],[38,18],[41,19],[42,20],[44,21],[45,21],[46,22],[47,23],[48,24],[49,25],[76,26],[50,21],[52,27],[55,28],[59,29],[60,30],[61,21],[64,31],[73,32],[66,33],[67,34],[71,29],[72,19],[29,35],[32,36],[33,37]],"semanticDiagnosticsPerFile":[79,77,82,78,80,81,84,83,85,87,88,89,90,91,99,100,86,101,102,103,104,105,106,107,108,109,92,94,96,95,93,31,30,98,97,28,7,6,2,8,9,10,11,12,13,14,15,3,4,19,16,17,18,20,21,22,5,23,24,25,26,1,27,74,35,75,36,37,38,39,40,41,42,43,44,45,46,34,47,48,49,76,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,73,66,67,68,69,70,71,72,29,32,33]},"version":"4.3.5"}
@@ -1,10 +0,0 @@
1
- export interface Endpoint {
2
- /**
3
- * <p>An endpoint address.</p>
4
- */
5
- Address: string;
6
- /**
7
- * <p>The TTL for the endpoint, in minutes.</p>
8
- */
9
- CachePeriodInMinutes: number;
10
- }
@@ -1,50 +0,0 @@
1
- import { Endpoint } from "./Endpoint";
2
- export interface EndpointWithExpiry extends Pick<Endpoint, "Address"> {
3
- Expires: number;
4
- }
5
- export declare class EndpointCache {
6
- private readonly cache;
7
- constructor(capacity: number);
8
- /**
9
- * Returns an un-expired endpoint for the given key.
10
- *
11
- * @param endpointsWithExpiry
12
- * @returns
13
- */
14
- getEndpoint(key: string): string | undefined;
15
- /**
16
- * Returns un-expired endpoints for the given key.
17
- *
18
- * @param key
19
- * @returns
20
- */
21
- get(key: string): EndpointWithExpiry[] | undefined;
22
- /**
23
- * Stores the endpoints passed for the key in cache.
24
- * If not defined, uses empty string for the Address in endpoint.
25
- * If not defined, uses one minute for CachePeriodInMinutes in endpoint.
26
- * Stores milliseconds elapsed since the UNIX epoch in Expires param based
27
- * on value provided in CachePeriodInMinutes.
28
- *
29
- * @param key
30
- * @param endpoints
31
- */
32
- set(key: string, endpoints: Endpoint[]): void;
33
- /**
34
- * Deletes the value for the given key in the cache.
35
- *
36
- * @param {string} key
37
- */
38
- delete(key: string): void;
39
- /**
40
- * Checks whether the key exists in cache.
41
- *
42
- * @param {string} key
43
- * @returns {boolean}
44
- */
45
- has(key: string): boolean;
46
- /**
47
- * Clears the cache.
48
- */
49
- clear(): void;
50
- }
package/jest.config.js DELETED
@@ -1,5 +0,0 @@
1
- const base = require("../../jest.config.base.js");
2
-
3
- module.exports = {
4
- ...base,
5
- };
package/src/Endpoint.ts DELETED
@@ -1,11 +0,0 @@
1
- export interface Endpoint {
2
- /**
3
- * <p>An endpoint address.</p>
4
- */
5
- Address: string;
6
-
7
- /**
8
- * <p>The TTL for the endpoint, in minutes.</p>
9
- */
10
- CachePeriodInMinutes: number;
11
- }
@@ -1,194 +0,0 @@
1
- import LRUCache from "mnemonist/lru-cache";
2
-
3
- import { Endpoint } from "./Endpoint";
4
- import { EndpointCache } from "./EndpointCache";
5
-
6
- jest.mock("mnemonist/lru-cache");
7
-
8
- describe(EndpointCache.name, () => {
9
- let endpointCache;
10
- const capacity = 100;
11
- const key = "key";
12
-
13
- const now = Date.now();
14
- const set = jest.fn();
15
- const get = jest.fn();
16
- const peek = jest.fn();
17
- const has = jest.fn();
18
- const clear = jest.fn();
19
-
20
- const mockEndpoints = [
21
- { Address: "addressA", CachePeriodInMinutes: 1 },
22
- { Address: "addressB", CachePeriodInMinutes: 2 },
23
- ];
24
-
25
- const getEndpointsWithExpiry = (endpoints: Endpoint[]) =>
26
- endpoints.map(({ Address = "", CachePeriodInMinutes = 1 }) => ({
27
- Address,
28
- Expires: now + CachePeriodInMinutes * 60 * 1000,
29
- }));
30
-
31
- const getMaxCachePeriodInMins = (endpoints: Endpoint[]) =>
32
- Math.max(...endpoints.map((endpoint) => endpoint.CachePeriodInMinutes));
33
-
34
- beforeEach(() => {
35
- (LRUCache as unknown as jest.Mock).mockReturnValueOnce({
36
- set,
37
- get,
38
- peek,
39
- has,
40
- clear,
41
- });
42
- endpointCache = new EndpointCache(capacity);
43
- });
44
-
45
- afterEach(() => {
46
- jest.clearAllMocks();
47
- });
48
-
49
- it("passes capacity to LRUCache", () => {
50
- expect(LRUCache).toHaveBeenCalledTimes(1);
51
- expect(LRUCache).toHaveBeenCalledWith(capacity);
52
- });
53
-
54
- describe("get", () => {
55
- beforeEach(() => {
56
- has.mockReturnValue(true);
57
- const endpointsWithExpiry = getEndpointsWithExpiry(mockEndpoints);
58
- peek.mockReturnValue(endpointsWithExpiry);
59
- get.mockReturnValue(endpointsWithExpiry);
60
- jest.spyOn(Date, "now").mockImplementation(() => now);
61
- });
62
-
63
- const verifyHasAndGetCalls = () => {
64
- expect(has).toHaveBeenCalledTimes(1);
65
- expect(has).toHaveBeenCalledWith(key);
66
- expect(get).toHaveBeenCalledTimes(1);
67
- expect(get).toHaveBeenCalledWith(key);
68
- };
69
-
70
- it("returns undefined if cache doesn't have key", () => {
71
- has.mockReturnValueOnce(false);
72
- expect(endpointCache.get(key)).toBeUndefined();
73
- expect(has).toHaveBeenCalledTimes(1);
74
- expect(has).toHaveBeenCalledWith(key);
75
- expect(peek).not.toHaveBeenCalled();
76
- expect(get).not.toHaveBeenCalled();
77
- });
78
-
79
- it("returns undefined if cache has empty array", () => {
80
- has.mockReturnValueOnce(true);
81
- peek.mockReturnValueOnce([]);
82
- expect(endpointCache.get(key)).toBeUndefined();
83
- expect(has).toHaveBeenCalledTimes(1);
84
- expect(has).toHaveBeenCalledWith(key);
85
- expect(peek).toHaveBeenCalledTimes(1);
86
- expect(peek).toHaveBeenCalledWith(key);
87
- expect(get).not.toHaveBeenCalled();
88
- });
89
-
90
- it("returns undefined if cache returns undefined for key", () => {
91
- get.mockReturnValueOnce(undefined);
92
- expect(endpointCache.get(key)).toBeUndefined();
93
- verifyHasAndGetCalls();
94
- expect(set).not.toHaveBeenCalled();
95
- });
96
-
97
- it("returns undefined if endpoints have expired", () => {
98
- const maxCachePeriod = getMaxCachePeriodInMins(mockEndpoints);
99
- jest.spyOn(Date, "now").mockImplementation(() => now + (maxCachePeriod + 1) * 60 * 1000);
100
- expect(endpointCache.get(key)).toBeUndefined();
101
- verifyHasAndGetCalls();
102
- expect(set).toHaveBeenCalledTimes(1);
103
- expect(set).toHaveBeenCalledWith(key, []);
104
- });
105
-
106
- describe("getEndpoint", () => {
107
- it("returns one of the un-expired endpoints", () => {
108
- expect(mockEndpoints.map((endpoint) => endpoint.Address)).toContain(endpointCache.getEndpoint(key));
109
- verifyHasAndGetCalls();
110
- expect(set).not.toHaveBeenCalled();
111
- });
112
-
113
- it("returns un-expired endpoint", () => {
114
- jest.spyOn(Date, "now").mockImplementation(() => now + 90 * 1000);
115
- expect(endpointCache.getEndpoint(key)).toEqual(mockEndpoints[1].Address);
116
- verifyHasAndGetCalls();
117
- expect(set).not.toHaveBeenCalled();
118
- });
119
-
120
- [0, 1].forEach((index) => {
121
- it(`returns un-expired endpoint at index ${index}`, () => {
122
- jest.spyOn(Math, "floor").mockImplementation(() => index);
123
- expect(mockEndpoints.map((endpoint) => endpoint.Address)).toContain(endpointCache.getEndpoint(key));
124
- verifyHasAndGetCalls();
125
- expect(set).not.toHaveBeenCalled();
126
- });
127
- });
128
- });
129
- });
130
-
131
- describe("set", () => {
132
- beforeEach(() => {
133
- jest.spyOn(Date, "now").mockImplementation(() => now);
134
- });
135
-
136
- it("converts CachePeriodInMinutes to Expires before caching", () => {
137
- endpointCache.set(key, mockEndpoints);
138
- expect(set).toHaveBeenCalledTimes(1);
139
- expect(set).toHaveBeenCalledWith(
140
- key,
141
- mockEndpoints.map(({ Address, CachePeriodInMinutes }) => ({
142
- Address,
143
- Expires: now + CachePeriodInMinutes * 60 * 1000,
144
- }))
145
- );
146
- });
147
- });
148
-
149
- it("delete", () => {
150
- endpointCache.delete(key);
151
- expect(set).toHaveBeenCalledTimes(1);
152
- expect(set).toHaveBeenCalledWith(key, []);
153
- });
154
-
155
- describe("has", () => {
156
- describe("returns false", () => {
157
- it("when key is not present", () => {
158
- has.mockReturnValueOnce(false);
159
- expect(endpointCache.has(key)).toEqual(false);
160
- expect(has).toHaveBeenCalledTimes(1);
161
- expect(has).toHaveBeenCalledWith(key);
162
- });
163
-
164
- it("when key is present and value is empty", () => {
165
- has.mockReturnValueOnce(true);
166
- peek.mockReturnValueOnce([]);
167
- expect(endpointCache.has(key)).toEqual(false);
168
- expect(has).toHaveBeenCalledTimes(1);
169
- expect(has).toHaveBeenCalledWith(key);
170
- });
171
-
172
- it("when key is present and value is undefined", () => {
173
- has.mockReturnValueOnce(true);
174
- peek.mockReturnValueOnce(undefined);
175
- expect(endpointCache.has(key)).toEqual(false);
176
- expect(has).toHaveBeenCalledTimes(1);
177
- expect(has).toHaveBeenCalledWith(key);
178
- });
179
- });
180
-
181
- it("returns true when key is present and value is non-empty", () => {
182
- has.mockReturnValueOnce(true);
183
- peek.mockReturnValueOnce(getEndpointsWithExpiry(mockEndpoints));
184
- expect(endpointCache.has(key)).toEqual(true);
185
- expect(has).toHaveBeenCalledTimes(1);
186
- expect(has).toHaveBeenCalledWith(key);
187
- });
188
- });
189
-
190
- it("clear", () => {
191
- endpointCache.clear();
192
- expect(clear).toHaveBeenCalledTimes(1);
193
- });
194
- });
@@ -1,115 +0,0 @@
1
- import LRUCache from "mnemonist/lru-cache";
2
-
3
- import { Endpoint } from "./Endpoint";
4
-
5
- export interface EndpointWithExpiry extends Pick<Endpoint, "Address"> {
6
- Expires: number;
7
- }
8
-
9
- export class EndpointCache {
10
- private readonly cache: LRUCache<string, EndpointWithExpiry[]>;
11
-
12
- constructor(capacity: number) {
13
- this.cache = new LRUCache(capacity);
14
- }
15
-
16
- /**
17
- * Returns an un-expired endpoint for the given key.
18
- *
19
- * @param endpointsWithExpiry
20
- * @returns
21
- */
22
- getEndpoint(key: string) {
23
- const endpointsWithExpiry = this.get(key);
24
- if (!endpointsWithExpiry || endpointsWithExpiry.length === 0) {
25
- return undefined;
26
- }
27
- const endpoints = endpointsWithExpiry.map((endpoint) => endpoint.Address);
28
- return endpoints[Math.floor(Math.random() * endpoints.length)];
29
- }
30
-
31
- /**
32
- * Returns un-expired endpoints for the given key.
33
- *
34
- * @param key
35
- * @returns
36
- */
37
- get(key: string) {
38
- if (!this.has(key)) {
39
- return;
40
- }
41
-
42
- const value = this.cache.get(key);
43
- if (!value) {
44
- return;
45
- }
46
-
47
- const now = Date.now();
48
- const endpointsWithExpiry = value.filter((endpoint) => now < endpoint.Expires);
49
- if (endpointsWithExpiry.length === 0) {
50
- this.delete(key);
51
- return undefined;
52
- }
53
-
54
- return endpointsWithExpiry;
55
- }
56
-
57
- /**
58
- * Stores the endpoints passed for the key in cache.
59
- * If not defined, uses empty string for the Address in endpoint.
60
- * If not defined, uses one minute for CachePeriodInMinutes in endpoint.
61
- * Stores milliseconds elapsed since the UNIX epoch in Expires param based
62
- * on value provided in CachePeriodInMinutes.
63
- *
64
- * @param key
65
- * @param endpoints
66
- */
67
- set(key: string, endpoints: Endpoint[]) {
68
- const now = Date.now();
69
- this.cache.set(
70
- key,
71
- endpoints.map(({ Address, CachePeriodInMinutes }) => ({
72
- Address,
73
- Expires: now + CachePeriodInMinutes * 60 * 1000,
74
- }))
75
- );
76
- }
77
-
78
- /**
79
- * Deletes the value for the given key in the cache.
80
- *
81
- * @param {string} key
82
- */
83
- delete(key: string) {
84
- // Replace with remove/delete call once support is added upstream
85
- // Refs: https://github.com/Yomguithereal/mnemonist/issues/143
86
- this.cache.set(key, []);
87
- }
88
-
89
- /**
90
- * Checks whether the key exists in cache.
91
- *
92
- * @param {string} key
93
- * @returns {boolean}
94
- */
95
- has(key: string): boolean {
96
- if (!this.cache.has(key)) {
97
- return false;
98
- }
99
-
100
- // Remove call for peek, once remove/delete support is added upstream
101
- // Refs: https://github.com/Yomguithereal/mnemonist/issues/143
102
- const endpoints = this.cache.peek(key);
103
- if (!endpoints) {
104
- return false;
105
- }
106
- return endpoints.length > 0;
107
- }
108
-
109
- /**
110
- * Clears the cache.
111
- */
112
- clear() {
113
- this.cache.clear();
114
- }
115
- }
package/tsconfig.cjs.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "baseUrl": ".",
4
- "outDir": "dist/cjs",
5
- "rootDir": "src"
6
- },
7
- "extends": "../../tsconfig.cjs.json",
8
- "include": ["src/"]
9
- }
package/tsconfig.es.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "baseUrl": ".",
4
- "lib": ["es5", "es2015.promise", "es2015.iterable"],
5
- "outDir": "dist/es",
6
- "rootDir": "src"
7
- },
8
- "extends": "../../tsconfig.es.json",
9
- "include": ["src/"]
10
- }
@@ -1,9 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "baseUrl": ".",
4
- "declarationDir": "dist/types",
5
- "rootDir": "src"
6
- },
7
- "extends": "../../tsconfig.types.json",
8
- "include": ["src/"]
9
- }
@@ -1 +0,0 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","./src/Endpoint.ts","../../node_modules/mnemonist/utils/types.d.ts","../../node_modules/mnemonist/lru-cache.d.ts","./src/EndpointCache.ts","./src/index.ts","./node_modules/@types/node/globals.d.ts","./node_modules/@types/node/async_hooks.d.ts","./node_modules/@types/node/buffer.d.ts","./node_modules/@types/node/child_process.d.ts","./node_modules/@types/node/cluster.d.ts","./node_modules/@types/node/console.d.ts","./node_modules/@types/node/constants.d.ts","./node_modules/@types/node/crypto.d.ts","./node_modules/@types/node/dgram.d.ts","./node_modules/@types/node/dns.d.ts","./node_modules/@types/node/domain.d.ts","./node_modules/@types/node/events.d.ts","./node_modules/@types/node/fs.d.ts","./node_modules/@types/node/http.d.ts","./node_modules/@types/node/http2.d.ts","./node_modules/@types/node/https.d.ts","./node_modules/@types/node/inspector.d.ts","./node_modules/@types/node/module.d.ts","./node_modules/@types/node/net.d.ts","./node_modules/@types/node/os.d.ts","./node_modules/@types/node/path.d.ts","./node_modules/@types/node/perf_hooks.d.ts","./node_modules/@types/node/process.d.ts","./node_modules/@types/node/punycode.d.ts","./node_modules/@types/node/querystring.d.ts","./node_modules/@types/node/readline.d.ts","./node_modules/@types/node/repl.d.ts","./node_modules/@types/node/stream.d.ts","./node_modules/@types/node/string_decoder.d.ts","./node_modules/@types/node/timers.d.ts","./node_modules/@types/node/tls.d.ts","./node_modules/@types/node/trace_events.d.ts","./node_modules/@types/node/tty.d.ts","./node_modules/@types/node/url.d.ts","./node_modules/@types/node/util.d.ts","./node_modules/@types/node/v8.d.ts","./node_modules/@types/node/vm.d.ts","./node_modules/@types/node/worker_threads.d.ts","./node_modules/@types/node/zlib.d.ts","./node_modules/@types/node/ts3.6/base.d.ts","./node_modules/@types/node/assert.d.ts","./node_modules/@types/node/base.d.ts","./node_modules/@types/node/index.d.ts","../../node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/chai/index.d.ts","../../node_modules/@types/chai-as-promised/index.d.ts","../../node_modules/@types/fs-extra/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/jest-diff/build/cleanupSemantic.d.ts","../../node_modules/jest-diff/build/types.d.ts","../../node_modules/jest-diff/build/diffLines.d.ts","../../node_modules/jest-diff/build/printDiffs.d.ts","../../node_modules/jest-diff/build/index.d.ts","../../node_modules/pretty-format/build/types.d.ts","../../node_modules/pretty-format/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/normalize-package-data/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/prettier/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/uuid/index.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts","../../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"01df1e9fd99f179b6102c678ef1880f069a06ae3705012ccb17ff7786f4ccb75","4380c06c8d36e963c74636ccc3f5f18dca333f52224e8bd8d57175670b021211","e22fe5283f65c62cfab32e9cb8986dd8792a9044bc5d7dc4f49ea6c3c1ea7cde","7445122dcbe668336004a4c47cf8edbc31f351609d076f2ee636d7f6e6137d6c","360133226431f8678b893d4d8f599b7d7edae4f07c8f5548964f5f2f4140fb68",{"version":"fb928b21f5a16a1d64a8e2e74a3f389ace89da74820f070f893221213c50aa3c","affectsGlobalScope":true},"28693f9faf04685464c86683696587e65798fea6c12d9131eae4eaf49a0e5ac7","fe892fea1e75a442fffb4a604d7eeb451e858787a9f2f01c4e83bf12a3b5048d","d5c80b931928fbd06f967ce4bdca24fbb37523773ac2c7c87458a689154351fb","fcd718b2feb2820a9844536a1a2fbc77a3da90820e02894d40f879a789f46560","525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d","ece75b9bfc916f9ccc4e8a9ddee1dda5c987804fbe3b60a01fc120fae731c2ce","4e146a0b69c893ae1538aff8b76f4e8796755bdd45050a83099348d59863437e","a1dc9cfe8be39cbcef62692510b450ab35553ef39382715c88763d0c477704a9","05e732266b5a36789fd9eb846b1f45fec1b6e318b740e3f20fc22fd95f9ebf31","985c3d1b62a4a4f563e3ca3e3a47717cff7d82c81883d62ecf08d8417eb477c4","8059976d7f408e08be353de1833172139bbaa70fc33d01b98249f7226c122119","1733741cf2adc5926ac58c66004268cdc3d34b2ff6250f5114db14253ea02ce1","df18df925483862e8ff216d7b17e50b7311a3add2fb7feb128d321ec099352ca","b6b09f944889a23f19eba6e0f112030e55160c5e1a225012ab2349c582ba5595","152af7c23ec219f632afa2d861abc65993f56cd39a4f3a4018515dbc05950a74","3a0bdc4c5b6f84a1abb5356d7a7fa1f96ac6c5b5646eec3ef2b33c1ed095e155","03394bf8deb8781b490ae9266a843fbdf00647947d79e25fcbf1d89a9e9c8a66","56a15cc211894d79aa44cbb46c276bfd3f10458a61bff2dec99114db8a7e71e3","1a5366b0d4d0153955fd85777c72d35979dabc0537649da6eade09007c0d080a","61c84c3b0eb6e60196d15ae5e21793a1d4241c547f0bdd0529ffae838d1a073c","272522db288a7e03f14ff930407b776357082efce20369ea42239a57af9c7f81","3a8848a9c307429b861402cc69bc472ffe0c05b86474fc158723169161e16389","3f6a1fd73c9dc3bd7f4b79bc075297ca6527904df69b0f2c2c94e4c4c7d9a32c","8969e0b4d22ca77ad011c8fc4a25ec5d515bdfae4ecbd22608ed0d5c38829c1e","b2fe368abdc803b82d27bd27f168d106804422ade198c3c085e2519b195ebd26","0811662f95fabfc05b8f1cefcc46b351092cfc7d2a3e849475c51e2578c5c485","8e2f9031210a8fc27af8844bf69f964307d6013c90336bea9fb5d6ba43248c78","17e157df6125098a1a34eb4d201ee4ac03bbe97e471ab5627bb2c40fce555948","b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9","4bdb7b15b3f9a3ee0b856c7b991d0e522f8ce92f7b66ae8ac00e61d1269dd10a","978aecd2e6bc2ac094e9a35eda98ff8586713857b3655e7c98ca5ed8f7d50662","a185b8e0d7a4ae078a79339d63e98177813aac39256f69f788eaf5c360aa756f","c6b71a0585467900820167370738cfc256e9635471725a7ba1d24a3a262984e5","8bf10278b5c28698a73f800fde911bcc33d405a15f7bddab1c4ade637b69a822","e880a08fbb0d9ee2f733f9183f4d1bdb75bc9e0e64060a8a1fc30540791fcded","3cb4cbade80dde6e045b01d34582625ea45fc2f1080085ef671cefbc9c75625d","69fc4a10650eff3416ba5c2f7ce71744734928a7135ebe5a63c61d2d03ca3ec3","13918848c4e07d1094164112bd7fd151d61cbb949ceef340a2a4595cd609afb6","9af6a9de7bd818e68c4236f20027ff4b19387c2269a6952945d1a716c177cc4d","3497438242251378cf232f36a7fabac70e7bd8229d68dac8955534e63ffc8ff4","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","f6f04f1c31ff0314a67d7911e49a60e76cd5fc4e50c6374e506cb85916fadec9","b668b7fb7c52a05fb9233a27ba5099a73cd8e157b037d67399336635495ab483","b25c5f2970d06c729f464c0aeaa64b1a5b5f1355aa93554bb5f9c199b8624b1e","069733dc220affbe58d9c1d1a93af3707bc515aaed761701d8741b57da4cb964","3051751533eee92572241b3cef28333212401408c4e7aa21718714b793c0f4ed","691aea9772797ca98334eb743e7686e29325b02c6931391bcee4cc7bf27a9f3b","6f1d39d26959517da3bd105c552eded4c34702705c64d75b03f54d864b6e41c2",{"version":"e9cf450600c496a87ab96d288157b79be6c193e8623bd93553d5d64755940dea","affectsGlobalScope":true},{"version":"c8a2f72f046b5efb790cc37cfe79dcf11ce8e35e7e7d9430e10e53e0aa05c7a2","affectsGlobalScope":true},"5171627120eeb3a7e8afb8ed04ea9be7f0b53ba09bb1fc95172483e0fbb0740c","95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2","393137c76bd922ba70a2f8bf1ade4f59a16171a02fb25918c168d48875b0cfb0","3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","905c3e8f7ddaa6c391b60c05b2f4c3931d7127ad717a080359db3df510b7bdab","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9","62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"ce2169125f42515a26fa60977b6d56ae407f3462e28832fbf6a9013f6a828bab","affectsGlobalScope":true},"0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88","c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","08b428a44bc98005536a12456518797e9afe2a08e8b5d9785641713a54475881","c6c4fea9acc55d5e38ff2b70d57ab0b5cdbd08f8bc5d7a226e322cea128c5b57","96b49a9de749afcf92b5bce1d8cc42cfae6816cdf5ea36584fd9256b8b2e5292","3bdd93ec24853e61bfa4c63ebaa425ff3e474156e87a47d90122e1d8cc717c1f","5a2a25feca554a8f289ed62114771b8c63d89f2b58325e2f8b7043e4e0160d11","3845d3b64286c12c60d39fc90ac1cc5e47cbc951530658d2567d578b2faa1f26"],"options":{"declaration":true,"declarationDir":"./dist/types","downlevelIteration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"experimentalDecorators":true,"module":1,"noFallthroughCasesInSwitch":true,"noUnusedParameters":false,"preserveConstEnums":true,"removeComments":false,"rootDir":"./src","sourceMap":true,"strict":true,"target":1},"fileIdsList":[[77],[77,78,79,80,81],[77,79],[83],[46,76],[45,76,86],[89],[90],[96,98],[107],[45,61,76],[92,93],[92,93,94,95],[30],[97],[73,74],[45,52,61],[37,45,52],[61],[43,45,52],[45],[45,61,67],[45,52,61,67],[45,46,47,52,61,64,67],[45,47,64,67],[73,75],[43,45,61],[35],[45,61],[59,68,70],[41,43,52,61],[34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72],[52],[58],[29,31],[29,32]],"referencedMap":[[79,1],[82,2],[78,1],[80,3],[81,1],[84,4],[85,5],[87,6],[88,5],[90,7],[91,8],[99,9],[108,10],[109,11],[94,12],[96,13],[95,12],[31,14],[98,15],[75,16],[37,17],[38,18],[41,19],[42,20],[44,21],[45,21],[46,22],[47,23],[48,24],[49,25],[76,26],[50,21],[52,27],[55,28],[59,29],[60,30],[61,21],[64,31],[73,32],[66,33],[67,34],[71,29],[72,19],[32,35],[33,36]],"exportedModulesMap":[[79,1],[82,2],[78,1],[80,3],[81,1],[84,4],[85,5],[87,6],[88,5],[90,7],[91,8],[99,9],[108,10],[109,11],[94,12],[96,13],[95,12],[31,14],[98,15],[75,16],[37,17],[38,18],[41,19],[42,20],[44,21],[45,21],[46,22],[47,23],[48,24],[49,25],[76,26],[50,21],[52,27],[55,28],[59,29],[60,30],[61,21],[64,31],[73,32],[66,33],[67,34],[71,29],[72,19],[32,35],[33,36]],"semanticDiagnosticsPerFile":[79,77,82,78,80,81,84,83,85,87,88,89,90,91,99,100,86,101,102,103,104,105,106,107,108,109,92,94,96,95,93,31,30,98,97,6,8,7,2,9,10,11,12,13,14,15,16,3,4,20,17,18,19,21,22,23,5,24,25,26,27,1,28,74,35,75,36,37,38,39,40,41,42,43,44,45,46,34,47,48,49,76,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,73,66,67,68,69,70,71,72,29,32,33]},"version":"4.3.5"}