not-node 6.1.1 → 6.1.2
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/.env +2 -2
- package/bin/not-cli.mjs +53 -12
- package/package.json +1 -1
- package/playground/app/front/build/admin.css +2 -0
- package/playground/app/front/build/admin.js +52427 -0
- package/playground/app/front/build/client.css +2 -0
- package/playground/app/front/build/client.js +52427 -0
- package/playground/app/front/build/guest.css +2 -0
- package/playground/app/front/build/guest.js +50907 -0
- package/playground/app/front/build/root.css +2 -0
- package/playground/app/front/build/root.js +60023 -0
- package/playground/app/front/build/user.css +2 -0
- package/playground/app/front/build/user.js +52425 -0
- package/playground/app/front/index.admin.js +160 -0
- package/playground/app/front/index.client.js +160 -0
- package/playground/app/front/index.guest.js +160 -0
- package/playground/app/front/index.root.js +224 -0
- package/playground/app/front/index.user.js +160 -0
- package/playground/app/front/rollup.admin.js +70 -0
- package/playground/app/front/rollup.client.js +70 -0
- package/playground/app/front/rollup.guest.js +70 -0
- package/playground/app/front/rollup.root.js +70 -0
- package/playground/app/front/rollup.user.js +70 -0
- package/playground/app/server/config/common.json +4 -4
- package/playground/app/server/config/development.json +31 -32
- package/playground/app/server/config/production.json +31 -32
- package/playground/app/server/config/stage.json +31 -32
- package/playground/app/server/routes/index.js +29 -31
- package/playground/app/server/views/parts/header.android.pug +6 -7
- package/playground/app/server/views/parts/header.ios.pug +5 -5
- package/src/metas.js +4 -3
- package/tmpl/files/app/routes/index.ejs +29 -31
- package/tmpl/files/app/views/parts/header.android.ejs +6 -7
- package/tmpl/files/app/views/parts/header.ios.ejs +5 -5
- package/tmpl/files/app/views/parts/menu.ejs +1 -1
- package/tmpl/files/app/views/parts/overview.ejs +1 -1
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
2
|
+
"hostname": "localhost",
|
|
3
|
+
"CSP": {
|
|
4
|
+
"connect": [
|
|
5
|
+
"'self'",
|
|
6
|
+
"*",
|
|
7
|
+
"wss:",
|
|
8
|
+
"https:",
|
|
9
|
+
"'unsafe-inline'"
|
|
10
|
+
],
|
|
11
|
+
"default": [
|
|
12
|
+
"'self'",
|
|
13
|
+
"*",
|
|
14
|
+
"wss:",
|
|
15
|
+
"https:",
|
|
16
|
+
"'unsafe-inline'"
|
|
17
|
+
],
|
|
18
|
+
"img": [
|
|
19
|
+
"'self'",
|
|
20
|
+
"data:"
|
|
21
|
+
],
|
|
22
|
+
"script": [
|
|
23
|
+
"'self'",
|
|
24
|
+
"'unsafe-eval'",
|
|
25
|
+
"'unsafe-inline'"
|
|
26
|
+
],
|
|
27
|
+
"style": [
|
|
28
|
+
"'self'",
|
|
29
|
+
"'unsafe-inline'",
|
|
30
|
+
"'unsafe-eval'"
|
|
31
|
+
]
|
|
33
32
|
}
|
|
34
|
-
|
|
33
|
+
}
|
|
@@ -1,36 +1,34 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
siteRouter = require('./site');
|
|
1
|
+
const notNode = require("not-node"),
|
|
2
|
+
{ Auth, notAppIdentity } = require("not-node"),
|
|
3
|
+
siteRouter = require("./site");
|
|
5
4
|
|
|
6
5
|
module.exports = (web) => {
|
|
6
|
+
web.get("/api/manifest", function (req, res) {
|
|
7
|
+
notNode.notHeadersStyler.get()(req, res);
|
|
8
|
+
res.status(200).json(notNode.Application.getManifest(req));
|
|
9
|
+
});
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
siteRouter.index
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
web.get('/dashboard*',
|
|
26
|
-
(req, res, next) => {
|
|
27
|
-
if (Auth.isUser(req)) {
|
|
28
|
-
next();
|
|
29
|
-
} else {
|
|
30
|
-
res.redirect('/login');
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
siteRouter.dashboard
|
|
34
|
-
);
|
|
11
|
+
web.get(
|
|
12
|
+
"/",
|
|
13
|
+
(req, res, next) => {
|
|
14
|
+
if (new notAppIdentity(req).isUser()) {
|
|
15
|
+
res.redirect("/dashboard");
|
|
16
|
+
} else {
|
|
17
|
+
next();
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
siteRouter.index
|
|
21
|
+
);
|
|
35
22
|
|
|
23
|
+
web.get(
|
|
24
|
+
"/dashboard*",
|
|
25
|
+
(req, res, next) => {
|
|
26
|
+
if (new notAppIdentity(req).isUser()) {
|
|
27
|
+
next();
|
|
28
|
+
} else {
|
|
29
|
+
res.redirect("/login");
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
siteRouter.dashboard
|
|
33
|
+
);
|
|
36
34
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
link(rel="stylesheet" href=host+"/assets/font-awesome.min.css")
|
|
1
|
+
<!-- Android -->
|
|
2
|
+
meta(name="theme-color" content="#48c774")
|
|
3
|
+
meta(name="color-scheme" content="light")
|
|
4
|
+
meta(name="mobile-web-app-capable" content="yes")
|
|
5
|
+
link(rel="stylesheet" href=host+"/front/"+role+".css")
|
|
6
|
+
link(rel="stylesheet" href=host+"/assets/font-awesome.min.css")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<!-- iOS -->
|
|
2
|
+
meta(name="apple-mobile-web-app-title" content=title)
|
|
3
|
+
meta(name="apple-mobile-web-app-capable" content="yes")
|
|
4
|
+
meta(name="apple-mobile-web-app-status-bar-style" content="#48c774")
|
|
5
|
+
link(rel="apple-touch-icon" href="./img/icons/icon-512.png")
|
package/src/metas.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
const Auth = require("./auth"),
|
|
2
|
-
|
|
2
|
+
notAppIdentity = require("./identity"),
|
|
3
3
|
notStyler = require("./styler"),
|
|
4
4
|
config = require("not-config").createReader();
|
|
5
5
|
|
|
6
6
|
function getRole(req) {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const identity = new notAppIdentity(req);
|
|
8
|
+
if (identity.isUser()) {
|
|
9
|
+
return identity.getRole();
|
|
9
10
|
} else {
|
|
10
11
|
return Auth.DEFAULT_USER_ROLE_FOR_GUEST;
|
|
11
12
|
}
|
|
@@ -1,36 +1,34 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
siteRouter = require('./site');
|
|
1
|
+
const notNode = require("not-node"),
|
|
2
|
+
{ Auth, notAppIdentity } = require("not-node"),
|
|
3
|
+
siteRouter = require("./site");
|
|
5
4
|
|
|
6
5
|
module.exports = (web) => {
|
|
6
|
+
web.get("/api/manifest", function (req, res) {
|
|
7
|
+
notNode.notHeadersStyler.get()(req, res);
|
|
8
|
+
res.status(200).json(notNode.Application.getManifest(req));
|
|
9
|
+
});
|
|
7
10
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
siteRouter.index
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
web.get('/dashboard*',
|
|
26
|
-
(req, res, next) => {
|
|
27
|
-
if (Auth.isUser(req)) {
|
|
28
|
-
next();
|
|
29
|
-
} else {
|
|
30
|
-
res.redirect('/login');
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
siteRouter.dashboard
|
|
34
|
-
);
|
|
11
|
+
web.get(
|
|
12
|
+
"/",
|
|
13
|
+
(req, res, next) => {
|
|
14
|
+
if (new notAppIdentity(req).isUser()) {
|
|
15
|
+
res.redirect("/dashboard");
|
|
16
|
+
} else {
|
|
17
|
+
next();
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
siteRouter.index
|
|
21
|
+
);
|
|
35
22
|
|
|
23
|
+
web.get(
|
|
24
|
+
"/dashboard*",
|
|
25
|
+
(req, res, next) => {
|
|
26
|
+
if (new notAppIdentity(req).isUser()) {
|
|
27
|
+
next();
|
|
28
|
+
} else {
|
|
29
|
+
res.redirect("/login");
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
siteRouter.dashboard
|
|
33
|
+
);
|
|
36
34
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
link(rel="stylesheet" href=host+"/assets/font-awesome.min.css")
|
|
1
|
+
<!-- Android -->
|
|
2
|
+
meta(name="theme-color" content="#48c774")
|
|
3
|
+
meta(name="color-scheme" content="light")
|
|
4
|
+
meta(name="mobile-web-app-capable" content="yes")
|
|
5
|
+
link(rel="stylesheet" href=host+"/front/"+role+".css")
|
|
6
|
+
link(rel="stylesheet" href=host+"/assets/font-awesome.min.css")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<!-- iOS -->
|
|
2
|
+
meta(name="apple-mobile-web-app-title" content=title)
|
|
3
|
+
meta(name="apple-mobile-web-app-capable" content="yes")
|
|
4
|
+
meta(name="apple-mobile-web-app-status-bar-style" content="#48c774")
|
|
5
|
+
link(rel="apple-touch-icon" href="./img/icons/icon-512.png")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
nav(class="navbar is-success" role="navigation" aria-label="dropdown navigation" id="top-menu")
|
|
1
|
+
nav(class="navbar is-success" role="navigation" aria-label="dropdown navigation" id="top-menu")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
div(class="is-success is-fullheight")
|
|
2
|
-
p Story of another little side project.
|
|
2
|
+
p Story of another little side project.
|