express-sweet-generator 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [1.0.4] - 2022-05-18
5
+ ### Fixed
6
+ - Version 1.0.18 of express-sweet now supports redis as session store for authentication, so we have added the relevant options (session_store, redis_host) to the authentication configuration of the template.
7
+
4
8
  ## [1.0.3] - 2022-05-17
5
9
  ### Fixed
6
10
  - Fix UX of template views.
@@ -28,4 +32,5 @@ All notable changes to this project will be documented in this file.
28
32
 
29
33
  [1.0.1]: https://github.com/takuya-motoshima/express-sweet-generator/compare/v1.0.0...v1.0.1
30
34
  [1.0.2]: https://github.com/takuya-motoshima/express-sweet-generator/compare/v1.0.1...v1.0.2
31
- [1.0.3]: https://github.com/takuya-motoshima/express-sweet-generator/compare/v1.0.2...v1.0.3
35
+ [1.0.3]: https://github.com/takuya-motoshima/express-sweet-generator/compare/v1.0.2...v1.0.3
36
+ [1.0.4]: https://github.com/takuya-motoshima/express-sweet-generator/compare/v1.0.3...v1.0.4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-sweet-generator",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Express Sweet application generator.",
5
5
  "main": "bin/express-sweet-cli.js",
6
6
  "files": [
@@ -1,6 +1,5 @@
1
1
  const UserModel = require('../models/UserModel');
2
2
 
3
-
4
3
  /**
5
4
  * User authentication configuration interface.
6
5
  */
@@ -11,6 +10,21 @@ module.exports = {
11
10
  */
12
11
  enabled: true,
13
12
 
13
+ /**
14
+ * The session store instance, defaults to a new MemoryStore(memory) instance.
15
+ * @type {'memory|redis'}
16
+ */
17
+ session_store: 'memory',
18
+
19
+ /**
20
+ * If the session is stored in "redis", this field is required and should be set to the hostname of the Redis server.
21
+ * For example, to connect to redis on localhost on port 6379, set "redis://localhost:6379".
22
+ * To connect to a different host or port, use a connection string in the format "redis[s]://[[username][:password]@][host][:port][/db-number]".
23
+ * For example, "redis://alice:foobared@awesome.redis.server:6380".
24
+ * @type {string|undefined}
25
+ */
26
+ redis_host: undefined,
27
+
14
28
  /**
15
29
  * Authentication user ID field name, defaults to `username`.
16
30
  * @type {string}
@@ -10,6 +10,21 @@ export default {
10
10
  */
11
11
  enabled: true,
12
12
 
13
+ /**
14
+ * The session store instance, defaults to a new MemoryStore(memory) instance.
15
+ * @type {'memory|redis'}
16
+ */
17
+ session_store: 'memory',
18
+
19
+ /**
20
+ * If the session is stored in "redis", this field is required and should be set to the hostname of the Redis server.
21
+ * For example, to connect to redis on localhost on port 6379, set "redis://localhost:6379".
22
+ * To connect to a different host or port, use a connection string in the format "redis[s]://[[username][:password]@][host][:port][/db-number]".
23
+ * For example, "redis://alice:foobared@awesome.redis.server:6380".
24
+ * @type {string|undefined}
25
+ */
26
+ redis_host: undefined,
27
+
13
28
  /**
14
29
  * Authentication user ID field name, defaults to `username`.
15
30
  * @type {string}