not-node 6.5.44 → 6.5.45
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 +1 -1
- package/src/cli/lib/args.mjs +2 -0
- package/src/cli/lib/fs.mjs +1 -1
- package/tmpl/dirs/front.mjs +2 -2
- package/tmpl/dirs/project.mjs +27 -2
- package/tmpl/files/app/front/index.!.ejs +53 -56
- package/tmpl/files/app/front/rollup.!.ejs +2 -3
- package/tmpl/files/project/env.ejs +9 -9
package/package.json
CHANGED
package/src/cli/lib/args.mjs
CHANGED
|
@@ -29,6 +29,8 @@ async function readArgs(structure, config) {
|
|
|
29
29
|
function isFilename(name, descr) {
|
|
30
30
|
if (descr.type === "file") {
|
|
31
31
|
return true;
|
|
32
|
+
} else if (descr.type === "dir") {
|
|
33
|
+
return false;
|
|
32
34
|
}
|
|
33
35
|
if (name.startsWith(VAR_PREFIX) && name.endsWith(VAR_PREFIX)) {
|
|
34
36
|
return false;
|
package/src/cli/lib/fs.mjs
CHANGED
|
@@ -103,7 +103,7 @@ async function createDirContent(dest, structure = {}, config = {}) {
|
|
|
103
103
|
entry = config[getVariableName(entry)];
|
|
104
104
|
}
|
|
105
105
|
if (isFilename(entry, subStructure)) {
|
|
106
|
-
|
|
106
|
+
console.log(dest, entry);
|
|
107
107
|
const filePath = join(dest, entry);
|
|
108
108
|
await createFileContent(filePath, subStructure, config);
|
|
109
109
|
} else {
|
package/tmpl/dirs/front.mjs
CHANGED
package/tmpl/dirs/project.mjs
CHANGED
|
@@ -12,14 +12,17 @@ export default {
|
|
|
12
12
|
ifArgs: ["pm2"],
|
|
13
13
|
},
|
|
14
14
|
".envs": {
|
|
15
|
+
type: "dir",
|
|
15
16
|
content: {
|
|
16
17
|
development: {
|
|
18
|
+
type: "file",
|
|
17
19
|
tmpl: "project/env.ejs",
|
|
18
20
|
args: [
|
|
19
21
|
"init_root_user",
|
|
20
22
|
"not_node_monitor",
|
|
21
23
|
"not_node_reporter",
|
|
22
24
|
"db",
|
|
25
|
+
"user",
|
|
23
26
|
"session",
|
|
24
27
|
"secret",
|
|
25
28
|
"modules",
|
|
@@ -27,12 +30,34 @@ export default {
|
|
|
27
30
|
],
|
|
28
31
|
},
|
|
29
32
|
stage: {
|
|
33
|
+
type: "file",
|
|
30
34
|
tmpl: "project/env.ejs",
|
|
31
|
-
args: [
|
|
35
|
+
args: [
|
|
36
|
+
"init_root_user",
|
|
37
|
+
"not_node_monitor",
|
|
38
|
+
"not_node_reporter",
|
|
39
|
+
"db",
|
|
40
|
+
"user",
|
|
41
|
+
"session",
|
|
42
|
+
"secret",
|
|
43
|
+
"modules",
|
|
44
|
+
"ws",
|
|
45
|
+
],
|
|
32
46
|
},
|
|
33
47
|
production: {
|
|
48
|
+
type: "file",
|
|
34
49
|
tmpl: "project/env.ejs",
|
|
35
|
-
args: [
|
|
50
|
+
args: [
|
|
51
|
+
"init_root_user",
|
|
52
|
+
"not_node_monitor",
|
|
53
|
+
"not_node_reporter",
|
|
54
|
+
"db",
|
|
55
|
+
"user",
|
|
56
|
+
"session",
|
|
57
|
+
"secret",
|
|
58
|
+
"modules",
|
|
59
|
+
"ws",
|
|
60
|
+
],
|
|
36
61
|
},
|
|
37
62
|
},
|
|
38
63
|
},
|
|
@@ -1,66 +1,63 @@
|
|
|
1
1
|
<% if (not_node_reporter) { %>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
window.NOT_NODE_ERROR_URL_BROWSER = '<%- not_node_reporter.url_browser %>';
|
|
3
|
+
<% } %>
|
|
4
|
+
|
|
5
|
+
import { Frame } from 'not-bulma';
|
|
6
|
+
|
|
7
|
+
const {notCommon, notApp, COMPONENTS} = Frame;
|
|
8
|
+
|
|
9
|
+
notCommon.register('backlog', true);
|
|
10
|
+
window.dumpBacklog = notCommon.dumpBacklog.bind(notCommon);
|
|
11
|
+
|
|
12
|
+
let appDefaultOptions = {
|
|
13
|
+
manifestURL: '/api/manifest',
|
|
14
|
+
router: {
|
|
15
|
+
root: '/',
|
|
16
|
+
manifest: [],
|
|
17
|
+
index: ''
|
|
18
|
+
},
|
|
19
|
+
language: 'ru',
|
|
20
|
+
crud: {
|
|
21
|
+
navigateBackAfter: ['create', 'update', 'delete']
|
|
22
|
+
},
|
|
23
|
+
modules: {
|
|
24
|
+
user: {
|
|
25
|
+
redirectTimout: 1000,
|
|
26
|
+
afterLoginURL: '/dashboard',
|
|
27
|
+
loginForm: {
|
|
28
|
+
modes: [
|
|
29
|
+
'login',
|
|
30
|
+
'requestLoginCodeOnEmail',
|
|
31
|
+
'loginByCode'
|
|
32
|
+
]
|
|
20
33
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
'loginByCode'
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
loginFormContainerSelector: '.main-container',
|
|
37
|
-
restoreFormContainerSelector: '.main-container',
|
|
38
|
-
registerFormContainerSelector: '.main-container'
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
let services = {}, uis = {}, wsc = {}, fields = {};
|
|
44
|
-
|
|
45
|
-
<%% for(var i = 0; i < mods.length; i++) { %%>
|
|
46
|
-
import * as mod_<%%= i %%>
|
|
47
|
-
from '<%%= mods[i] %%>';
|
|
48
|
-
appDefaultOptions = notCommon.absorbModule({
|
|
34
|
+
loginFormContainerSelector: '.main-container',
|
|
35
|
+
restoreFormContainerSelector: '.main-container',
|
|
36
|
+
registerFormContainerSelector: '.main-container'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
let services = {}, uis = {}, wsc = {}, fields = {};
|
|
42
|
+
|
|
43
|
+
<%% for(var i = 0; i < mods.length; i++) { %%>
|
|
44
|
+
import * as mod_<%%= i %%> from '<%%= mods[i] %%>';
|
|
45
|
+
appDefaultOptions = notCommon.absorbModule({
|
|
49
46
|
defaultConf: appDefaultOptions,
|
|
50
47
|
mod: mod_<%%= i %%>,
|
|
51
48
|
services, uis, wsc, fields
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
});
|
|
50
|
+
<%% } %%>
|
|
54
51
|
|
|
55
|
-
|
|
52
|
+
COMPONENTS.import(uis);
|
|
56
53
|
|
|
57
|
-
|
|
54
|
+
import 'bulma';
|
|
58
55
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
<%% for(var i = 0; i < scss.length; i++) { %%>
|
|
57
|
+
import '<%%= scss[i] %%>';
|
|
58
|
+
<%% } %%>
|
|
62
59
|
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
appDefaultOptions.services = services;
|
|
61
|
+
appDefaultOptions.wsc = wsc;
|
|
65
62
|
|
|
66
|
-
|
|
63
|
+
notCommon.startApp(() => new notApp(appDefaultOptions));
|
|
@@ -8,7 +8,7 @@ import sizes from "rollup-plugin-sizes";
|
|
|
8
8
|
import postcss from "rollup-plugin-postcss";
|
|
9
9
|
import json from "@rollup/plugin-json";
|
|
10
10
|
|
|
11
|
-
import { babelOn } from "
|
|
11
|
+
import { babelOn } from "../build.env.js";
|
|
12
12
|
|
|
13
13
|
export default {
|
|
14
14
|
input: "<%%= inputPath %%>",
|
|
@@ -16,8 +16,7 @@ export default {
|
|
|
16
16
|
file: "<%%= outputPath %%>",
|
|
17
17
|
name: "<%%= appName %%>",
|
|
18
18
|
format: "iife",
|
|
19
|
-
sourcemap:
|
|
20
|
-
false && (process.env.NODE_ENV === "production" ? false : "inline"),
|
|
19
|
+
sourcemap:(process.env.NODE_ENV === "production" ? false : "inline"),
|
|
21
20
|
},
|
|
22
21
|
plugins: [
|
|
23
22
|
json(),
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
<% if (not_node_reporter) { %>
|
|
1
|
+
<% if (locals.not_node_reporter) { %>
|
|
2
2
|
NOT_NODE_ERROR_KEY=<%- not_node_reporter.key %>
|
|
3
3
|
NOT_NODE_ERROR_URL_NODE=<%- not_node_reporter.url_node %>
|
|
4
4
|
NOT_NODE_ERROR_URL_BROWSER=<%- not_node_reporter.url_browser %>
|
|
5
5
|
<% } %>
|
|
6
|
-
<% if (not_node_monitor) { %>
|
|
6
|
+
<% if (locals.not_node_monitor) { %>
|
|
7
7
|
NOT_NODE_MONITOR_INTERVAL=<%- not_node_monitor.interval %>
|
|
8
8
|
NOT_NODE_MONITOR_REPORT_INTERVAL=<%- not_node_monitor.report_interval %>
|
|
9
9
|
NOT_NODE_MONITOR_REPORT_KEY=<%- not_node_monitor.report_key %>
|
|
10
10
|
NOT_NODE_MONITOR_REPORT_URL=<%- not_node_monitor.report_url %>
|
|
11
11
|
<% } %>
|
|
12
|
-
<% if (init_root_user) { %>
|
|
12
|
+
<% if (locals.init_root_user) { %>
|
|
13
13
|
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
17
|
|
|
18
|
-
<% if (db && db.mongoose) { %>
|
|
19
|
-
db__mongoose__uri=mongodb://<%- db.mongoose.
|
|
20
|
-
db__mongoose__options__host=<%- db.mongoose.
|
|
18
|
+
<% if (locals.db && db.mongoose) { %>
|
|
19
|
+
db__mongoose__uri=mongodb://<%- db.mongoose.hostname %>/<%- db.mongoose.db %>?authSource=<%- db.mongoose.authSource %>
|
|
20
|
+
db__mongoose__options__host=<%- db.mongoose.hostname %>
|
|
21
21
|
db__mongoose__options__user=<%- db.mongoose.user %>
|
|
22
22
|
db__mongoose__options__pass=<%- db.mongoose.pass %>
|
|
23
23
|
db__mongoose__options__db=<%- db.mongoose.db %>
|
|
24
24
|
<% } %>
|
|
25
25
|
|
|
26
|
-
<% if (modules.includes('not-ws')
|
|
26
|
+
<% if (locals.modules && modules.includes('not-ws')) { %>
|
|
27
27
|
modules__ws__servers__main__connection__secret=<%- secret %>
|
|
28
28
|
<% } %>
|
|
29
|
-
<% if (modules.includes('not-user')
|
|
29
|
+
<% if (locals.modules && modules.includes('not-user')) { %>
|
|
30
30
|
modules__user__secret=<%- secret %>
|
|
31
31
|
<% } %>
|
|
32
|
-
<% if (session) { %>
|
|
32
|
+
<% if (locals.session && session) { %>
|
|
33
33
|
session__secret=<%- session.secret %>
|
|
34
34
|
<% } %>
|