Repository URL to install this package:
|
Version:
2.0.0-beta.20 ▾
|
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @description this is because memory store will leak memory
* @todo this api sucks
* @todo this is a YAGNI along with all of session
* MAYBE it will be helpful wit jwt
* if it doesn't impact then fine
* but otherwise it should only
* be a middleware checking a cookie
*
*
* @see https://www.npmjs.com/package/session-file-store
* @see https://github.com/roccomuso/memorystore/blob/master/lib/memorystore.js
* @see https://github.com/expressjs/session#compatible-session-stores
*
* @api @type https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/express-session/index.d.ts
*/
function sessionStore(session) {
var Store = session.Store;
var SessionStore = /** @class */ (function (_super) {
__extends(SessionStore, _super);
function SessionStore(options) {
if (options === void 0) { options = {}; }
var _this = _super.call(this, options) || this;
_this.options = options;
return _this;
}
SessionStore.prototype.get = function (sessionId, callback) {
//
};
SessionStore.prototype.set = function (sessionId, session, callback) {
//
};
SessionStore.prototype.touch = function (sessionId, session, callback) {
// if it exists
};
SessionStore.prototype.destroy = function (sessionId, callback) {
// remove session
};
SessionStore.prototype.length = function (callback) {
// number of sessions
};
SessionStore.prototype.clear = function (callback) {
// clear all sessions
};
SessionStore.prototype.list = function (callback) {
// all
};
SessionStore.prototype.expired = function (sessionId, callback) {
// @alias isExpired
};
return SessionStore;
}(Store));
return Store;
}
//# sourceMappingURL=SessionStore.js.map