fix npm run build

This commit is contained in:
Rayyan
2026-08-02 20:01:29 +07:00
parent 306c145f91
commit eb6031282a
236 changed files with 5557 additions and 47 deletions
+53
View File
@@ -0,0 +1,53 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.InMemoryRefreshStore = void 0;
const common_1 = require("@nestjs/common");
let InMemoryRefreshStore = class InMemoryRefreshStore {
map = new Map();
cleanupInterval;
constructor() {
this.cleanupInterval = setInterval(() => {
const now = Date.now();
for (const [k, v] of this.map.entries()) {
if (v.expiresAt <= now)
this.map.delete(k);
}
}, 60 * 1000);
}
async set(token, data, ttlSeconds) {
const expiresAt = Date.now() + ttlSeconds * 1000;
this.map.set(token, { userId: data.userId, expiresAt });
}
async get(token) {
const v = this.map.get(token);
if (!v)
return null;
if (v.expiresAt <= Date.now()) {
this.map.delete(token);
return null;
}
return { userId: v.userId };
}
async del(token) {
this.map.delete(token);
}
onModuleDestroy() {
if (this.cleanupInterval)
clearInterval(this.cleanupInterval);
}
};
exports.InMemoryRefreshStore = InMemoryRefreshStore;
exports.InMemoryRefreshStore = InMemoryRefreshStore = __decorate([
(0, common_1.Injectable)(),
__metadata("design:paramtypes", [])
], InMemoryRefreshStore);
//# sourceMappingURL=inmemory-refresh.store.js.map
@@ -0,0 +1 @@
{"version":3,"file":"inmemory-refresh.store.js","sourceRoot":"","sources":["../../../../src/modules/auth/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