bamei-module-express-session-file
Advanced tools
Comparing version 0.0.5 to 0.0.6
29
index.js
@@ -9,5 +9,16 @@ 'use strict'; | ||
const initExpressSessionModule = require('bamei-module-express-session'); | ||
const FileStore = require('session-file-store')(initExpressSessionModule.session); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const initExpressSessionModule = require('bamei-module-express-session').init; | ||
const session = require('bamei-module-express-session').session; | ||
const FileStore = require('session-file-store')(session); | ||
// 版本号 | ||
exports.version = JSON.parse(fs.readFileSync(path.resolve(__dirname, 'package.json')).toString()).version; | ||
// 依赖模块 | ||
exports.dependencies = { | ||
'express': '*', | ||
}; | ||
/** | ||
@@ -20,7 +31,4 @@ * 配置: | ||
*/ | ||
module.exports = function initExpressSessionFileModule(ref, config, done) { | ||
// 默认配置 | ||
// eslint-disable-next-line | ||
config = Object.assign({ | ||
exports.config = function fillDefaultConfig(config) { | ||
return Object.assign({ | ||
resave: true, | ||
@@ -31,2 +39,9 @@ saveUninitialized: true, | ||
}, config); | ||
}; | ||
exports.init = function initExpressSessionFileModule(ref, config, done) { | ||
// 默认配置 | ||
// eslint-disable-next-line | ||
config = exports.config.call(this, config); | ||
this.getLogger('init').info('initExpressSessionFileModule config: %j', config); | ||
@@ -33,0 +48,0 @@ |
{ | ||
"name": "bamei-module-express-session-file", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "module-express-session-file", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
2057
40
1