cache-manager 5.2.3 → 5.3.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/LICENSE +0 -4
- package/README.md +36 -4
- package/READMEv4.md +542 -0
- package/package.json +33 -33
- package/dist/caching.d.ts +0 -37
- package/dist/caching.js +0 -54
- package/dist/caching.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -20
- package/dist/index.js.map +0 -1
- package/dist/multi-caching.d.ts +0 -6
- package/dist/multi-caching.js +0 -87
- package/dist/multi-caching.js.map +0 -1
- package/dist/stores/index.d.ts +0 -1
- package/dist/stores/index.js +0 -18
- package/dist/stores/index.js.map +0 -1
- package/dist/stores/memory.d.ts +0 -22
- package/dist/stores/memory.js +0 -97
- package/dist/stores/memory.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
package/LICENSE
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
Copyrights for code authored by MOG Inc. is licensed under the following terms:
|
|
2
|
-
|
|
3
1
|
MIT License
|
|
4
2
|
|
|
5
|
-
Copyright (c) 2011 MOG Inc. All Rights Reserved.
|
|
6
|
-
|
|
7
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
4
|
of this software and associated documentation files (the "Software"), to
|
|
9
5
|
deal in the Software without restriction, including without limitation the
|
package/README.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
# node-cache-manager
|
|
1
|
+
# node-cache-manager
|
|
2
|
+
[](https://codecov.io/gh/node-cache-manager/node-cache-manager)
|
|
3
|
+
[](https://github.com/node-cache-manager/node-cache-manager/actions/workflows/test.yml)
|
|
4
|
+
[](https://github.com/node-cache-manager/node-cache-manager/blob/master/LICENSE)
|
|
5
|
+
[](https://npmjs.com/package/cache-manager)
|
|
6
|
+

|
|
2
7
|
|
|
3
8
|
# Flexible NodeJS cache module
|
|
4
9
|
|
|
@@ -115,16 +120,43 @@ await multiCache.mset(
|
|
|
115
120
|
// This is done recursively until either:
|
|
116
121
|
// - all have been found
|
|
117
122
|
// - all caches has been fetched
|
|
118
|
-
console.log(await multiCache.mget('key', 'key2');
|
|
123
|
+
console.log(await multiCache.mget('key', 'key2'));
|
|
119
124
|
// >> ['bar', 'bar2']
|
|
120
125
|
|
|
121
126
|
// Delete keys with mdel() passing arguments...
|
|
122
127
|
await multiCache.mdel('foo', 'foo2');
|
|
123
|
-
|
|
124
128
|
```
|
|
125
129
|
|
|
126
130
|
See unit tests in [`test/multi-caching.test.ts`](./test/multi-caching.test.ts) for more information.
|
|
127
131
|
|
|
132
|
+
### Refresh cache keys in background
|
|
133
|
+
|
|
134
|
+
Both the `caching` and `multicaching` modules support a mechanism to refresh expiring cache keys in background when using the `wrap` function.
|
|
135
|
+
This is done by adding a `refreshThreshold` attribute while creating the caching store.
|
|
136
|
+
|
|
137
|
+
If `refreshThreshold` is set and after retrieving a value from cache the TTL will be checked.
|
|
138
|
+
If the remaining TTL is less than `refreshThreshold`, the system will update the value asynchronously,
|
|
139
|
+
following same rules as standard fetching. In the meantime, the system will return the old value until expiration.
|
|
140
|
+
|
|
141
|
+
NOTES:
|
|
142
|
+
|
|
143
|
+
* In case of multicaching, the store that will be checked for refresh is the one where the key will be found first (highest priority).
|
|
144
|
+
* If the threshold is low and the worker function is slow, the key may expire and you may encounter a racing condition with updating values.
|
|
145
|
+
* The background refresh mechanism currently does not support providing multiple keys to `wrap` function.
|
|
146
|
+
* If no `ttl` is set for the key, the refresh mechanism will not be triggered. For redis, the `ttl` is set to -1 by default.
|
|
147
|
+
|
|
148
|
+
For example, pass the refreshThreshold to `caching` like this:
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
const memoryCache = await caching('memory', {
|
|
152
|
+
max: 100,
|
|
153
|
+
ttl: 10 * 1000 /*milliseconds*/,
|
|
154
|
+
refreshThreshold: 3 * 1000 /*milliseconds*/,
|
|
155
|
+
});
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
When a value will be retrieved from Redis with a TTL minor than 3sec, the value will be updated in the background.
|
|
159
|
+
|
|
128
160
|
## Store Engines
|
|
129
161
|
|
|
130
162
|
### Official and updated to last version
|
|
@@ -166,4 +198,4 @@ for any new features or bug fixes.
|
|
|
166
198
|
|
|
167
199
|
## License
|
|
168
200
|
|
|
169
|
-
node-cache-manager is licensed under the [MIT license](./LICENSE).
|
|
201
|
+
node-cache-manager is licensed under the [MIT license](./LICENSE).
|
package/READMEv4.md
ADDED
|
@@ -0,0 +1,542 @@
|
|
|
1
|
+
[](http://travis-ci.org/BryanDonovan/node-cache-manager)
|
|
2
|
+
[](https://coveralls.io/r/BryanDonovan/node-cache-manager?branch=master)
|
|
3
|
+
|
|
4
|
+
# node-cache-manager
|
|
5
|
+
|
|
6
|
+
# Flexible NodeJS cache module
|
|
7
|
+
|
|
8
|
+
A cache module for nodejs that allows easy wrapping of functions in cache,
|
|
9
|
+
tiered caches, and a consistent interface.
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- Easy way to wrap any function in cache.
|
|
14
|
+
- Tiered caches -- data gets stored in each cache and fetched from the highest
|
|
15
|
+
priority cache(s) first.
|
|
16
|
+
- Use any cache you want, as long as it has the same API.
|
|
17
|
+
- 100% test coverage via [mocha](https://github.com/visionmedia/mocha),
|
|
18
|
+
[istanbul](https://github.com/yahoo/istanbul), and [sinon](http://sinonjs.org).
|
|
19
|
+
|
|
20
|
+
## Express.js Example
|
|
21
|
+
|
|
22
|
+
See the [Express.js cache-manager example app](https://github.com/BryanDonovan/node-cache-manager-express-example) to see how to use
|
|
23
|
+
`node-cache-manager` in your applications.
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
npm install cache-manager
|
|
28
|
+
|
|
29
|
+
## Store Engines
|
|
30
|
+
|
|
31
|
+
- [node-cache-manager-redis](https://github.com/dial-once/node-cache-manager-redis) (uses [sol-redis-pool](https://github.com/joshuah/sol-redis-pool))
|
|
32
|
+
|
|
33
|
+
- [node-cache-manager-redis-store](https://github.com/dabroek/node-cache-manager-redis-store) (uses [node_redis](https://github.com/NodeRedis/node_redis))
|
|
34
|
+
|
|
35
|
+
- [node-cache-manager-ioredis](https://github.com/Tirke/node-cache-manager-ioredis) (uses [ioredis](https://github.com/luin/ioredis))
|
|
36
|
+
|
|
37
|
+
- [node-cache-manager-mongodb](https://github.com/v4l3r10/node-cache-manager-mongodb)
|
|
38
|
+
|
|
39
|
+
- [node-cache-manager-mongoose](https://github.com/disjunction/node-cache-manager-mongoose)
|
|
40
|
+
|
|
41
|
+
- [node-cache-manager-fs-binary](https://github.com/sheershoff/node-cache-manager-fs-binary)
|
|
42
|
+
|
|
43
|
+
- [node-cache-manager-fs-hash](https://github.com/rolandstarke/node-cache-manager-fs-hash)
|
|
44
|
+
|
|
45
|
+
- [node-cache-manager-hazelcast](https://github.com/marudor/node-cache-manager-hazelcast)
|
|
46
|
+
|
|
47
|
+
- [node-cache-manager-memcached-store](https://github.com/theogravity/node-cache-manager-memcached-store)
|
|
48
|
+
|
|
49
|
+
- [node-cache-manager-memory-store](https://github.com/theogravity/node-cache-manager-memory-store)
|
|
50
|
+
|
|
51
|
+
- [node-cache-manager-couchbase](https://github.com/davidepellegatta/node-cache-manager-couchbase)
|
|
52
|
+
|
|
53
|
+
- [node-cache-manager-sqlite](https://github.com/maxpert/node-cache-manager-sqlite)
|
|
54
|
+
|
|
55
|
+
## Overview
|
|
56
|
+
|
|
57
|
+
**First**, it includes a `wrap` function that lets you wrap any function in cache.
|
|
58
|
+
(Note, this was inspired by [node-caching](https://github.com/mape/node-caching).)
|
|
59
|
+
This is probably the feature you're looking for. As an example, where you might have to do this:
|
|
60
|
+
|
|
61
|
+
```javascript
|
|
62
|
+
function getCachedUser(id, cb) {
|
|
63
|
+
memoryCache.get(id, function (err, result) {
|
|
64
|
+
if (err) {
|
|
65
|
+
return cb(err);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (result) {
|
|
69
|
+
return cb(null, result);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
getUser(id, function (err, result) {
|
|
73
|
+
if (err) {
|
|
74
|
+
return cb(err);
|
|
75
|
+
}
|
|
76
|
+
memoryCache.set(id, result);
|
|
77
|
+
cb(null, result);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
... you can instead use the `wrap` function:
|
|
84
|
+
|
|
85
|
+
```javascript
|
|
86
|
+
function getCachedUser(id, cb) {
|
|
87
|
+
memoryCache.wrap(
|
|
88
|
+
id,
|
|
89
|
+
function (cacheCallback) {
|
|
90
|
+
getUser(id, cacheCallback);
|
|
91
|
+
},
|
|
92
|
+
{ ttl: ttl },
|
|
93
|
+
cb,
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Second**, node-cache-manager features a built-in memory cache (using [node-lru-cache](https://github.com/isaacs/node-lru-cache)),
|
|
99
|
+
with the standard functions you'd expect in most caches:
|
|
100
|
+
|
|
101
|
+
set(key, val, {ttl: ttl}, cb) // * see note below
|
|
102
|
+
get(key, cb)
|
|
103
|
+
del(key, cb)
|
|
104
|
+
mset(key1, val1, key2, val2, {ttl: ttl}, cb) // set several keys at once
|
|
105
|
+
mget(key1, key2, key3, cb) // get several keys at once
|
|
106
|
+
|
|
107
|
+
// * Note that depending on the underlying store, you may be able to pass the
|
|
108
|
+
// ttl as the third param, like this:
|
|
109
|
+
set(key, val, ttl, cb)
|
|
110
|
+
// ... or pass no ttl at all:
|
|
111
|
+
set(key, val, cb)
|
|
112
|
+
|
|
113
|
+
**Third**, node-cache-manager lets you set up a tiered cache strategy. This may be of
|
|
114
|
+
limited use in most cases, but imagine a scenario where you expect tons of
|
|
115
|
+
traffic, and don't want to hit your primary cache (like Redis) for every request.
|
|
116
|
+
You decide to store the most commonly-requested data in an in-memory cache,
|
|
117
|
+
perhaps with a very short timeout and/or a small data size limit. But you
|
|
118
|
+
still want to store the data in Redis for backup, and for the requests that
|
|
119
|
+
aren't as common as the ones you want to store in memory. This is something
|
|
120
|
+
node-cache-manager handles easily and transparently.
|
|
121
|
+
|
|
122
|
+
**Fourth**, it allows you to get and set multiple keys at once for caching store that support it. This means that when getting muliple keys it will go through the different caches starting from the highest priority one (see multi store below) and merge the values it finds at each level.
|
|
123
|
+
|
|
124
|
+
## Usage Examples
|
|
125
|
+
|
|
126
|
+
See examples below and in the examples directory. See `examples/redis_example` for an example of how to implement a
|
|
127
|
+
Redis cache store with connection pooling.
|
|
128
|
+
|
|
129
|
+
### Single Store
|
|
130
|
+
|
|
131
|
+
```javascript
|
|
132
|
+
var cacheManager = require('cache-manager');
|
|
133
|
+
var memoryCache = cacheManager.caching({
|
|
134
|
+
store: 'memory',
|
|
135
|
+
max: 100,
|
|
136
|
+
ttl: 10 /*seconds*/,
|
|
137
|
+
});
|
|
138
|
+
var ttl = 5;
|
|
139
|
+
// Note: callback is optional in set() and del().
|
|
140
|
+
// Note: memory cache clones values before setting them unless
|
|
141
|
+
// shouldCloneBeforeSet is set to false
|
|
142
|
+
|
|
143
|
+
memoryCache.set('foo', 'bar', { ttl: ttl }, function (err) {
|
|
144
|
+
if (err) {
|
|
145
|
+
throw err;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
memoryCache.get('foo', function (err, result) {
|
|
149
|
+
console.log(result);
|
|
150
|
+
// >> 'bar'
|
|
151
|
+
memoryCache.del('foo', function (err) {});
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
function getUser(id, cb) {
|
|
156
|
+
setTimeout(function () {
|
|
157
|
+
console.log('Returning user from slow database.');
|
|
158
|
+
cb(null, { id: id, name: 'Bob' });
|
|
159
|
+
}, 100);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
var userId = 123;
|
|
163
|
+
var key = 'user_' + userId;
|
|
164
|
+
|
|
165
|
+
// Note: ttl is optional in wrap()
|
|
166
|
+
memoryCache.wrap(
|
|
167
|
+
key,
|
|
168
|
+
function (cb) {
|
|
169
|
+
getUser(userId, cb);
|
|
170
|
+
},
|
|
171
|
+
{ ttl: ttl },
|
|
172
|
+
function (err, user) {
|
|
173
|
+
console.log(user);
|
|
174
|
+
|
|
175
|
+
// Second time fetches user from memoryCache
|
|
176
|
+
memoryCache.wrap(
|
|
177
|
+
key,
|
|
178
|
+
function (cb) {
|
|
179
|
+
getUser(userId, cb);
|
|
180
|
+
},
|
|
181
|
+
function (err, user) {
|
|
182
|
+
console.log(user);
|
|
183
|
+
},
|
|
184
|
+
);
|
|
185
|
+
},
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
// Outputs:
|
|
189
|
+
// Returning user from slow database.
|
|
190
|
+
// { id: 123, name: 'Bob' }
|
|
191
|
+
// { id: 123, name: 'Bob' }
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
The `ttl` can also be computed dynamically by passing in a function. E.g.,
|
|
195
|
+
|
|
196
|
+
```javascript
|
|
197
|
+
var opts = {
|
|
198
|
+
ttl: function(user) {
|
|
199
|
+
if (user.id === 1) {
|
|
200
|
+
return 0.1;
|
|
201
|
+
} else {
|
|
202
|
+
return 0.5;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
memoryCache.wrap(key, function(cb) {
|
|
208
|
+
getUser(userId, cb);
|
|
209
|
+
}, opts, function(err, user) {
|
|
210
|
+
console.log(user);
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
You can get several keys at once. Note that this will return whatever records it
|
|
215
|
+
finds in the cache and it is up to the user to check the results against the
|
|
216
|
+
supplied keys and make any calls to the underlying data store to fill in
|
|
217
|
+
missing records. In practice, this should not be much of a concern if you are
|
|
218
|
+
only using the `wrap` function to set these records in cache.
|
|
219
|
+
|
|
220
|
+
Side note: Ideally the `wrap` function would get what it can from the cache and fill in
|
|
221
|
+
the missing records from the data store, but I can't think of a way to do this
|
|
222
|
+
that is generic to all situations. Another option is to only return the data
|
|
223
|
+
from the cache if all records are found, but this woul break multi-caching.
|
|
224
|
+
|
|
225
|
+
See unit tests in `caching.unit.js` for more information.
|
|
226
|
+
|
|
227
|
+
Example:
|
|
228
|
+
|
|
229
|
+
```js
|
|
230
|
+
var key1 = 'user_1';
|
|
231
|
+
var key2 = 'user_1';
|
|
232
|
+
|
|
233
|
+
memoryCache.wrap(
|
|
234
|
+
key1,
|
|
235
|
+
key2,
|
|
236
|
+
function (cb) {
|
|
237
|
+
getManyUser([key1, key2], cb);
|
|
238
|
+
},
|
|
239
|
+
function (err, users) {
|
|
240
|
+
console.log(users[0]);
|
|
241
|
+
console.log(users[1]);
|
|
242
|
+
},
|
|
243
|
+
);
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
#### Example setting/getting several keys with mset() and mget()
|
|
247
|
+
|
|
248
|
+
```js
|
|
249
|
+
memoryCache.mset('foo', 'bar', 'foo2', 'bar2', { ttl: ttl }, function (err) {
|
|
250
|
+
if (err) {
|
|
251
|
+
throw err;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
memoryCache.mget('foo', 'foo2', function (err, result) {
|
|
255
|
+
console.log(result);
|
|
256
|
+
// >> ['bar', 'bar2']
|
|
257
|
+
|
|
258
|
+
// Delete keys with del() passing arguments...
|
|
259
|
+
memoryCache.del('foo', 'foo2', function (err) {});
|
|
260
|
+
|
|
261
|
+
// ...passing an Array of keys
|
|
262
|
+
memoryCache.del(['foo', 'foo2'], function (err) {});
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
#### Example Using Promises
|
|
268
|
+
|
|
269
|
+
```javascript
|
|
270
|
+
memoryCache
|
|
271
|
+
.wrap(key, function () {
|
|
272
|
+
return getUserPromise(userId);
|
|
273
|
+
})
|
|
274
|
+
.then(function (user) {
|
|
275
|
+
console.log('User:', user);
|
|
276
|
+
});
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
If you are using a Node version that does not include native promises, you can
|
|
280
|
+
specify your promise dependency in the options passed to the cache module.
|
|
281
|
+
E.g.,
|
|
282
|
+
|
|
283
|
+
```javascript
|
|
284
|
+
var Promise = require('es6-promise').Promise;
|
|
285
|
+
cache = caching({ store: store, promiseDependency: Promise });
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
#### Example Using async/await
|
|
289
|
+
|
|
290
|
+
```javascript
|
|
291
|
+
try {
|
|
292
|
+
let user = await memoryCache.wrap(key, function () {
|
|
293
|
+
return getUserPromise(userId);
|
|
294
|
+
});
|
|
295
|
+
} catch (err) {
|
|
296
|
+
// error handling
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Hint: should wrap `await` call with `try` - `catch` to handle `promise` error.
|
|
301
|
+
|
|
302
|
+
#### Example Express App Usage
|
|
303
|
+
|
|
304
|
+
(Also see the [Express.js cache-manager example app](https://github.com/BryanDonovan/node-cache-manager-express-example)).
|
|
305
|
+
|
|
306
|
+
```javascript
|
|
307
|
+
function respond(res, err, data) {
|
|
308
|
+
if (err) {
|
|
309
|
+
res.json(500, err);
|
|
310
|
+
} else {
|
|
311
|
+
res.json(200, data);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
app.get('/foo/bar', function (req, res) {
|
|
316
|
+
var cacheKey = 'foo-bar:' + JSON.stringify(req.query);
|
|
317
|
+
var ttl = 10;
|
|
318
|
+
memoryCache.wrap(
|
|
319
|
+
cacheKey,
|
|
320
|
+
function (cacheCallback) {
|
|
321
|
+
DB.find(req.query, cacheCallback);
|
|
322
|
+
},
|
|
323
|
+
{ ttl: ttl },
|
|
324
|
+
function (err, result) {
|
|
325
|
+
respond(res, err, result);
|
|
326
|
+
},
|
|
327
|
+
);
|
|
328
|
+
});
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
#### Custom Stores
|
|
332
|
+
|
|
333
|
+
You can use your own custom store by creating one with the same API as the
|
|
334
|
+
built-in memory stores (such as a redis or memcached store). To use your own store just pass
|
|
335
|
+
in an instance of it.
|
|
336
|
+
|
|
337
|
+
E.g.,
|
|
338
|
+
|
|
339
|
+
```javascript
|
|
340
|
+
var myStore = require('your-homemade-store');
|
|
341
|
+
var cache = cacheManager.caching({ store: myStore });
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### Multi-Store
|
|
345
|
+
|
|
346
|
+
```javascript
|
|
347
|
+
var multiCache = cacheManager.multiCaching([memoryCache, someOtherCache]);
|
|
348
|
+
userId2 = 456;
|
|
349
|
+
key2 = 'user_' + userId;
|
|
350
|
+
ttl = 5;
|
|
351
|
+
|
|
352
|
+
// Sets in all caches.
|
|
353
|
+
// The "ttl" option can also be a function (see example below)
|
|
354
|
+
multiCache.set('foo2', 'bar2', { ttl: ttl }, function (err) {
|
|
355
|
+
if (err) {
|
|
356
|
+
throw err;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// Fetches from highest priority cache that has the key.
|
|
360
|
+
multiCache.get('foo2', function (err, result) {
|
|
361
|
+
console.log(result);
|
|
362
|
+
// >> 'bar2'
|
|
363
|
+
|
|
364
|
+
// Delete from all caches
|
|
365
|
+
multiCache.del('foo2');
|
|
366
|
+
});
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
// Set the ttl value by context depending on the store.
|
|
370
|
+
function getTTL(data, store) {
|
|
371
|
+
if (store === 'redis') {
|
|
372
|
+
return 6000;
|
|
373
|
+
}
|
|
374
|
+
return 3000;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// Sets multiple keys in all caches.
|
|
378
|
+
// You can pass as many key,value pair as you want
|
|
379
|
+
multiCache.mset(
|
|
380
|
+
'key',
|
|
381
|
+
'value',
|
|
382
|
+
'key2',
|
|
383
|
+
'value2',
|
|
384
|
+
{ ttl: getTTL },
|
|
385
|
+
function (err) {
|
|
386
|
+
if (err) {
|
|
387
|
+
throw err;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// mget() fetches from highest priority cache.
|
|
391
|
+
// If the first cache does not return all the keys,
|
|
392
|
+
// the next cache is fetched with the keys that were not found.
|
|
393
|
+
// This is done recursively until either:
|
|
394
|
+
// - all have been found
|
|
395
|
+
// - all caches has been fetched
|
|
396
|
+
multiCache.mget('key', 'key2', function (err, result) {
|
|
397
|
+
console.log(result[0]);
|
|
398
|
+
console.log(result[1]);
|
|
399
|
+
// >> 'bar2'
|
|
400
|
+
// >> 'bar3'
|
|
401
|
+
|
|
402
|
+
// Delete from all caches
|
|
403
|
+
multiCache.del('key', 'key2');
|
|
404
|
+
// ...or with an Array
|
|
405
|
+
multiCache.del(['key', 'key2']);
|
|
406
|
+
});
|
|
407
|
+
},
|
|
408
|
+
);
|
|
409
|
+
|
|
410
|
+
// Note: options with ttl are optional in wrap()
|
|
411
|
+
multiCache.wrap(
|
|
412
|
+
key2,
|
|
413
|
+
function (cb) {
|
|
414
|
+
getUser(userId2, cb);
|
|
415
|
+
},
|
|
416
|
+
{ ttl: ttl },
|
|
417
|
+
function (err, user) {
|
|
418
|
+
console.log(user);
|
|
419
|
+
|
|
420
|
+
// Second time fetches user from memoryCache, since it's highest priority.
|
|
421
|
+
// If the data expires in the memory cache, the next fetch would pull it from
|
|
422
|
+
// the 'someOtherCache', and set the data in memory again.
|
|
423
|
+
multiCache.wrap(
|
|
424
|
+
key2,
|
|
425
|
+
function (cb) {
|
|
426
|
+
getUser(userId2, cb);
|
|
427
|
+
},
|
|
428
|
+
function (err, user) {
|
|
429
|
+
console.log(user);
|
|
430
|
+
},
|
|
431
|
+
);
|
|
432
|
+
},
|
|
433
|
+
);
|
|
434
|
+
|
|
435
|
+
// Multiple keys
|
|
436
|
+
multiCache.wrap(
|
|
437
|
+
'key1',
|
|
438
|
+
'key2',
|
|
439
|
+
function (cb) {
|
|
440
|
+
getManyUser(['key1', 'key2'], cb);
|
|
441
|
+
},
|
|
442
|
+
{ ttl: ttl },
|
|
443
|
+
function (err, users) {
|
|
444
|
+
console.log(users[0]);
|
|
445
|
+
console.log(users[1]);
|
|
446
|
+
},
|
|
447
|
+
);
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### Specifying What to Cache in `wrap` Function
|
|
451
|
+
|
|
452
|
+
Both the `caching` and `multicaching` modules allow you to pass in a callback function named
|
|
453
|
+
`isCacheableValue` which is called by the `wrap` function with every value returned from cache or from the wrapped function.
|
|
454
|
+
This lets you specify which values should and should not be cached by `wrap`. If the function returns true, it will be
|
|
455
|
+
stored in cache. By default the caches cache everything except `undefined`.
|
|
456
|
+
|
|
457
|
+
NOTE: The `set` functions in `caching` and `multicaching` do _not_ use `isCacheableValue`.
|
|
458
|
+
|
|
459
|
+
For example, if you don't want to cache `false` and `null`, you can pass in a function like this:
|
|
460
|
+
|
|
461
|
+
```javascript
|
|
462
|
+
var isCacheableValue = function (value) {
|
|
463
|
+
return value !== null && value !== false && value !== undefined;
|
|
464
|
+
};
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
Then pass it to `caching` like this:
|
|
468
|
+
|
|
469
|
+
```javascript
|
|
470
|
+
var memoryCache = cacheManager.caching({
|
|
471
|
+
store: 'memory',
|
|
472
|
+
isCacheableValue: isCacheableValue,
|
|
473
|
+
});
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
And pass it to `multicaching` like this:
|
|
477
|
+
|
|
478
|
+
```javascript
|
|
479
|
+
var multiCache = cacheManager.multiCaching([memoryCache, someOtherCache], {
|
|
480
|
+
isCacheableValue: isCacheableValue,
|
|
481
|
+
});
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
### Refresh cache keys in background
|
|
485
|
+
|
|
486
|
+
Both the `caching` and `multicaching` modules support a mechanism to refresh expiring cache keys in background when using `wrap` function.
|
|
487
|
+
This is done by adding a `refreshThreshold` attribute while creating the caching store.
|
|
488
|
+
|
|
489
|
+
If `refreshThreshold` is set and if the `ttl` method is available for the used store, after retrieving a value from cache TTL will be checked.
|
|
490
|
+
If the remaining TTL is less than `refreshThreshold`, the system will spawn a background worker to update the value, following same rules as standard fetching. In the meantime, the system will return the old value until expiration.
|
|
491
|
+
|
|
492
|
+
In case of multicaching, the store that will be used for refresh is the one where the key will be found first (highest priority). The value will then be set in all the stores.
|
|
493
|
+
|
|
494
|
+
NOTES:
|
|
495
|
+
|
|
496
|
+
- In case of multicaching, the store that will be checked for refresh is the one where the key will be found first (highest priority).
|
|
497
|
+
- If the threshold is low and the worker function is slow, the key may expire and you may encounter a racing condition with updating values.
|
|
498
|
+
- The background refresh mechanism currently does not support providing multiple keys to `wrap` function.
|
|
499
|
+
- The caching store needs to provide the `ttl` method.
|
|
500
|
+
|
|
501
|
+
For example, pass the refreshThreshold to `caching` like this:
|
|
502
|
+
|
|
503
|
+
```javascript
|
|
504
|
+
var redisStore = require('cache-manager-ioredis');
|
|
505
|
+
|
|
506
|
+
var redisCache = cacheManager.caching({
|
|
507
|
+
store: redisStore,
|
|
508
|
+
refreshThreshold: 3,
|
|
509
|
+
isCacheableValue: isCacheableValue,
|
|
510
|
+
});
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
When a value will be retrieved from Redis with a remaining TTL < 3sec, the value will be updated in background.
|
|
514
|
+
|
|
515
|
+
### Development environment
|
|
516
|
+
|
|
517
|
+
You may disable real caching but still get all the callback functionality working by setting `none` store.
|
|
518
|
+
|
|
519
|
+
## Docs
|
|
520
|
+
|
|
521
|
+
To generate JSDOC 3 documentation:
|
|
522
|
+
|
|
523
|
+
make docs
|
|
524
|
+
|
|
525
|
+
## Tests
|
|
526
|
+
|
|
527
|
+
To run tests, first run:
|
|
528
|
+
|
|
529
|
+
npm install -d
|
|
530
|
+
|
|
531
|
+
Run the tests and JShint:
|
|
532
|
+
|
|
533
|
+
make
|
|
534
|
+
|
|
535
|
+
## Contribute
|
|
536
|
+
|
|
537
|
+
If you would like to contribute to the project, please fork it and send us a pull request. Please add tests
|
|
538
|
+
for any new features or bug fixes. Also run `make` before submitting the pull request.
|
|
539
|
+
|
|
540
|
+
## License
|
|
541
|
+
|
|
542
|
+
node-cache-manager is licensed under the MIT license.
|
package/package.json
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cache-manager",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "Cache module for Node.js",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
12
|
+
"test": "vitest run --coverage",
|
|
13
|
+
"release": "yarn check && yarn test -- --run && yarn build",
|
|
14
|
+
"fix": "yarn lint && yarn fmt",
|
|
15
|
+
"check": "yarn lint:check && yarn fmt:check",
|
|
16
|
+
"lint": "eslint --cache --max-warnings 0 --fix '**/*.{ts,mts,js}'",
|
|
17
|
+
"fmt": "prettier --write '**/*.{md,json,yml}'",
|
|
18
|
+
"lint:check": "eslint --cache --max-warnings 0 '**/*.{ts,mts,js}'",
|
|
19
|
+
"fmt:check": "prettier --check '**/*.{md,json,yml}'"
|
|
20
|
+
},
|
|
10
21
|
"repository": {
|
|
11
22
|
"type": "git",
|
|
12
23
|
"url": "https://github.com/node-cache-manager/node-cache-manager.git"
|
|
@@ -19,6 +30,10 @@
|
|
|
19
30
|
"multiple cache"
|
|
20
31
|
],
|
|
21
32
|
"authors": [
|
|
33
|
+
{
|
|
34
|
+
"name": "Jared Wray",
|
|
35
|
+
"email": "me@jaredwray.com"
|
|
36
|
+
},
|
|
22
37
|
{
|
|
23
38
|
"name": "Bryan Donovan"
|
|
24
39
|
},
|
|
@@ -30,42 +45,27 @@
|
|
|
30
45
|
"license": "MIT",
|
|
31
46
|
"dependencies": {
|
|
32
47
|
"lodash.clonedeep": "^4.5.0",
|
|
33
|
-
"lru-cache": "^
|
|
48
|
+
"lru-cache": "^10.0.2",
|
|
49
|
+
"promise-coalesce": "^1.1.1"
|
|
34
50
|
},
|
|
35
51
|
"devDependencies": {
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"lint-staged": "13.2.2",
|
|
51
|
-
"prettier": "2.8.8",
|
|
52
|
-
"release-it": "15.11.0",
|
|
53
|
-
"typescript": "5.1.3",
|
|
54
|
-
"vitest": "0.32.0"
|
|
52
|
+
"@faker-js/faker": "8.3.1",
|
|
53
|
+
"@types/lodash.clonedeep": "4.5.9",
|
|
54
|
+
"@types/node": "20.9.0",
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "6.11.0",
|
|
56
|
+
"@typescript-eslint/parser": "6.11.0",
|
|
57
|
+
"@vitest/coverage-v8": "0.34.6",
|
|
58
|
+
"dotenv-cli": "7.3.0",
|
|
59
|
+
"eslint": "8.53.0",
|
|
60
|
+
"eslint-config-prettier": "9.0.0",
|
|
61
|
+
"eslint-plugin-prettier": "5.0.1",
|
|
62
|
+
"lint-staged": "15.1.0",
|
|
63
|
+
"prettier": "3.1.0",
|
|
64
|
+
"typescript": "5.2.2",
|
|
65
|
+
"vitest": "0.34.6"
|
|
55
66
|
},
|
|
56
67
|
"lint-staged": {
|
|
57
68
|
"*.{ts,js,mts,mjs}": "eslint --cache --fix",
|
|
58
69
|
"*.{md,json,yml}": "prettier --write"
|
|
59
|
-
},
|
|
60
|
-
"scripts": {
|
|
61
|
-
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
62
|
-
"test": "vitest",
|
|
63
|
-
"release": "pnpm check && pnpm test -- --run && pnpm build && dotenv release-it",
|
|
64
|
-
"fix": "pnpm lint && pnpm fmt",
|
|
65
|
-
"check": "pnpm lint:check && pnpm fmt:check",
|
|
66
|
-
"lint": "eslint --cache --max-warnings 0 --fix '**/*.{ts,mts,js}'",
|
|
67
|
-
"fmt": "prettier --write '**/*.{md,json,yml}'",
|
|
68
|
-
"lint:check": "eslint --cache --max-warnings 0 '**/*.{ts,mts,js}'",
|
|
69
|
-
"fmt:check": "prettier --check '**/*.{md,json,yml}'"
|
|
70
70
|
}
|
|
71
|
-
}
|
|
71
|
+
}
|
package/dist/caching.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { MemoryCache, MemoryConfig } from './stores';
|
|
2
|
-
export type Config = {
|
|
3
|
-
ttl?: Milliseconds;
|
|
4
|
-
isCacheable?: (val: unknown) => boolean;
|
|
5
|
-
};
|
|
6
|
-
export type Milliseconds = number;
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated will remove after 5.2.0. Use Milliseconds instead
|
|
9
|
-
*/
|
|
10
|
-
export type Ttl = Milliseconds;
|
|
11
|
-
export type Store = {
|
|
12
|
-
get<T>(key: string): Promise<T | undefined>;
|
|
13
|
-
set<T>(key: string, data: T, ttl?: Milliseconds): Promise<void>;
|
|
14
|
-
del(key: string): Promise<void>;
|
|
15
|
-
reset(): Promise<void>;
|
|
16
|
-
mset(args: [string, unknown][], ttl?: Milliseconds): Promise<void>;
|
|
17
|
-
mget(...args: string[]): Promise<unknown[]>;
|
|
18
|
-
mdel(...args: string[]): Promise<void>;
|
|
19
|
-
keys(pattern?: string): Promise<string[]>;
|
|
20
|
-
ttl(key: string): Promise<number>;
|
|
21
|
-
};
|
|
22
|
-
export type StoreConfig = Config;
|
|
23
|
-
export type FactoryConfig<T> = T & Config;
|
|
24
|
-
export type FactoryStore<S extends Store, T extends object = never> = (config?: FactoryConfig<T>) => S | Promise<S>;
|
|
25
|
-
export type Stores<S extends Store, T extends object> = 'memory' | Store | FactoryStore<S, T>;
|
|
26
|
-
export type CachingConfig<T> = MemoryConfig | StoreConfig | FactoryConfig<T>;
|
|
27
|
-
export type Cache<S extends Store = Store> = {
|
|
28
|
-
set: (key: string, value: unknown, ttl?: Milliseconds) => Promise<void>;
|
|
29
|
-
get: <T>(key: string) => Promise<T | undefined>;
|
|
30
|
-
del: (key: string) => Promise<void>;
|
|
31
|
-
reset: () => Promise<void>;
|
|
32
|
-
wrap<T>(key: string, fn: () => Promise<T>, ttl?: Milliseconds): Promise<T>;
|
|
33
|
-
store: S;
|
|
34
|
-
};
|
|
35
|
-
export declare function caching(name: 'memory', args?: MemoryConfig): Promise<MemoryCache>;
|
|
36
|
-
export declare function caching<S extends Store>(store: S): Promise<Cache<S>>;
|
|
37
|
-
export declare function caching<S extends Store, T extends object = never>(factory: FactoryStore<S, T>, args?: FactoryConfig<T>): Promise<Cache<S>>;
|
package/dist/caching.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.caching = void 0;
|
|
13
|
-
const stores_1 = require("./stores");
|
|
14
|
-
/**
|
|
15
|
-
* Generic caching interface that wraps any caching library with a compatible interface.
|
|
16
|
-
*/
|
|
17
|
-
function caching(factory, args) {
|
|
18
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
let store;
|
|
20
|
-
if (factory === 'memory')
|
|
21
|
-
store = (0, stores_1.memoryStore)(args);
|
|
22
|
-
else if (typeof factory === 'function')
|
|
23
|
-
store = yield factory(args);
|
|
24
|
-
else
|
|
25
|
-
store = factory;
|
|
26
|
-
return {
|
|
27
|
-
/**
|
|
28
|
-
* Wraps a function in cache. I.e., the first time the function is run,
|
|
29
|
-
* its results are stored in cache so subsequent calls retrieve from cache
|
|
30
|
-
* instead of calling the function.
|
|
31
|
-
|
|
32
|
-
* @example
|
|
33
|
-
* const result = await cache.wrap('key', () => Promise.resolve(1));
|
|
34
|
-
*
|
|
35
|
-
*/
|
|
36
|
-
wrap: (key, fn, ttl) => __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
const value = yield store.get(key);
|
|
38
|
-
if (value === undefined) {
|
|
39
|
-
const result = yield fn();
|
|
40
|
-
yield store.set(key, result, ttl);
|
|
41
|
-
return result;
|
|
42
|
-
}
|
|
43
|
-
return value;
|
|
44
|
-
}),
|
|
45
|
-
store: store,
|
|
46
|
-
del: (key) => store.del(key),
|
|
47
|
-
get: (key) => store.get(key),
|
|
48
|
-
set: (key, value, ttl) => store.set(key, value, ttl),
|
|
49
|
-
reset: () => store.reset(),
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
exports.caching = caching;
|
|
54
|
-
//# sourceMappingURL=caching.js.map
|
package/dist/caching.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"caching.js","sourceRoot":"","sources":["../src/caching.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAkE;AAyDlE;;GAEG;AACH,SAAsB,OAAO,CAC3B,OAAqB,EACrB,IAAuB;;QAEvB,IAAI,KAAY,CAAC;QACjB,IAAI,OAAO,KAAK,QAAQ;YAAE,KAAK,GAAG,IAAA,oBAAW,EAAC,IAAoB,CAAC,CAAC;aAC/D,IAAI,OAAO,OAAO,KAAK,UAAU;YACpC,KAAK,GAAG,MAAM,OAAO,CAAC,IAAwB,CAAC,CAAC;;YAC7C,KAAK,GAAG,OAAO,CAAC;QAErB,OAAO;YACL;;;;;;;;eAQG;YACH,IAAI,EAAE,CAAU,GAAW,EAAE,EAAoB,EAAE,GAAkB,EAAE,EAAE;gBACvE,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,GAAG,CAAI,GAAG,CAAC,CAAC;gBACtC,IAAI,KAAK,KAAK,SAAS,EAAE;oBACvB,MAAM,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC;oBAC1B,MAAM,KAAK,CAAC,GAAG,CAAI,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;oBACrC,OAAO,MAAM,CAAC;iBACf;gBACD,OAAO,KAAK,CAAC;YACf,CAAC,CAAA;YACD,KAAK,EAAE,KAAU;YACjB,GAAG,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;YACpC,GAAG,EAAE,CAAI,GAAW,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAI,GAAG,CAAC;YAC1C,GAAG,EAAE,CAAC,GAAW,EAAE,KAAc,EAAE,GAAkB,EAAE,EAAE,CACvD,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC;YAC5B,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE;SAC3B,CAAC;IACJ,CAAC;CAAA;AApCD,0BAoCC"}
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./caching"), exports);
|
|
18
|
-
__exportStar(require("./multi-caching"), exports);
|
|
19
|
-
__exportStar(require("./stores"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,kDAAgC;AAChC,2CAAyB"}
|
package/dist/multi-caching.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Cache } from './caching';
|
|
2
|
-
export type MultiCache = Omit<Cache, 'store'> & Pick<Cache['store'], 'mset' | 'mget' | 'mdel'>;
|
|
3
|
-
/**
|
|
4
|
-
* Module that lets you specify a hierarchy of caches.
|
|
5
|
-
*/
|
|
6
|
-
export declare function multiCaching<Caches extends Cache[]>(caches: Caches): MultiCache;
|
package/dist/multi-caching.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.multiCaching = void 0;
|
|
13
|
-
/**
|
|
14
|
-
* Module that lets you specify a hierarchy of caches.
|
|
15
|
-
*/
|
|
16
|
-
function multiCaching(caches) {
|
|
17
|
-
const get = (key) => __awaiter(this, void 0, void 0, function* () {
|
|
18
|
-
for (const cache of caches) {
|
|
19
|
-
try {
|
|
20
|
-
const val = yield cache.get(key);
|
|
21
|
-
if (val !== undefined)
|
|
22
|
-
return val;
|
|
23
|
-
}
|
|
24
|
-
catch (e) { }
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
const set = (key, data, ttl) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
yield Promise.all(caches.map((cache) => cache.set(key, data, ttl)));
|
|
29
|
-
});
|
|
30
|
-
return {
|
|
31
|
-
get,
|
|
32
|
-
set,
|
|
33
|
-
del: (key) => __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
yield Promise.all(caches.map((cache) => cache.del(key)));
|
|
35
|
-
}),
|
|
36
|
-
wrap(key, fn, ttl) {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
let value;
|
|
39
|
-
let i = 0;
|
|
40
|
-
for (; i < caches.length; i++) {
|
|
41
|
-
try {
|
|
42
|
-
value = yield caches[i].get(key);
|
|
43
|
-
if (value !== undefined)
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
catch (e) { }
|
|
47
|
-
}
|
|
48
|
-
if (value === undefined) {
|
|
49
|
-
const result = yield fn();
|
|
50
|
-
yield set(key, result, ttl);
|
|
51
|
-
return result;
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
yield Promise.all(caches.slice(0, i).map((cache) => cache.set(key, value, ttl)));
|
|
55
|
-
}
|
|
56
|
-
return value;
|
|
57
|
-
});
|
|
58
|
-
},
|
|
59
|
-
reset: () => __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
yield Promise.all(caches.map((x) => x.reset()));
|
|
61
|
-
}),
|
|
62
|
-
mget: (...keys) => __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
const values = new Array(keys.length).fill(undefined);
|
|
64
|
-
for (const cache of caches) {
|
|
65
|
-
if (values.every((x) => x !== undefined))
|
|
66
|
-
break;
|
|
67
|
-
try {
|
|
68
|
-
const val = yield cache.store.mget(...keys);
|
|
69
|
-
val.forEach((v, i) => {
|
|
70
|
-
if (values[i] === undefined && v !== undefined)
|
|
71
|
-
values[i] = v;
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
catch (e) { }
|
|
75
|
-
}
|
|
76
|
-
return values;
|
|
77
|
-
}),
|
|
78
|
-
mset: (args, ttl) => __awaiter(this, void 0, void 0, function* () {
|
|
79
|
-
yield Promise.all(caches.map((cache) => cache.store.mset(args, ttl)));
|
|
80
|
-
}),
|
|
81
|
-
mdel: (...keys) => __awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
yield Promise.all(caches.map((cache) => cache.store.mdel(...keys)));
|
|
83
|
-
}),
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
exports.multiCaching = multiCaching;
|
|
87
|
-
//# sourceMappingURL=multi-caching.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"multi-caching.js","sourceRoot":"","sources":["../src/multi-caching.ts"],"names":[],"mappings":"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"}
|
package/dist/stores/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './memory';
|
package/dist/stores/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./memory"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
package/dist/stores/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/stores/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"}
|
package/dist/stores/memory.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { LRUCache } from 'lru-cache';
|
|
2
|
-
import { Config, Cache, Store } from '../caching';
|
|
3
|
-
type LRU = LRUCache<string, any, unknown>;
|
|
4
|
-
type Pre = LRUCache.OptionsTTLLimit<string, any, unknown>;
|
|
5
|
-
type Options = Omit<Pre, 'ttlAutopurge'> & Partial<Pick<Pre, 'ttlAutopurge'>>;
|
|
6
|
-
export type MemoryConfig = {
|
|
7
|
-
max?: number;
|
|
8
|
-
sizeCalculation?: (value: unknown, key: string) => number;
|
|
9
|
-
shouldCloneBeforeSet?: boolean;
|
|
10
|
-
} & Options & Config;
|
|
11
|
-
export type MemoryStore = Store & {
|
|
12
|
-
get size(): number;
|
|
13
|
-
dump: LRU['dump'];
|
|
14
|
-
load: LRU['load'];
|
|
15
|
-
calculatedSize: LRU['calculatedSize'];
|
|
16
|
-
};
|
|
17
|
-
export type MemoryCache = Cache<MemoryStore>;
|
|
18
|
-
/**
|
|
19
|
-
* Wrapper for lru-cache.
|
|
20
|
-
*/
|
|
21
|
-
export declare function memoryStore(args?: MemoryConfig): MemoryStore;
|
|
22
|
-
export {};
|
package/dist/stores/memory.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.memoryStore = void 0;
|
|
16
|
-
const lru_cache_1 = require("lru-cache");
|
|
17
|
-
const lodash_clonedeep_1 = __importDefault(require("lodash.clonedeep"));
|
|
18
|
-
function clone(object) {
|
|
19
|
-
if (typeof object === 'object' && object !== null) {
|
|
20
|
-
return (0, lodash_clonedeep_1.default)(object);
|
|
21
|
-
}
|
|
22
|
-
return object;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Wrapper for lru-cache.
|
|
26
|
-
*/
|
|
27
|
-
function memoryStore(args) {
|
|
28
|
-
var _a;
|
|
29
|
-
const shouldCloneBeforeSet = (args === null || args === void 0 ? void 0 : args.shouldCloneBeforeSet) !== false; // clone by default
|
|
30
|
-
const isCacheable = (_a = args === null || args === void 0 ? void 0 : args.isCacheable) !== null && _a !== void 0 ? _a : ((val) => val !== undefined);
|
|
31
|
-
const lruOpts = Object.assign(Object.assign({ ttlAutopurge: true }, args), { max: (args === null || args === void 0 ? void 0 : args.max) || 500, ttl: (args === null || args === void 0 ? void 0 : args.ttl) !== undefined ? args.ttl : 0 });
|
|
32
|
-
const lruCache = new lru_cache_1.LRUCache(lruOpts);
|
|
33
|
-
return {
|
|
34
|
-
del(key) {
|
|
35
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
lruCache.delete(key);
|
|
37
|
-
});
|
|
38
|
-
},
|
|
39
|
-
get: (key) => __awaiter(this, void 0, void 0, function* () { return lruCache.get(key); }),
|
|
40
|
-
keys: () => __awaiter(this, void 0, void 0, function* () { return [...lruCache.keys()]; }),
|
|
41
|
-
mget: (...args) => __awaiter(this, void 0, void 0, function* () { return args.map((x) => lruCache.get(x)); }),
|
|
42
|
-
mset(args, ttl) {
|
|
43
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
const opt = { ttl: ttl !== undefined ? ttl : lruOpts.ttl };
|
|
45
|
-
for (const [key, value] of args) {
|
|
46
|
-
if (!isCacheable(value))
|
|
47
|
-
throw new Error(`no cacheable value ${JSON.stringify(value)}`);
|
|
48
|
-
if (shouldCloneBeforeSet)
|
|
49
|
-
lruCache.set(key, clone(value), opt);
|
|
50
|
-
else
|
|
51
|
-
lruCache.set(key, value, opt);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
},
|
|
55
|
-
mdel(...args) {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
for (const key of args)
|
|
58
|
-
lruCache.delete(key);
|
|
59
|
-
});
|
|
60
|
-
},
|
|
61
|
-
reset() {
|
|
62
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
lruCache.clear();
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
ttl: (key) => __awaiter(this, void 0, void 0, function* () { return lruCache.getRemainingTTL(key); }),
|
|
67
|
-
set(key, value, opt) {
|
|
68
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
if (!isCacheable(value))
|
|
70
|
-
throw new Error(`no cacheable value ${JSON.stringify(value)}`);
|
|
71
|
-
if (shouldCloneBeforeSet)
|
|
72
|
-
value = clone(value);
|
|
73
|
-
const ttl = opt !== undefined ? opt : lruOpts.ttl;
|
|
74
|
-
lruCache.set(key, value, { ttl });
|
|
75
|
-
});
|
|
76
|
-
},
|
|
77
|
-
get calculatedSize() {
|
|
78
|
-
return lruCache.calculatedSize;
|
|
79
|
-
},
|
|
80
|
-
/**
|
|
81
|
-
* This method is not available in the caching modules.
|
|
82
|
-
*/
|
|
83
|
-
get size() {
|
|
84
|
-
return lruCache.size;
|
|
85
|
-
},
|
|
86
|
-
/**
|
|
87
|
-
* This method is not available in the caching modules.
|
|
88
|
-
*/
|
|
89
|
-
dump: () => lruCache.dump(),
|
|
90
|
-
/**
|
|
91
|
-
* This method is not available in the caching modules.
|
|
92
|
-
*/
|
|
93
|
-
load: (...args) => lruCache.load(...args),
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
exports.memoryStore = memoryStore;
|
|
97
|
-
//# sourceMappingURL=memory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/stores/memory.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"program":{"fileNames":["../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es5.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2022.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2023.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.esnext.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/.pnpm/typescript@5.1.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/.pnpm/lru-cache@9.1.2/node_modules/lru-cache/dist/cjs/index.d.ts","../node_modules/.pnpm/@types+lodash@4.14.195/node_modules/@types/lodash/common/common.d.ts","../node_modules/.pnpm/@types+lodash@4.14.195/node_modules/@types/lodash/common/array.d.ts","../node_modules/.pnpm/@types+lodash@4.14.195/node_modules/@types/lodash/common/collection.d.ts","../node_modules/.pnpm/@types+lodash@4.14.195/node_modules/@types/lodash/common/date.d.ts","../node_modules/.pnpm/@types+lodash@4.14.195/node_modules/@types/lodash/common/function.d.ts","../node_modules/.pnpm/@types+lodash@4.14.195/node_modules/@types/lodash/common/lang.d.ts","../node_modules/.pnpm/@types+lodash@4.14.195/node_modules/@types/lodash/common/math.d.ts","../node_modules/.pnpm/@types+lodash@4.14.195/node_modules/@types/lodash/common/number.d.ts","../node_modules/.pnpm/@types+lodash@4.14.195/node_modules/@types/lodash/common/object.d.ts","../node_modules/.pnpm/@types+lodash@4.14.195/node_modules/@types/lodash/common/seq.d.ts","../node_modules/.pnpm/@types+lodash@4.14.195/node_modules/@types/lodash/common/string.d.ts","../node_modules/.pnpm/@types+lodash@4.14.195/node_modules/@types/lodash/common/util.d.ts","../node_modules/.pnpm/@types+lodash@4.14.195/node_modules/@types/lodash/index.d.ts","../node_modules/.pnpm/@types+lodash.clonedeep@4.5.7/node_modules/@types/lodash.clonedeep/index.d.ts","../src/stores/memory.ts","../src/stores/index.ts","../src/caching.ts","../src/multi-caching.ts","../src/index.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/assert.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/assert/strict.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/globals.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/async_hooks.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/buffer.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/child_process.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/cluster.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/console.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/constants.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/crypto.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/dgram.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/dns.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/dns/promises.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/domain.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/dom-events.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/events.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/fs.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/fs/promises.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/http.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/http2.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/https.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/inspector.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/module.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/net.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/os.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/path.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/perf_hooks.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/process.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/punycode.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/querystring.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/readline.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/readline/promises.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/repl.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/stream.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/stream/promises.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/stream/consumers.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/stream/web.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/string_decoder.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/test.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/timers.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/timers/promises.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/tls.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/trace_events.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/tty.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/url.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/util.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/v8.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/vm.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/wasi.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/worker_threads.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/zlib.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/globals.global.d.ts","../node_modules/.pnpm/@types+node@20.3.1/node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec",{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"16a656bffe97ecd61893b2557b62ba9c9c500511a7c238ef6c2dd94f1ceb97d2","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","458111fc89d11d2151277c822dfdc1a28fa5b6b2493cf942e37d4cd0a6ee5f22","19c816167e076e7c24f074389c6cf3ed87bdbb917d1ea439ca281f9d26db2439","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","febf0b2de54781102b00f61653b21377390a048fbf5262718c91860d11ff34a6","98f9d826db9cd99d27a01a59ee5f22863df00ccf1aaf43e1d7db80ebf716f7c3","0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","dcd91d3b697cb650b95db5471189b99815af5db2a1cd28760f91e0b12ede8ed5","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3cf0d343c2276842a5b617f22ba82af6322c7cfe8bb52238ffc0c491a3c21019","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9",{"version":"f2eff8704452659641164876c1ef0df4174659ce7311b0665798ea3f556fa9ad","affectsGlobalScope":true},"1ecdcf09ff556c7be88a5969071d09fdf173da75b7502ee2ae3d368b0e33a87f",{"version":"7eaf43ecde50ae3c52e0db304d497ec6a7509e8d999819f4457ea92c15fe6767","signature":"12afd4c64cd7e443626b3633d74d57331478372addbb060a04f97587bcb8d276"},"3d989d2dc4d3a3c297f5c31115963026a481e7ecc54f0e356b3bbebededdc50a",{"version":"40b6f02bbc4f1c0609f102238438dfd28eb7d21cd2826544deed046fea3ee60c","signature":"3042e8d01db2d7ff1d68631f1ce3bc9d951c744b930bbca718fa0a6f4568df93"},{"version":"c0d4dd74eb038787b587e2741293bcadcebc3705bad5d2820ac13dd8dc4238a5","signature":"341ed35aafffc2d36fd8cac57eccb90f7cf5230181d3f54d9480b42e33e377ec"},"4489f8f01affdc619f5893de6db5d21f594603addb6329d2cbdb2453d2837879","587f13f1e8157bd8cec0adda0de4ef558bb8573daa9d518d1e2af38e87ecc91f","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"bce910d9164785c9f0d4dcea4be359f5f92130c7c7833dea6138ab1db310a1f9","affectsGlobalScope":true},"7a435e0c814f58f23e9a0979045ec0ef5909aac95a70986e8bcce30c27dff228",{"version":"a7534271773a27ff7d136d550e86b41894d8090fa857ba4c02b5bb18d2eb1c8e","affectsGlobalScope":true},"db71be322f07f769200108aa19b79a75dd19a187c9dca2a30c4537b233aa2863","57135ce61976a8b1dadd01bb412406d1805b90db6e8ecb726d0d78e0b5f76050",{"version":"49479e21a040c0177d1b1bc05a124c0383df7a08a0726ad4d9457619642e875a","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","b8e431e9b9bb2dc832b23d4e3e02774e953d5537998923f215ea446169e9a61e","3690133deae19c8127c5505fcb67b04bdc9eb053796008538a9b9abbb70d85aa","5b1c0a23f464f894e7c2b2b6c56df7b9afa60ed48c5345f8618d389a636b2108","be2b092f2765222757c6441b86c53a5ea8dfed47bbc43eab4c5fe37942c866b3","8e6b05abc98adba15e1ac78e137c64576c74002e301d682e66feb77a23907ab8","1ca735bb3d407b2af4fbee7665f3a0a83be52168c728cc209755060ba7ed67bd",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"b85c02e14ecb2a873dad5a1de72319b265160ba48f1b83661aeb3bba1366c1bc","affectsGlobalScope":true},"7a2ba0c9af860ac3e77b35ed01fd96d15986f17aa22fe40f188ae556fb1070df","fc3764040518a1008dd04bdc80964591b566b896283e00df85c95851c1f46237","55709608060f77965c270ac10ac646286589f1bd1cb174fff1778a2dd9a7ef31","790623a47c5eda62910098884ecb154dc0e5f3a23fc36c1bfb3b5b9ed44e2c2d","42b40e40f2a358cda332456214fad311e1806a6abf3cebaaac72496e07556642","354612fe1d49ecc9551ea3a27d94eef2887b64ef4a71f72ca444efe0f2f0ba80",{"version":"125af9d85cb9d5e508353f10a8d52f01652d2d48b2cea54789a33e5b4d289c1c","affectsGlobalScope":true},"f5490f53d40291cc8607f5463434d1ac6c5564bc4fbb03abceb03a8f6b014457","5e2b91328a540a0933ab5c2203f4358918e6f0fe7505d22840a891a6117735f1","3abc3512fa04aa0230f59ea1019311fd8667bd935d28306311dccc8b17e79d5d",{"version":"14a50dafe3f45713f7f27cb6320dff07c6ac31678f07959c2134260061bf91ff","affectsGlobalScope":true},{"version":"19da7150ca062323b1db6311a6ef058c9b0a39cc64d836b5e9b75d301869653b","affectsGlobalScope":true},"1349077576abb41f0e9c78ec30762ff75b710208aff77f5fdcc6a8c8ce6289dd","e2ce82603102b5c0563f59fb40314cc1ff95a4d521a66ad14146e130ea80d89c","a3e0395220255a350aa9c6d56f882bfcb5b85c19fddf5419ec822cf22246a26d","c27b01e8ddff5cd280711af5e13aecd9a3228d1c256ea797dd64f8fdec5f7df5","898840e876dfd21843db9f2aa6ae38ba2eab550eb780ff62b894b9fbfebfae6b","0cab4d7d4edc40cd3af9eea7c3ed6d1016910c0954c49c4297e479bf3822a625","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","785e5be57d4f20f290a20e7b0c6263f6c57fd6e51283050756cef07d6d651c68","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","164deb2409ac5f4da3cd139dbcee7f7d66753d90363a4d7e2db8d8874f272270","1fb6c5ec52332a8b531a8d7a5300ac9301f98c4fe62f68e744e0841ccba65e7e",{"version":"ab294c4b7279318ee2a8fdf681305457ecc05970c94108d304933f18823eeac1","affectsGlobalScope":true},"ad08154d9602429522cac965a715fde27d421d69b24756c5d291877dda75353e","bbda6ea452a2386093a1eda18a6e26a989e98869f1b9f37e46f510a986d2e740","812b25f798033c202baedf386a1ccc41f9191b122f089bffd10fdccce99fba11","993325544790073f77e945bee046d53988c0bc3ac5695c9cf8098166feb82661",{"version":"75dd741ca6a6c8d2437a6ca8349b64b816421dbf9fe82dd026afaba965576962","affectsGlobalScope":true},{"version":"8799401a7ab57764f0d464513a7fa7c72e1d70a226b172ec60fff534ea94d108","affectsGlobalScope":true},"2ce2210032ccaff7710e2abf6a722e62c54960458e73e356b6a365c93ab6ca66","92db194ef7d208d5e4b6242a3434573fd142a621ff996d84cc9dbba3553277d0","16a3080e885ed52d4017c902227a8d0d8daf723d062bec9e45627c6fdcd6699b",{"version":"0bd9543cd8fc0959c76fb8f4f5a26626c2ed62ef4be98fd857bce268066db0a2","affectsGlobalScope":true},"1ca6858a0cbcd74d7db72d7b14c5360a928d1d16748a55ecfa6bfaff8b83071b",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"247aa3419c98713231952b33801d4f46563fe542e03604acd8c63ac45a32409c"],"root":[[75,79]],"options":{"declaration":true,"downlevelIteration":true,"esModuleInterop":true,"module":1,"outDir":"./","sourceMap":true,"strict":true,"target":2},"fileIdsList":[[73,126],[61,63,64,65,66,67,68,69,70,71,72,73,126],[61,62,64,65,66,67,68,69,70,71,72,73,126],[62,63,64,65,66,67,68,69,70,71,72,73,126],[61,62,63,65,66,67,68,69,70,71,72,73,126],[61,62,63,64,66,67,68,69,70,71,72,73,126],[61,62,63,64,65,67,68,69,70,71,72,73,126],[61,62,63,64,65,66,68,69,70,71,72,73,126],[61,62,63,64,65,66,67,69,70,71,72,73,126],[61,62,63,64,65,66,67,68,70,71,72,73,126],[61,62,63,64,65,66,67,68,69,71,72,73,126],[61,62,63,64,65,66,67,68,69,70,72,73,126],[61,62,63,64,65,66,67,68,69,70,71,73,126],[61,62,63,64,65,66,67,68,69,70,71,72,126],[80,126],[83,126],[84,89,117,126],[85,96,97,104,114,125,126],[85,86,96,104,126],[87,126],[88,89,97,105,126],[89,114,122,126],[90,92,96,104,126],[91,126],[92,93,126],[96,126],[94,96,126],[96,97,98,114,125,126],[96,97,98,111,114,117,126],[126,130],[126],[92,96,99,104,114,125,126],[96,97,99,100,104,114,122,125,126],[99,101,114,122,125,126],[80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132],[96,102,126],[103,125,126],[92,96,104,114,126],[105,126],[106,126],[83,107,126],[108,124,126,130],[109,126],[110,126],[96,111,112,126],[111,113,126,128],[84,96,114,115,116,117,126],[84,114,116,126],[114,115,126],[117,126],[118,126],[114,126],[96,120,121,126],[120,121,126],[89,104,114,122,126],[123,126],[104,124,126],[84,99,110,125,126],[89,126],[114,126,127],[126,128],[126,129],[84,89,96,98,107,114,125,126,128,130],[114,126,131],[76,126],[76,77,78,126],[77,126],[75,126],[60,74,77,126],[76],[77],[60,77]],"referencedMap":[[74,1],[62,2],[63,3],[61,4],[64,5],[65,6],[66,7],[67,8],[68,9],[69,10],[70,11],[71,12],[72,13],[73,14],[80,15],[81,15],[83,16],[84,17],[85,18],[86,19],[87,20],[88,21],[89,22],[90,23],[91,24],[92,25],[93,25],[95,26],[94,27],[96,26],[97,28],[98,29],[82,30],[132,31],[99,32],[100,33],[101,34],[133,35],[102,36],[103,37],[104,38],[105,39],[106,40],[107,41],[108,42],[109,43],[110,44],[111,45],[112,45],[113,46],[114,47],[116,48],[115,49],[117,50],[118,51],[119,52],[120,53],[121,54],[122,55],[123,56],[124,57],[125,58],[126,59],[127,60],[128,61],[129,62],[130,63],[131,64],[60,31],[58,31],[59,31],[13,31],[12,31],[2,31],[14,31],[15,31],[16,31],[17,31],[18,31],[19,31],[20,31],[21,31],[3,31],[4,31],[25,31],[22,31],[23,31],[24,31],[26,31],[27,31],[28,31],[5,31],[29,31],[30,31],[31,31],[32,31],[6,31],[36,31],[33,31],[34,31],[35,31],[37,31],[7,31],[38,31],[43,31],[44,31],[39,31],[40,31],[41,31],[42,31],[8,31],[48,31],[45,31],[46,31],[47,31],[49,31],[9,31],[50,31],[51,31],[52,31],[55,31],[53,31],[54,31],[56,31],[10,31],[1,31],[11,31],[57,31],[77,65],[79,66],[78,67],[76,68],[75,69]],"exportedModulesMap":[[74,1],[62,2],[63,3],[61,4],[64,5],[65,6],[66,7],[67,8],[68,9],[69,10],[70,11],[71,12],[72,13],[73,14],[80,15],[81,15],[83,16],[84,17],[85,18],[86,19],[87,20],[88,21],[89,22],[90,23],[91,24],[92,25],[93,25],[95,26],[94,27],[96,26],[97,28],[98,29],[82,30],[132,31],[99,32],[100,33],[101,34],[133,35],[102,36],[103,37],[104,38],[105,39],[106,40],[107,41],[108,42],[109,43],[110,44],[111,45],[112,45],[113,46],[114,47],[116,48],[115,49],[117,50],[118,51],[119,52],[120,53],[121,54],[122,55],[123,56],[124,57],[125,58],[126,59],[127,60],[128,61],[129,62],[130,63],[131,64],[60,31],[58,31],[59,31],[13,31],[12,31],[2,31],[14,31],[15,31],[16,31],[17,31],[18,31],[19,31],[20,31],[21,31],[3,31],[4,31],[25,31],[22,31],[23,31],[24,31],[26,31],[27,31],[28,31],[5,31],[29,31],[30,31],[31,31],[32,31],[6,31],[36,31],[33,31],[34,31],[35,31],[37,31],[7,31],[38,31],[43,31],[44,31],[39,31],[40,31],[41,31],[42,31],[8,31],[48,31],[45,31],[46,31],[47,31],[49,31],[9,31],[50,31],[51,31],[52,31],[55,31],[53,31],[54,31],[56,31],[10,31],[1,31],[11,31],[57,31],[77,70],[79,66],[78,71],[76,68],[75,72]],"semanticDiagnosticsPerFile":[74,62,63,61,64,65,66,67,68,69,70,71,72,73,80,81,83,84,85,86,87,88,89,90,91,92,93,95,94,96,97,98,82,132,99,100,101,133,102,103,104,105,106,107,108,109,110,111,112,113,114,116,115,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,60,58,59,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,55,53,54,56,10,1,11,57,77,79,78,76,75]},"version":"5.1.3"}
|