isite 2024.10.2 → 2024.12.1
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/README.md +7 -7
- package/apps/charts/site_files/html/PieChart.html +1 -1
- package/apps/charts/site_files/html/PieChart2.html +1 -1
- package/apps/charts/site_files/html/XYChart.html +1 -1
- package/apps/charts/site_files/html/column.html +1 -1
- package/apps/charts/site_files/html/gauge.html +1 -1
- package/apps/charts/site_files/html/index.html +1 -1
- package/apps/charts/site_files/html/line-graph.html +1 -1
- package/apps/charts/site_files/html/pie-chart-rounded-corners.html +1 -1
- package/apps/charts/site_files/html/simple-3D-pie-chart.html +1 -1
- package/apps/client-side/README.md +2 -2
- package/apps/client-side/site_files/css/form.css +1 -0
- package/apps/client-side/site_files/html/require_features.html +1 -1
- package/apps/client-side/site_files/html/require_payments.html +1 -1
- package/apps/client-side/site_files/html/require_permissions.html +1 -1
- package/apps/client-side/site_files/html/words-old.html +1 -1
- package/apps/client-side/site_files/html/words.html +1 -3
- package/apps/client-side/site_files/js/WebShareEditor.js +1 -1
- package/apps/client-side/site_files/js/bootstrap-5-directive.js +4 -4
- package/apps/client-side/site_files/js/bootstrap-5-directive.min.js +1 -1
- package/apps/client-side/site_files/js/site.js +0 -4
- package/apps/client-side/site_files/js/site.min.js +1 -1
- package/apps/client-side/site_files/js/video.min.js +2 -2
- package/apps/security/site_files/html/add_modal.html +1 -1
- package/apps/security/site_files/html/content.html +1 -1
- package/apps/security/site_files/html/index.html +1 -1
- package/apps/security/site_files/html/navbar.html +2 -2
- package/apps/security/site_files/html/view.html +2 -2
- package/apps/security/site_files/js/navbar.js +1 -1
- package/apps/security/site_files/json/permissions.json +6 -6
- package/apps/security/site_files/json/roles.json +8 -8
- package/apps/security/site_files/json/words.json +27 -27
- package/apps/ui-print/site_files/html/content.html +1 -1
- package/apps/ui-print/site_files/html/image.html +1 -1
- package/apps/ui-print/site_files/html/index.html +1 -1
- package/apps/ui-print/site_files/html/svg.html +1 -1
- package/isite_files/css/custom.css +2 -0
- package/isite_files/html/index.html +1 -1
- package/lib/dashboard.js +1 -1
- package/lib/mongodb.js +56 -215
- package/lib/routing.js +27 -25
- package/lib/security.js +7 -7
- package/lib/session.js +1 -1
- package/lib/sessions.js +11 -6
- package/object-options/index.js +1 -1
- package/object-options/plugins/file-manager/site-files/html/index.html +1 -1
- package/package.json +1 -1
package/lib/routing.js
CHANGED
|
@@ -192,7 +192,7 @@ module.exports = function init(____0) {
|
|
|
192
192
|
if ((response = ____0.sharedList.find((s) => s.host == req.host && s.filePath == route.path && s.url == req.url))) {
|
|
193
193
|
res.headers = response.headers;
|
|
194
194
|
res.code = response.code;
|
|
195
|
-
res.set('x-shared', '-host=' + req.host + ' -port=' + ____0.options.port + ' -index=' + ____0.sharedList.length + ' -count=' + route.count);
|
|
195
|
+
res.set('x-shared', '-host=' + req.host + ' -port=' + ____0.options.port + ' -index=' + ____0.sharedList.length + ' -count=' + req.route.count);
|
|
196
196
|
return res.end(response.content, response.encode);
|
|
197
197
|
}
|
|
198
198
|
|
|
@@ -375,6 +375,7 @@ module.exports = function init(____0) {
|
|
|
375
375
|
route.path = null;
|
|
376
376
|
route.parser = 'static';
|
|
377
377
|
route.parserDir = ____0.dir;
|
|
378
|
+
route.count = 0;
|
|
378
379
|
route.cache = !0;
|
|
379
380
|
route.hide = !1;
|
|
380
381
|
route.compress = !1;
|
|
@@ -407,6 +408,7 @@ module.exports = function init(____0) {
|
|
|
407
408
|
route.masterPage = r.masterPage || null;
|
|
408
409
|
route.overwrite = r.overwrite ?? !1;
|
|
409
410
|
route.cache = r.cache ?? !0;
|
|
411
|
+
route.count = r.count || 0;
|
|
410
412
|
route.hide = r.hide ?? !1;
|
|
411
413
|
route.compress = r.compress ?? !1;
|
|
412
414
|
route.encript = r.encript ?? !1;
|
|
@@ -952,114 +954,114 @@ module.exports = function init(____0) {
|
|
|
952
954
|
|
|
953
955
|
req.content = content;
|
|
954
956
|
req.data = { ...req.data, ..._data };
|
|
955
|
-
|
|
957
|
+
let route = { ...req.route, ...options };
|
|
956
958
|
|
|
957
|
-
if (
|
|
959
|
+
if (route.encript == '123') {
|
|
958
960
|
req.content = ____0.f1(req.content);
|
|
959
961
|
}
|
|
960
962
|
|
|
961
|
-
if (
|
|
962
|
-
req.content = ____0.parser(req, res, ____0,
|
|
963
|
+
if (route.parser) {
|
|
964
|
+
req.content = ____0.parser(req, res, ____0, route).html(req.content);
|
|
963
965
|
}
|
|
964
966
|
|
|
965
|
-
if (
|
|
967
|
+
if (route.compress) {
|
|
966
968
|
req.content = req.content.replace(/\r?\n|\r/g, ' ').replace(/\s+/g, ' ');
|
|
967
969
|
}
|
|
968
970
|
|
|
969
971
|
res.status(options.code || 200);
|
|
970
972
|
if (filePath.endsWith('.css')) {
|
|
971
973
|
res.set(____0.strings[7], 'text/css');
|
|
972
|
-
if (____0.options.cache.enabled &&
|
|
974
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
973
975
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.css);
|
|
974
976
|
}
|
|
975
977
|
} else if (filePath.endsWith('.js')) {
|
|
976
978
|
res.set(____0.strings[7], 'application/javascript');
|
|
977
|
-
if (____0.options.cache.enabled &&
|
|
979
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
978
980
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.js);
|
|
979
981
|
}
|
|
980
982
|
} else if (filePath.endsWith('.html')) {
|
|
981
983
|
res.set(____0.strings[7], 'text/html');
|
|
982
|
-
if (____0.options.cache.enabled &&
|
|
984
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
983
985
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.html);
|
|
984
986
|
}
|
|
985
987
|
} else if (filePath.endsWith('.txt')) {
|
|
986
988
|
res.set(____0.strings[7], 'text/plain');
|
|
987
|
-
if (____0.options.cache.enabled &&
|
|
989
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
988
990
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.txt);
|
|
989
991
|
}
|
|
990
992
|
} else if (filePath.endsWith('.json')) {
|
|
991
993
|
res.set(____0.strings[7], 'application/json');
|
|
992
|
-
if (____0.options.cache.enabled &&
|
|
994
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
993
995
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.json);
|
|
994
996
|
}
|
|
995
997
|
} else if (filePath.endsWith('.xml')) {
|
|
996
998
|
res.set(____0.strings[7], 'text/xml');
|
|
997
|
-
if (____0.options.cache.enabled &&
|
|
999
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
998
1000
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.xml);
|
|
999
1001
|
}
|
|
1000
1002
|
} else if (filePath.endsWith('.woff2')) {
|
|
1001
1003
|
res.set(____0.strings[7], 'application/font-woff2');
|
|
1002
|
-
if (____0.options.cache.enabled &&
|
|
1004
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
1003
1005
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.fonts);
|
|
1004
1006
|
}
|
|
1005
1007
|
} else if (filePath.endsWith('.woff')) {
|
|
1006
1008
|
res.set(____0.strings[7], 'application/font-woff');
|
|
1007
|
-
if (____0.options.cache.enabled &&
|
|
1009
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
1008
1010
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.fonts);
|
|
1009
1011
|
}
|
|
1010
1012
|
} else if (filePath.endsWith('.ttf')) {
|
|
1011
1013
|
res.set(____0.strings[7], 'application/font-ttf');
|
|
1012
|
-
if (____0.options.cache.enabled &&
|
|
1014
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
1013
1015
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.fonts);
|
|
1014
1016
|
}
|
|
1015
1017
|
} else if (filePath.endsWith('.svg')) {
|
|
1016
1018
|
res.set(____0.strings[7], 'application/font-svg');
|
|
1017
|
-
if (____0.options.cache.enabled &&
|
|
1019
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
1018
1020
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.fonts);
|
|
1019
1021
|
}
|
|
1020
1022
|
} else if (filePath.endsWith('.otf')) {
|
|
1021
1023
|
res.set(____0.strings[7], 'application/font-otf');
|
|
1022
|
-
if (____0.options.cache.enabled &&
|
|
1024
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
1023
1025
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.fonts);
|
|
1024
1026
|
}
|
|
1025
1027
|
} else if (filePath.endsWith('.eot')) {
|
|
1026
1028
|
res.set(____0.strings[7], 'application/font-eot');
|
|
1027
|
-
if (____0.options.cache.enabled &&
|
|
1029
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
1028
1030
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.fonts);
|
|
1029
1031
|
}
|
|
1030
1032
|
} else if (filePath.endsWith('.gif')) {
|
|
1031
1033
|
res.set(____0.strings[7], 'image/gif');
|
|
1032
|
-
if (____0.options.cache.enabled &&
|
|
1034
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
1033
1035
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.images);
|
|
1034
1036
|
}
|
|
1035
1037
|
} else if (filePath.endsWith('.png')) {
|
|
1036
1038
|
res.set(____0.strings[7], 'image/png');
|
|
1037
|
-
if (____0.options.cache.enabled &&
|
|
1039
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
1038
1040
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.images);
|
|
1039
1041
|
}
|
|
1040
1042
|
} else if (filePath.endsWith('.jpg')) {
|
|
1041
1043
|
res.set(____0.strings[7], 'image/jpg');
|
|
1042
|
-
if (____0.options.cache.enabled &&
|
|
1044
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
1043
1045
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.images);
|
|
1044
1046
|
}
|
|
1045
1047
|
} else if (filePath.endsWith('.jpeg')) {
|
|
1046
1048
|
res.set(____0.strings[7], 'image/jpeg');
|
|
1047
|
-
if (____0.options.cache.enabled &&
|
|
1049
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
1048
1050
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.images);
|
|
1049
1051
|
}
|
|
1050
1052
|
} else if (filePath.endsWith('.ico')) {
|
|
1051
1053
|
res.set(____0.strings[7], 'image/ico');
|
|
1052
|
-
if (____0.options.cache.enabled &&
|
|
1054
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
1053
1055
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.images);
|
|
1054
1056
|
}
|
|
1055
1057
|
} else if (filePath.endsWith('.bmp')) {
|
|
1056
1058
|
res.set(____0.strings[7], 'image/bmp');
|
|
1057
|
-
if (____0.options.cache.enabled &&
|
|
1059
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
1058
1060
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.images);
|
|
1059
1061
|
}
|
|
1060
1062
|
} else if (filePath.endsWith('.webp')) {
|
|
1061
1063
|
res.set(____0.strings[7], 'image/webp');
|
|
1062
|
-
if (____0.options.cache.enabled &&
|
|
1064
|
+
if (____0.options.cache.enabled && route.cache) {
|
|
1063
1065
|
res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.images);
|
|
1064
1066
|
}
|
|
1065
1067
|
}
|
package/lib/security.js
CHANGED
|
@@ -491,7 +491,6 @@ module.exports = function init(____0) {
|
|
|
491
491
|
$req.session.user = _user;
|
|
492
492
|
$req.session.user_id = _user.id;
|
|
493
493
|
$req.session.$save();
|
|
494
|
-
|
|
495
494
|
}
|
|
496
495
|
callback(null, _user);
|
|
497
496
|
____0.call('user login', {
|
|
@@ -520,7 +519,6 @@ module.exports = function init(____0) {
|
|
|
520
519
|
$req.session.user = doc;
|
|
521
520
|
$req.session.user_id = doc.id;
|
|
522
521
|
$req.session.$save();
|
|
523
|
-
|
|
524
522
|
}
|
|
525
523
|
|
|
526
524
|
callback(null, doc);
|
|
@@ -586,7 +584,6 @@ module.exports = function init(____0) {
|
|
|
586
584
|
$req.session.user = doc;
|
|
587
585
|
$req.session.user_id = doc.id;
|
|
588
586
|
$req.session.$save();
|
|
589
|
-
|
|
590
587
|
}
|
|
591
588
|
____0.call('user register', {
|
|
592
589
|
db: ____0.$users.db,
|
|
@@ -610,22 +607,25 @@ module.exports = function init(____0) {
|
|
|
610
607
|
|
|
611
608
|
if (security.isUserLogin(req, res)) {
|
|
612
609
|
let _user = req.session.user;
|
|
613
|
-
|
|
614
610
|
|
|
615
611
|
____0.call('user logout', {
|
|
616
612
|
db: ____0.$users.db,
|
|
617
613
|
collection: ____0.$users.collection,
|
|
618
614
|
doc: _user,
|
|
619
|
-
$res: res,
|
|
620
|
-
$req: req,
|
|
621
615
|
});
|
|
622
616
|
}
|
|
623
617
|
|
|
624
|
-
|
|
618
|
+
req.session.user = null;
|
|
619
|
+
req.session.user_id = null;
|
|
620
|
+
req.session.$save();
|
|
621
|
+
|
|
625
622
|
req.session.accessToken = req.host + new Date().getTime().toString() + '_' + Math.random();
|
|
626
623
|
req.session.accessToken = ____0.x0md50x(req.session.accessToken);
|
|
624
|
+
req.session.$save();
|
|
625
|
+
|
|
627
626
|
res.set('Access-Token', req.session.accessToken);
|
|
628
627
|
res.cookie('access_token', req.session.accessToken);
|
|
628
|
+
|
|
629
629
|
callback(null, !0);
|
|
630
630
|
};
|
|
631
631
|
|
package/lib/session.js
CHANGED
package/lib/sessions.js
CHANGED
|
@@ -95,6 +95,7 @@ module.exports = function init(____0) {
|
|
|
95
95
|
sessions.list[index].$time = new Date().getTime();
|
|
96
96
|
sessions.list[index].requestesCount++;
|
|
97
97
|
sessions.list[index].language = sessions.list[index].language || ____0.options.language;
|
|
98
|
+
sessions.list[index].lang = sessions.list[index].language.id;
|
|
98
99
|
callback(sessions.list[index]);
|
|
99
100
|
} else {
|
|
100
101
|
if (____0.options.session.storage === 'mongodb') {
|
|
@@ -104,13 +105,17 @@ module.exports = function init(____0) {
|
|
|
104
105
|
if (!err && doc) {
|
|
105
106
|
doc.$time = new Date().getTime();
|
|
106
107
|
doc.requestesCount++;
|
|
107
|
-
doc.language
|
|
108
|
+
if (!doc.language || !doc.language.id) {
|
|
109
|
+
doc.language = ____0.options.language;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
doc.lang = doc.language.id;
|
|
108
113
|
sessions.list.push(doc);
|
|
109
114
|
callback(sessions.list[sessions.list.findIndex((s) => s.accessToken == session.accessToken)]);
|
|
110
115
|
} else {
|
|
111
116
|
session.$new = !0;
|
|
112
117
|
session.language = ____0.options.language;
|
|
113
|
-
session.lang =
|
|
118
|
+
session.lang = session.language.id;
|
|
114
119
|
session.theme = ____0.options.theme;
|
|
115
120
|
session.data = [];
|
|
116
121
|
session.requestesCount = 1;
|
|
@@ -125,7 +130,7 @@ module.exports = function init(____0) {
|
|
|
125
130
|
} else {
|
|
126
131
|
session.$new = !0;
|
|
127
132
|
session.language = ____0.options.language;
|
|
128
|
-
session.lang =
|
|
133
|
+
session.lang = session.language.id;
|
|
129
134
|
session.theme = ____0.options.theme;
|
|
130
135
|
session.data = [];
|
|
131
136
|
session.requestesCount = 1;
|
|
@@ -138,7 +143,7 @@ module.exports = function init(____0) {
|
|
|
138
143
|
} else {
|
|
139
144
|
session.$new = !0;
|
|
140
145
|
session.language = ____0.options.language;
|
|
141
|
-
session.lang =
|
|
146
|
+
session.lang = session.language.id;
|
|
142
147
|
session.theme = ____0.options.theme;
|
|
143
148
|
session.data = [];
|
|
144
149
|
session.requestesCount = 1;
|
|
@@ -164,12 +169,12 @@ module.exports = function init(____0) {
|
|
|
164
169
|
|
|
165
170
|
____0.onPOST({ name: '/x-language/change', public: true }, (req, res) => {
|
|
166
171
|
req.session.language = req.data;
|
|
167
|
-
req.session.lang = req.session.language
|
|
172
|
+
req.session.lang = req.session.language.id || req.data.name;
|
|
168
173
|
req.session.langDir = req.session.language?.dir;
|
|
169
174
|
req.session.$save();
|
|
170
175
|
res.json({
|
|
171
176
|
done: true,
|
|
172
|
-
|
|
177
|
+
language: req.session.language,
|
|
173
178
|
});
|
|
174
179
|
});
|
|
175
180
|
|
package/object-options/index.js
CHANGED
|
@@ -39,7 +39,7 @@ function setOptions(_options, ____0) {
|
|
|
39
39
|
_0x14xo: _0x14xo, // 3259376545129191
|
|
40
40
|
_0xddxo: _0xddxo, // 421957684138766241719191
|
|
41
41
|
log: !0,
|
|
42
|
-
lang: '
|
|
42
|
+
lang: 'En',
|
|
43
43
|
language: { id: 'En', dir: 'ltr', text: 'left' },
|
|
44
44
|
theme: 'default',
|
|
45
45
|
public: false,
|