Initial Save
This commit is contained in:
17
node_modules/apollo-server-caching/dist/InMemoryLRUCache.d.ts
generated
vendored
Normal file
17
node_modules/apollo-server-caching/dist/InMemoryLRUCache.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { TestableKeyValueCache } from './KeyValueCache';
|
||||
export declare class InMemoryLRUCache<V = string> implements TestableKeyValueCache<V> {
|
||||
private store;
|
||||
constructor({ maxSize, sizeCalculator, onDispose, }?: {
|
||||
maxSize?: number;
|
||||
sizeCalculator?: (value: V, key: string) => number;
|
||||
onDispose?: (key: string, value: V) => void;
|
||||
});
|
||||
get(key: string): Promise<V | undefined>;
|
||||
set(key: string, value: V, options?: {
|
||||
ttl?: number;
|
||||
}): Promise<void>;
|
||||
delete(key: string): Promise<void>;
|
||||
flush(): Promise<void>;
|
||||
getTotalSize(): Promise<number>;
|
||||
}
|
||||
//# sourceMappingURL=InMemoryLRUCache.d.ts.map
|
||||
1
node_modules/apollo-server-caching/dist/InMemoryLRUCache.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-server-caching/dist/InMemoryLRUCache.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"InMemoryLRUCache.d.ts","sourceRoot":"","sources":["../src/InMemoryLRUCache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAYxD,qBAAa,gBAAgB,CAAC,CAAC,GAAG,MAAM,CAAE,YAAW,qBAAqB,CAAC,CAAC,CAAC;IAC3E,OAAO,CAAC,KAAK,CAAsB;gBAGvB,EACV,OAAkB,EAClB,cAAyC,EACzC,SAAS,GACV,GAAE;QACD,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;QACnD,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;KACxC;IAQA,GAAG,CAAC,GAAG,EAAE,MAAM;IAGf,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE;IAIrD,MAAM,CAAC,GAAG,EAAE,MAAM;IAMlB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAGtB,YAAY;CAGnB"}
|
||||
59
node_modules/apollo-server-caching/dist/InMemoryLRUCache.js
generated
vendored
Normal file
59
node_modules/apollo-server-caching/dist/InMemoryLRUCache.js
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.InMemoryLRUCache = void 0;
|
||||
const lru_cache_1 = __importDefault(require("lru-cache"));
|
||||
function defaultLengthCalculation(item) {
|
||||
if (Array.isArray(item) || typeof item === 'string') {
|
||||
return item.length;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
class InMemoryLRUCache {
|
||||
constructor({ maxSize = Infinity, sizeCalculator = defaultLengthCalculation, onDispose, } = {}) {
|
||||
this.store = new lru_cache_1.default({
|
||||
max: maxSize,
|
||||
length: sizeCalculator,
|
||||
dispose: onDispose,
|
||||
});
|
||||
}
|
||||
get(key) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return this.store.get(key);
|
||||
});
|
||||
}
|
||||
set(key, value, options) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const maxAge = options && options.ttl && options.ttl * 1000;
|
||||
this.store.set(key, value, maxAge);
|
||||
});
|
||||
}
|
||||
delete(key) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
this.store.del(key);
|
||||
});
|
||||
}
|
||||
flush() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
this.store.reset();
|
||||
});
|
||||
}
|
||||
getTotalSize() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return this.store.length;
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.InMemoryLRUCache = InMemoryLRUCache;
|
||||
//# sourceMappingURL=InMemoryLRUCache.js.map
|
||||
1
node_modules/apollo-server-caching/dist/InMemoryLRUCache.js.map
generated
vendored
Normal file
1
node_modules/apollo-server-caching/dist/InMemoryLRUCache.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"InMemoryLRUCache.js","sourceRoot":"","sources":["../src/InMemoryLRUCache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0DAAiC;AAGjC,SAAS,wBAAwB,CAAC,IAAS;IACzC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QACnD,OAAO,IAAI,CAAC,MAAM,CAAC;KACpB;IAID,OAAO,CAAC,CAAC;AACX,CAAC;AAED,MAAa,gBAAgB;IAI3B,YAAY,EACV,OAAO,GAAG,QAAQ,EAClB,cAAc,GAAG,wBAAwB,EACzC,SAAS,MAKP,EAAE;QACJ,IAAI,CAAC,KAAK,GAAG,IAAI,mBAAQ,CAAC;YACxB,GAAG,EAAE,OAAO;YACZ,MAAM,EAAE,cAAc;YACtB,OAAO,EAAE,SAAS;SACnB,CAAC,CAAC;IACL,CAAC;IAEK,GAAG,CAAC,GAAW;;YACnB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC;KAAA;IACK,GAAG,CAAC,GAAW,EAAE,KAAQ,EAAE,OAA0B;;YACzD,MAAM,MAAM,GAAG,OAAO,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC;YAC5D,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACrC,CAAC;KAAA;IACK,MAAM,CAAC,GAAW;;YACtB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACtB,CAAC;KAAA;IAIK,KAAK;;YACT,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC;KAAA;IACK,YAAY;;YAChB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;QAC3B,CAAC;KAAA;CACF;AAvCD,4CAuCC"}
|
||||
13
node_modules/apollo-server-caching/dist/KeyValueCache.d.ts
generated
vendored
Normal file
13
node_modules/apollo-server-caching/dist/KeyValueCache.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
export interface KeyValueCacheSetOptions {
|
||||
ttl?: number | null;
|
||||
}
|
||||
export interface KeyValueCache<V = string> {
|
||||
get(key: string): Promise<V | undefined>;
|
||||
set(key: string, value: V, options?: KeyValueCacheSetOptions): Promise<void>;
|
||||
delete(key: string): Promise<boolean | void>;
|
||||
}
|
||||
export interface TestableKeyValueCache<V = string> extends KeyValueCache<V> {
|
||||
flush?(): Promise<void>;
|
||||
close?(): Promise<void>;
|
||||
}
|
||||
//# sourceMappingURL=KeyValueCache.d.ts.map
|
||||
1
node_modules/apollo-server-caching/dist/KeyValueCache.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-server-caching/dist/KeyValueCache.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"KeyValueCache.d.ts","sourceRoot":"","sources":["../src/KeyValueCache.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,uBAAuB;IAKtC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,MAAM;IACvC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IACzC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7E,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,aAAa,CAAC,CAAC,CAAC;IAIzE,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAExB,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB"}
|
||||
4
node_modules/apollo-server-caching/dist/KeyValueCache.js
generated
vendored
Normal file
4
node_modules/apollo-server-caching/dist/KeyValueCache.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
;
|
||||
//# sourceMappingURL=KeyValueCache.js.map
|
||||
1
node_modules/apollo-server-caching/dist/KeyValueCache.js.map
generated
vendored
Normal file
1
node_modules/apollo-server-caching/dist/KeyValueCache.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"KeyValueCache.js","sourceRoot":"","sources":["../src/KeyValueCache.ts"],"names":[],"mappings":";;AAOC,CAAC"}
|
||||
10
node_modules/apollo-server-caching/dist/PrefixingKeyValueCache.d.ts
generated
vendored
Normal file
10
node_modules/apollo-server-caching/dist/PrefixingKeyValueCache.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { KeyValueCache, KeyValueCacheSetOptions } from './KeyValueCache';
|
||||
export declare class PrefixingKeyValueCache<V = string> implements KeyValueCache<V> {
|
||||
private wrapped;
|
||||
private prefix;
|
||||
constructor(wrapped: KeyValueCache<V>, prefix: string);
|
||||
get(key: string): Promise<V | undefined>;
|
||||
set(key: string, value: V, options?: KeyValueCacheSetOptions): Promise<void>;
|
||||
delete(key: string): Promise<boolean | void>;
|
||||
}
|
||||
//# sourceMappingURL=PrefixingKeyValueCache.d.ts.map
|
||||
1
node_modules/apollo-server-caching/dist/PrefixingKeyValueCache.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-server-caching/dist/PrefixingKeyValueCache.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"PrefixingKeyValueCache.d.ts","sourceRoot":"","sources":["../src/PrefixingKeyValueCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAYzE,qBAAa,sBAAsB,CAAC,CAAC,GAAG,MAAM,CAAE,YAAW,aAAa,CAAC,CAAC,CAAC;IAC7D,OAAO,CAAC,OAAO;IAAoB,OAAO,CAAC,MAAM;gBAAzC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,EAAU,MAAM,EAAE,MAAM;IAErE,GAAG,CAAC,GAAG,EAAE,MAAM;IAGf,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,uBAAuB;IAG5D,MAAM,CAAC,GAAG,EAAE,MAAM;CAGnB"}
|
||||
20
node_modules/apollo-server-caching/dist/PrefixingKeyValueCache.js
generated
vendored
Normal file
20
node_modules/apollo-server-caching/dist/PrefixingKeyValueCache.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PrefixingKeyValueCache = void 0;
|
||||
class PrefixingKeyValueCache {
|
||||
constructor(wrapped, prefix) {
|
||||
this.wrapped = wrapped;
|
||||
this.prefix = prefix;
|
||||
}
|
||||
get(key) {
|
||||
return this.wrapped.get(this.prefix + key);
|
||||
}
|
||||
set(key, value, options) {
|
||||
return this.wrapped.set(this.prefix + key, value, options);
|
||||
}
|
||||
delete(key) {
|
||||
return this.wrapped.delete(this.prefix + key);
|
||||
}
|
||||
}
|
||||
exports.PrefixingKeyValueCache = PrefixingKeyValueCache;
|
||||
//# sourceMappingURL=PrefixingKeyValueCache.js.map
|
||||
1
node_modules/apollo-server-caching/dist/PrefixingKeyValueCache.js.map
generated
vendored
Normal file
1
node_modules/apollo-server-caching/dist/PrefixingKeyValueCache.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"PrefixingKeyValueCache.js","sourceRoot":"","sources":["../src/PrefixingKeyValueCache.ts"],"names":[],"mappings":";;;AAYA,MAAa,sBAAsB;IACjC,YAAoB,OAAyB,EAAU,MAAc;QAAjD,YAAO,GAAP,OAAO,CAAkB;QAAU,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAEzE,GAAG,CAAC,GAAW;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC;IAC7C,CAAC;IACD,GAAG,CAAC,GAAW,EAAE,KAAQ,EAAE,OAAiC;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IACD,MAAM,CAAC,GAAW;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC;IAChD,CAAC;CACF;AAZD,wDAYC"}
|
||||
4
node_modules/apollo-server-caching/dist/index.d.ts
generated
vendored
Normal file
4
node_modules/apollo-server-caching/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export { KeyValueCache, TestableKeyValueCache, KeyValueCacheSetOptions, } from './KeyValueCache';
|
||||
export { InMemoryLRUCache } from './InMemoryLRUCache';
|
||||
export { PrefixingKeyValueCache } from './PrefixingKeyValueCache';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/apollo-server-caching/dist/index.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-server-caching/dist/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
||||
7
node_modules/apollo-server-caching/dist/index.js
generated
vendored
Normal file
7
node_modules/apollo-server-caching/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var InMemoryLRUCache_1 = require("./InMemoryLRUCache");
|
||||
Object.defineProperty(exports, "InMemoryLRUCache", { enumerable: true, get: function () { return InMemoryLRUCache_1.InMemoryLRUCache; } });
|
||||
var PrefixingKeyValueCache_1 = require("./PrefixingKeyValueCache");
|
||||
Object.defineProperty(exports, "PrefixingKeyValueCache", { enumerable: true, get: function () { return PrefixingKeyValueCache_1.PrefixingKeyValueCache; } });
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/apollo-server-caching/dist/index.js.map
generated
vendored
Normal file
1
node_modules/apollo-server-caching/dist/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAKA,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA"}
|
||||
Reference in New Issue
Block a user