not-node 6.5.42 → 6.5.44

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "not-node",
3
- "version": "6.5.42",
3
+ "version": "6.5.44",
4
4
  "description": "node complimentary part for client side notFramework.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -12,10 +12,10 @@ function postStartupInstructions(siteDir, config) {
12
12
  `For '${env}' environment exec while in project directory:`
13
13
  );
14
14
  console.log(
15
- `$ sudo cp nginx/${env}.conf to /var/nginx/sites-available/${config.hostname[env]}.conf`
15
+ `$ sudo cp nginx/${env}.conf /etc/nginx/sites-available/${config.hostname[env]}.conf`
16
16
  );
17
17
  console.log(
18
- `$ sudo ln -s /var/nginx/sites-available/${config.hostname[env]}.conf /var/nginx/sites-enabled/${config.hostname[env]}.conf`
18
+ `$ sudo ln -s /etc/nginx/sites-available/${config.hostname[env]}.conf /etc/nginx/sites-enabled/${config.hostname[env]}.conf`
19
19
  );
20
20
  }
21
21
  console.log("2. Restart NGINX server");
@@ -11,8 +11,29 @@ export default {
11
11
  pm2: {
12
12
  ifArgs: ["pm2"],
13
13
  },
14
- ".env": {
15
- tmpl: "project/env.ejs",
16
- args: ["init_root_user", "not_node_monitor", "not_node_reporter"],
14
+ ".envs": {
15
+ content: {
16
+ development: {
17
+ tmpl: "project/env.ejs",
18
+ args: [
19
+ "init_root_user",
20
+ "not_node_monitor",
21
+ "not_node_reporter",
22
+ "db",
23
+ "session",
24
+ "secret",
25
+ "modules",
26
+ "ws",
27
+ ],
28
+ },
29
+ stage: {
30
+ tmpl: "project/env.ejs",
31
+ args: [],
32
+ },
33
+ production: {
34
+ tmpl: "project/env.ejs",
35
+ args: [],
36
+ },
37
+ },
17
38
  },
18
39
  };
@@ -17,9 +17,7 @@
17
17
  "useNewUrlParser": true,
18
18
  "useUnifiedTopology": true,
19
19
  "db": "<%- db.mongoose.db %>",
20
- "host": "<%- db.mongoose.hostname %>",
21
- "user": "<%- db.mongoose.user %>",
22
- "pass": "<%- db.mongoose.pass %>",
20
+ "host": "<%- db.mongoose.hostname %>",
23
21
  "autoIndex": false
24
22
  }
25
23
  },
@@ -37,7 +35,6 @@
37
35
  <% if (session){ %>
38
36
  "session": {
39
37
  "driver": "<%- session.driver %>",
40
- "secret": "<%- session.secret %>",
41
38
  "cookie": {
42
39
  "maxAge": <%- session.ttl %>
43
40
  },
@@ -69,8 +66,7 @@
69
66
  "main": {
70
67
  "connection": {
71
68
  "port": <%- ws.port %>,
72
- "secure": <%= ws.secure %>,
73
- "secret": "<%- secret %>"
69
+ "secure": <%= ws.secure %>
74
70
  }
75
71
  }
76
72
  }
@@ -85,8 +81,7 @@
85
81
  "debug":{
86
82
  "loaded": false
87
83
  },
88
- "tokenTTL": <%= user.tokenTTL %>,
89
- "secret": "<%- secret %>",
84
+ "tokenTTL": <%= user.tokenTTL %>,
90
85
  "roles": {
91
86
  "primary": [<%- roles.map(entry => `"${entry}"`).join(",") %>],
92
87
  "secondary": [<%- rolesSecondary.map(entry => `"${entry}"`).join(",") %>]
@@ -126,4 +121,4 @@
126
121
  <%- modules.map(entry => `"${entry}"`).join(',') %>
127
122
  ]
128
123
  }
129
-
124
+
@@ -14,3 +14,21 @@ INIT_ROOT_USERNAME=<%- init_root_user.name %>
14
14
  INIT_ROOT_EMAIL=<%- init_root_user.email %>
15
15
  INIT_ROOT_PASSWORD=<%- init_root_user.password %>
16
16
  <% } %>
17
+
18
+ <% if (db && db.mongoose) { %>
19
+ db__mongoose__uri=mongodb://<%- db.mongoose.host %>/<%- db.mongoose.db %>?authSource=<%- db.mongoose.authSource %>
20
+ db__mongoose__options__host=<%- db.mongoose.host %>
21
+ db__mongoose__options__user=<%- db.mongoose.user %>
22
+ db__mongoose__options__pass=<%- db.mongoose.pass %>
23
+ db__mongoose__options__db=<%- db.mongoose.db %>
24
+ <% } %>
25
+
26
+ <% if (modules.includes('not-ws') && ws) { %>
27
+ modules__ws__servers__main__connection__secret=<%- secret %>
28
+ <% } %>
29
+ <% if (modules.includes('not-user') && user) { %>
30
+ modules__user__secret=<%- secret %>
31
+ <% } %>
32
+ <% if (session) { %>
33
+ session__secret=<%- session.secret %>
34
+ <% } %>