Initialisation

Added the packages and files for the backend server
This commit is contained in:
jackbeeby
2024-12-15 17:48:45 +11:00
parent 25066e1ee8
commit b412dfe2ca
2732 changed files with 330572 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ErrorsAreMissesCache = void 0;
class ErrorsAreMissesCache {
constructor(cache, logger) {
this.cache = cache;
this.logger = logger;
}
async get(key) {
try {
return await this.cache.get(key);
}
catch (e) {
if (this.logger) {
if (e instanceof Error) {
this.logger.error(e.message);
}
else {
this.logger.error(e);
}
}
return undefined;
}
}
async set(key, value, opts) {
return this.cache.set(key, value, opts);
}
async delete(key) {
return this.cache.delete(key);
}
}
exports.ErrorsAreMissesCache = ErrorsAreMissesCache;
//# sourceMappingURL=ErrorsAreMissesCache.js.map