connect-session-knex
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -32,3 +32,3 @@ /* eslint-disable func-names */ | ||
*/ | ||
function dbCleanup(store, interval, KnexStore) { | ||
function dbCleanup(store, interval, KnexStore, errorCallback) { | ||
return store.ready | ||
@@ -48,2 +48,3 @@ .then(() => { | ||
}) | ||
.catch(errorCallback) | ||
.finally(() => { | ||
@@ -57,2 +58,3 @@ // eslint-disable-next-line no-param-reassign | ||
KnexStore, | ||
errorCallback, | ||
).unref(); | ||
@@ -140,3 +142,3 @@ }); | ||
if (exists && !options.disableDbCleanup) { | ||
dbCleanup(self, options.clearInterval, KnexStore); | ||
dbCleanup(self, options.clearInterval, KnexStore, options.onDbCleanupError); | ||
} | ||
@@ -143,0 +145,0 @@ return null; |
{ | ||
"name": "connect-session-knex", | ||
"description": "A knex.js session store for Express and Connect", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"main": "lib/index.js", | ||
@@ -30,3 +30,3 @@ "typings": "typings/index.d.ts", | ||
"bluebird": "^3.7.2", | ||
"knex": "^0.95.6" | ||
"knex": "^1.0.2" | ||
}, | ||
@@ -33,0 +33,0 @@ "devDependencies": { |
@@ -7,6 +7,2 @@ # Connect Session Knex | ||
[![Node.js Version][node-image]][node-url] | ||
[![Build Status][travis-image]][travis-url] | ||
[![Dependency Status][dependencies-image]][dependencies-url] | ||
[![Coverage Status][coveralls-image]][coveralls-url] | ||
[![NPM][npm-image]][npm-url] | ||
@@ -28,7 +24,7 @@ | ||
[Example application using the defaults](https://github.com/llambda/connect-session-knex/blob/master/examples/example.js) | ||
[Example application using the defaults](https://github.com/gx0r/connect-session-knex/blob/master/examples/example.js) | ||
[Example application with PostgreSQL](https://github.com/llambda/connect-session-knex/blob/master/examples/example-postgres.js) | ||
[Example application with PostgreSQL](https://github.com/gx0r/connect-session-knex/blob/master/examples/example-postgres.js) | ||
[With Express 3 or Connect](https://github.com/llambda/connect-session-knex/blob/master/Oldversions.md) | ||
[With Express 3 or Connect](https://github.com/gx0r/connect-session-knex/blob/master/Oldversions.md) | ||
@@ -67,3 +63,3 @@ ## Options | ||
[https://github.com/llambda/express-session-benchmarks](https://github.com/llambda/express-session-benchmarks) | ||
[https://github.com/gx0r/express-session-benchmarks](https://github.com/gx0r/express-session-benchmarks) | ||
@@ -74,14 +70,6 @@ [npm-version-image]: https://img.shields.io/npm/v/connect-session-knex.svg | ||
[npm-url]: https://npmjs.org/package/connect-session-knex | ||
[travis-image]: https://img.shields.io/travis/llambda/connect-session-knex/master.svg | ||
[travis-url]: https://travis-ci.org/llambda/connect-session-knex | ||
[dependencies-image]: https://david-dm.org/llambda/connect-session-knex.svg?style=flat | ||
[dependencies-url]: https://david-dm.org/llambda/connect-session-knex | ||
[coveralls-image]: https://img.shields.io/coveralls/llambda/connect-session-knex/master.svg | ||
[coveralls-url]: https://coveralls.io/r/llambda/connect-session-knex?branch=master | ||
[travis-image]: https://img.shields.io/travis/gx0r/connect-session-knex/master.svg | ||
[travis-url]: https://travis-ci.org/gx0r/connect-session-knex | ||
[node-image]: https://img.shields.io/node/v/connect-session-knex.svg | ||
[node-url]: http://nodejs.org/download/ | ||
[gitter-join-chat-image]: https://badges.gitter.im/Join%20Chat.svg | ||
[gitter-channel-url]: https://gitter.im/llambda/connect-session-knex | ||
[express-session-url]: https://github.com/expressjs/session | ||
[io-url]: https://iojs.org | ||
@@ -88,0 +76,0 @@ ## Testing |
@@ -1,2 +0,2 @@ | ||
import { Knex } from 'knex'; | ||
import Knex from 'knex'; | ||
import expressSession, { Store } from 'express-session'; | ||
@@ -6,8 +6,9 @@ | ||
type ConfigType = { | ||
tablename?: string; | ||
sidfieldname?: string; | ||
knex?: Knex; | ||
createtable?: boolean; | ||
clearInterval?: number; | ||
disableDbCleanup?: boolean; | ||
tablename?: string; | ||
sidfieldname?: string; | ||
knex?: Knex; | ||
createtable?: boolean; | ||
clearInterval?: number; | ||
disableDbCleanup?: boolean; | ||
onDbCleanupError?: (error: Error) => void | ||
}; | ||
@@ -14,0 +15,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
592
21324
135
+ Addedcommander@9.5.0(transitive)
+ Addeddebug@4.3.4(transitive)
+ Addedget-package-type@0.1.0(transitive)
+ Addedgetopts@2.3.0(transitive)
+ Addedknex@1.0.7(transitive)
+ Addedrechoir@0.8.0(transitive)
- Removedcommander@7.2.0(transitive)
- Removeddebug@4.3.2(transitive)
- Removedgetopts@2.2.5(transitive)
- Removedknex@0.95.15(transitive)
- Removedrechoir@0.7.0(transitive)
Updatedknex@^1.0.2