isite 2024.6.9 → 2024.8.3

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.
Files changed (128) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +1387 -1387
  3. package/apps/charts/site_files/html/PieChart.html +35 -35
  4. package/apps/charts/site_files/html/PieChart2.html +35 -35
  5. package/apps/charts/site_files/html/XYChart.html +42 -42
  6. package/apps/charts/site_files/html/column.html +60 -60
  7. package/apps/charts/site_files/html/gauge.html +44 -44
  8. package/apps/charts/site_files/html/index.html +92 -92
  9. package/apps/charts/site_files/html/line-graph.html +42 -42
  10. package/apps/charts/site_files/html/pie-chart-rounded-corners.html +38 -38
  11. package/apps/charts/site_files/html/simple-3D-pie-chart.html +43 -43
  12. package/apps/charts/site_files/js/chart-animated.js +2 -2
  13. package/apps/charts/site_files/json/PieChart.json +41 -41
  14. package/apps/charts/site_files/json/PieChart2.json +23 -23
  15. package/apps/charts/site_files/json/XYChart.json +74 -74
  16. package/apps/charts/site_files/json/bar-chart.json +99 -99
  17. package/apps/charts/site_files/json/column-chart.json +80 -80
  18. package/apps/charts/site_files/json/gauge.json +36 -36
  19. package/apps/charts/site_files/json/line-graph.json +1867 -1867
  20. package/apps/charts/site_files/json/pie-chart-rounded-corners.json +42 -42
  21. package/apps/charts/site_files/json/simple-3D-pie-chart.json +50 -50
  22. package/apps/client-side/package-lock.json +5 -5
  23. package/apps/client-side/package.json +21 -21
  24. package/apps/client-side/site_files/css/bootstrap3.css +5 -5
  25. package/apps/client-side/site_files/css/bootstrap4.css +6 -6
  26. package/apps/client-side/site_files/css/bootstrap5-addon.css +2 -2
  27. package/apps/client-side/site_files/css/bootstrap5.css +6 -6
  28. package/apps/client-side/site_files/css/checkbox.css +125 -125
  29. package/apps/client-side/site_files/css/font-awesome.css +4616 -4616
  30. package/apps/client-side/site_files/css/font-awesome.min.css +4 -4
  31. package/apps/client-side/site_files/css/fonts.css +85 -85
  32. package/apps/client-side/site_files/css/help.css +51 -51
  33. package/apps/client-side/site_files/css/images.css +4 -3
  34. package/apps/client-side/site_files/css/main-menu.css +66 -66
  35. package/apps/client-side/site_files/css/print.css +144 -144
  36. package/apps/client-side/site_files/css/prism.css +139 -139
  37. package/apps/client-side/site_files/css/progress.css +7 -7
  38. package/apps/client-side/site_files/css/radio.css +103 -103
  39. package/apps/client-side/site_files/css/scrollbar.css +13 -13
  40. package/apps/client-side/site_files/css/semantic.css +363 -363
  41. package/apps/client-side/site_files/css/table.css +87 -87
  42. package/apps/client-side/site_files/css/treeview.css +84 -84
  43. package/apps/client-side/site_files/css/ui.css +28 -28
  44. package/apps/client-side/site_files/fonts/fontawesome-webfont.svg +2671 -2671
  45. package/apps/client-side/site_files/fonts/glyphicons-halflings-regular.svg +287 -287
  46. package/apps/client-side/site_files/fonts/icons.svg +684 -684
  47. package/apps/client-side/site_files/js/angular-animate.js +4179 -4179
  48. package/apps/client-side/site_files/js/angular.js +36599 -36599
  49. package/apps/client-side/site_files/js/angular.min.js +351 -351
  50. package/apps/client-side/site_files/js/angular.min.js.map +8 -8
  51. package/apps/client-side/site_files/js/barcode.js +1 -1
  52. package/apps/client-side/site_files/js/base64.js +319 -319
  53. package/apps/client-side/site_files/js/bootstrap-5-directive.js +1456 -1456
  54. package/apps/client-side/site_files/js/bootstrap3.js +6 -6
  55. package/apps/client-side/site_files/js/bootstrap4.js +6 -6
  56. package/apps/client-side/site_files/js/bootstrap5.js +6 -6
  57. package/apps/client-side/site_files/js/custom.js +149 -149
  58. package/apps/client-side/site_files/js/directive.min.js +1 -1
  59. package/apps/client-side/site_files/js/hijri.js +965 -965
  60. package/apps/client-side/site_files/js/jquery.js +2 -2
  61. package/apps/client-side/site_files/js/moment.js +4511 -4511
  62. package/apps/client-side/site_files/js/prism.js +6 -6
  63. package/apps/client-side/site_files/js/qrcode.js +1398 -1398
  64. package/apps/client-side/site_files/js/semantic.js +10 -10
  65. package/apps/client-side/site_files/js/xlsx.js +23 -23
  66. package/apps/client-side/site_files/semantic-themes/default/assets/fonts/brand-icons.svg +1008 -1008
  67. package/apps/client-side/site_files/semantic-themes/default/assets/fonts/icons.svg +1518 -1518
  68. package/apps/client-side/site_files/semantic-themes/default/assets/fonts/outline-icons.svg +366 -366
  69. package/apps/client-side/site_files/webfonts/fa-brands-400.svg +3717 -3717
  70. package/apps/client-side/site_files/webfonts/fa-regular-400.svg +801 -801
  71. package/apps/client-side/site_files/webfonts/fa-solid-900.svg +5034 -5034
  72. package/apps/security/README.md +12 -12
  73. package/apps/security/app.js +288 -288
  74. package/apps/security/libs/notifications.js +89 -89
  75. package/apps/security/site_files/html/add_modal.html +36 -36
  76. package/apps/security/site_files/html/content.html +36 -36
  77. package/apps/security/site_files/html/delete_modal.html +31 -31
  78. package/apps/security/site_files/html/head.html +7 -7
  79. package/apps/security/site_files/html/index.html +80 -80
  80. package/apps/security/site_files/html/login_modal.html +24 -24
  81. package/apps/security/site_files/html/logout_modal.html +21 -21
  82. package/apps/security/site_files/html/navbar.html +8 -8
  83. package/apps/security/site_files/html/register_modal.html +32 -32
  84. package/apps/security/site_files/html/update_modal.html +28 -28
  85. package/apps/security/site_files/html/view.html +74 -74
  86. package/apps/security/site_files/html/view_modal.html +32 -32
  87. package/apps/security/site_files/js/app.js +1 -1
  88. package/apps/security/site_files/js/index.js +278 -278
  89. package/apps/security/site_files/js/login.js +35 -35
  90. package/apps/security/site_files/js/logout.js +22 -22
  91. package/apps/security/site_files/js/navbar.js +26 -26
  92. package/apps/security/site_files/js/register.js +30 -30
  93. package/apps/security/site_files/json/permissions.json +7 -7
  94. package/apps/security/site_files/json/roles.json +33 -33
  95. package/apps/security/site_files/json/words.json +28 -28
  96. package/gulpfile.js +17 -17
  97. package/index.js +1 -0
  98. package/isite.postman_collection.json +7 -7
  99. package/isite_files/css/bootstrap.css +5 -5
  100. package/isite_files/css/font-awesome.css +4 -4
  101. package/isite_files/css/prism.css +139 -139
  102. package/isite_files/fonts/fontawesome-webfont.svg +2671 -2671
  103. package/isite_files/fonts/glyphicons-halflings-regular.svg +287 -287
  104. package/isite_files/html/files.html +9 -9
  105. package/isite_files/html/head.html +12 -12
  106. package/isite_files/html/index.html +30 -30
  107. package/isite_files/html/installing.html +27 -27
  108. package/isite_files/html/navbar.html +51 -51
  109. package/isite_files/html/routes.html +13 -13
  110. package/isite_files/html/sessions.html +13 -13
  111. package/isite_files/html/vars.html +9 -9
  112. package/isite_files/js/angular.js +334 -334
  113. package/isite_files/js/bootstrap.js +6 -6
  114. package/isite_files/js/custom.js +149 -149
  115. package/isite_files/js/jquery.js +4 -4
  116. package/isite_files/js/prism.js +6 -6
  117. package/lib/README.md +1 -1
  118. package/lib/cookie.js +81 -81
  119. package/lib/dashboard.js +189 -189
  120. package/lib/mongodb.js +686 -686
  121. package/lib/parser.js +910 -910
  122. package/lib/session.js +158 -158
  123. package/lib/storage.js +6 -0
  124. package/lib/ws.js +4 -26
  125. package/object-options/lib/isite.code-workspace +10 -10
  126. package/object-options/lib/safty.js +13 -16
  127. package/package.json +55 -54
  128. package/ssl/create_ssl.sh +3 -3
package/lib/cookie.js CHANGED
@@ -1,81 +1,81 @@
1
- module.exports = function init(req, res, ____0) {
2
- let cookie = function (key, value, options) {
3
- if ((key, value)) {
4
- return cookie.set(key, value, options);
5
- } else {
6
- return cookie.get(key);
7
- }
8
- };
9
- cookie.newList = [];
10
- cookie.parse = (cookies) => {
11
- let obj = {};
12
- if (!cookies) {
13
- return obj;
14
- }
15
- cookies.split(';').forEach(function (cookie) {
16
- var parts = cookie.split('=');
17
- if (parts[0] && parts[1]) {
18
- obj[parts.shift().trim()] = decodeURI(parts.join('='));
19
- }
20
- });
21
- return obj;
22
- // return cookie.split(';').reduce(function (prev, curr) {
23
- // let m = / *([^=]+)=(.*)/.exec(curr);
24
- // if (m) {
25
- // let key = m[1];
26
- // let value = decodeURIComponent(m[2]);
27
- // prev[key] = value;
28
- // }
29
- // return prev;
30
- // }, {});
31
- };
32
-
33
- cookie.stringify = (co) => {
34
- let out = '';
35
-
36
- out += co.key + '=' + encodeURIComponent(co.value) + ';path=' + co.options.path;
37
- if (co.options.expires > 0) {
38
- out += '; expires=' + new Date(new Date().getTime() + 1000 * 60 * co.options.expires).toUTCString();
39
- }
40
-
41
- return out;
42
- };
43
-
44
- cookie.write = () => {
45
- let csList = [];
46
-
47
- for (let i = 0; i < cookie.newList.length; i++) {
48
- let cs = cookie.stringify(cookie.newList[i]);
49
- if (cs) {
50
- csList.push(cs);
51
- }
52
- }
53
- res.set('Set-Cookie', csList);
54
- };
55
-
56
- cookie.set = function (key, value, _options) {
57
- let options = Object.assign(
58
- {
59
- expires: ____0.options.session.timeout,
60
- path: '/',
61
- },
62
- _options
63
- );
64
-
65
- cookie.newList.push({
66
- key: key,
67
- value: value,
68
- options: options,
69
- });
70
- };
71
-
72
- cookie.get = function (key) {
73
- let value = cookie.obj[key];
74
- if (typeof value == 'undefined') {
75
- return null;
76
- }
77
- return value;
78
- };
79
- cookie.obj = cookie.parse(req.headers.cookie || '');
80
- return cookie;
81
- };
1
+ module.exports = function init(req, res, ____0) {
2
+ let cookie = function (key, value, options) {
3
+ if ((key, value)) {
4
+ return cookie.set(key, value, options);
5
+ } else {
6
+ return cookie.get(key);
7
+ }
8
+ };
9
+ cookie.newList = [];
10
+ cookie.parse = (cookies) => {
11
+ let obj = {};
12
+ if (!cookies) {
13
+ return obj;
14
+ }
15
+ cookies.split(';').forEach(function (cookie) {
16
+ var parts = cookie.split('=');
17
+ if (parts[0] && parts[1]) {
18
+ obj[parts.shift().trim()] = decodeURI(parts.join('='));
19
+ }
20
+ });
21
+ return obj;
22
+ // return cookie.split(';').reduce(function (prev, curr) {
23
+ // let m = / *([^=]+)=(.*)/.exec(curr);
24
+ // if (m) {
25
+ // let key = m[1];
26
+ // let value = decodeURIComponent(m[2]);
27
+ // prev[key] = value;
28
+ // }
29
+ // return prev;
30
+ // }, {});
31
+ };
32
+
33
+ cookie.stringify = (co) => {
34
+ let out = '';
35
+
36
+ out += co.key + '=' + encodeURIComponent(co.value) + ';path=' + co.options.path;
37
+ if (co.options.expires > 0) {
38
+ out += '; expires=' + new Date(new Date().getTime() + 1000 * 60 * co.options.expires).toUTCString();
39
+ }
40
+
41
+ return out;
42
+ };
43
+
44
+ cookie.write = () => {
45
+ let csList = [];
46
+
47
+ for (let i = 0; i < cookie.newList.length; i++) {
48
+ let cs = cookie.stringify(cookie.newList[i]);
49
+ if (cs) {
50
+ csList.push(cs);
51
+ }
52
+ }
53
+ res.set('Set-Cookie', csList);
54
+ };
55
+
56
+ cookie.set = function (key, value, _options) {
57
+ let options = Object.assign(
58
+ {
59
+ expires: ____0.options.session.timeout,
60
+ path: '/',
61
+ },
62
+ _options
63
+ );
64
+
65
+ cookie.newList.push({
66
+ key: key,
67
+ value: value,
68
+ options: options,
69
+ });
70
+ };
71
+
72
+ cookie.get = function (key) {
73
+ let value = cookie.obj[key];
74
+ if (typeof value == 'undefined') {
75
+ return null;
76
+ }
77
+ return value;
78
+ };
79
+ cookie.obj = cookie.parse(req.headers.cookie || '');
80
+ return cookie;
81
+ };
package/lib/dashboard.js CHANGED
@@ -1,189 +1,189 @@
1
- module.exports = function init(____0) {
2
- let dir = __dirname + '/../isite_files';
3
-
4
- ____0.get({
5
- name: '/x-dashboard-admin',
6
- path: dir + '/html/index.html',
7
- parser: 'html',
8
- parserDir: dir,
9
- hide: !0,
10
- });
11
- ____0.get({
12
- name: '/x-dashboard-images',
13
- path: dir + '/images',
14
- hide: !0,
15
- });
16
- ____0.get({
17
- name: '/x-dashboard-fonts',
18
- path: dir + '/fonts',
19
- hide: !0,
20
- });
21
- ____0.get({
22
- name: '/x-dashboard-js',
23
- path: dir + '/js',
24
- hide: !0,
25
- });
26
- ____0.get({
27
- name: '/x-dashboard-css',
28
- path: dir + '/css',
29
- compress: !0,
30
- hide: !0,
31
- });
32
- ____0.get({
33
- name: '/x-dashboard-css/bootstrap3.css',
34
- path: [dir + '/css/bootstrap.css', dir + '/css/navbar.css'],
35
- compress: !0,
36
- hide: !0,
37
- });
38
- ____0.get({
39
- name: '/x-dashboard-js/bootstrap3.js',
40
- path: dir + '/js/bootstrap.js',
41
- hide: !0,
42
- });
43
-
44
- ____0.get({
45
- name: '/x-dashboard-js/script.js',
46
- hide: !0,
47
- compress: !0,
48
- path: [dir + '/js/jquery.js', dir + '/js/bootstrap.js', dir + '/js/angular.js', dir + '/js/prism.js', dir + '/js/client.js'],
49
- });
50
- ____0.get({
51
- name: '/x-dashboard-css/style.css',
52
- hide: !0,
53
- compress: !0,
54
- path: [dir + '/css/bootstrap.css', dir + '/css/font-awesome.css', dir + '/css/navbar.css', dir + '/css/custom.css', dir + '/css/prism.css'],
55
- });
56
-
57
- ____0.all({
58
- name: '/x-dashboard-admin/api/vars',
59
- hide: !0,
60
- callback: function (req, res) {
61
- res.setHeader('x-dashboard-content', 'from x-dashboard-server');
62
- res.setHeader('Content-Type', 'application/json');
63
- res.writeHeader(200);
64
- res.end(JSON.stringify(____0.vars));
65
- },
66
- });
67
-
68
- ____0.all({
69
- name: '/x-dashboard-admin/api/routes',
70
- hide: !0,
71
- callback: function (req, res) {
72
- res.setHeader('x-dashboard-content', 'from x-dashboard-server');
73
- res.setHeader('Content-Type', 'application/json');
74
- res.writeHeader(200);
75
- var arr = [];
76
- for (var i = 0; i < ____0.routeList.length; i++) {
77
- var r = ____0.routeList[i];
78
- if (!r.hide) {
79
- arr.push({
80
- name: r.name,
81
- path: r.path,
82
- method: r.method,
83
- count: r.count,
84
- });
85
- }
86
- }
87
- res.end(JSON.stringify(arr));
88
- },
89
- });
90
-
91
- ____0.all({
92
- name: '/x-dashboard-admin/api/session',
93
- hide: !0,
94
- callback: function (req, res) {
95
- res.htmlContent(____0.toHtmlTable(req.session));
96
- },
97
- });
98
-
99
- ____0.all({
100
- name: '/x-dashboard-admin/api/sessions',
101
- hide: !0,
102
- callback: function (req, res) {
103
- res.setHeader('x-dashboard-content', 'from x-dashboard-server');
104
- res.setHeader('Content-Type', 'application/json');
105
- res.writeHeader(200);
106
- var arr = [];
107
- for (var i = 0; i < ____0.sessions.length; i++) {
108
- var s = ____0.sessions[i];
109
- arr.push({
110
- ip: s.ip,
111
- user_id: s.user_id,
112
- modifiedTime: s.modifiedTime,
113
- accessToken: s.accessToken,
114
- createdTime: s.createdTime,
115
- requestesCount: s.requestesCount,
116
- });
117
- }
118
- res.end(JSON.stringify(arr));
119
- },
120
- });
121
-
122
- ____0.all({
123
- name: '/x-dashboard-admin/api/cookie',
124
- hide: !0,
125
- callback: function (req, res) {
126
- res.setHeader('x-dashboard-content', 'from x-dashboard-server');
127
- res.setHeader('Content-Type', 'application/json');
128
- res.writeHeader(200);
129
- res.end(JSON.stringify(req.cookie));
130
- },
131
- });
132
-
133
- ____0.all({
134
- name: '/x-dashboard-admin/api/users',
135
- hide: !0,
136
- callback: function (req, res) {
137
- res.set('x-dashboard-content', 'from x-dashboard-server');
138
- res.set('Content-Type', 'application/json');
139
- res.json(____0.security.users);
140
- },
141
- });
142
-
143
- ____0.all({
144
- name: '/x-dashboard-admin/api/user',
145
- hide: !0,
146
- callback: function (req, res) {
147
- res.set('x-dashboard-content', 'from x-dashboard-server');
148
- res.set('Content-Type', 'application/json');
149
- res.json(req.session.user);
150
- },
151
- });
152
-
153
- ____0.all({
154
- name: '/x-dashboard-admin/api/files',
155
- hide: !0,
156
- callback: function (req, res) {
157
- res.setHeader('x-dashboard-content', 'from x-dashboard-server');
158
- res.setHeader('Content-Type', 'application/json');
159
- res.writeHeader(200);
160
- var arr = [];
161
- for (var i = 0; i < ____0.fsm.list.length; i++) {
162
- var f = ____0.fsm.list[i];
163
- arr.push({
164
- path: f.path,
165
- count: f.count,
166
- });
167
- }
168
- res.end(JSON.stringify(arr));
169
- },
170
- });
171
-
172
- ____0.all({
173
- name: '/x-dashboard-admin/api*',
174
- hide: !0,
175
- callback: function (req, res) {
176
- res.setHeader('x-dashboard-content', 'from x-dashboard-server');
177
- res.setHeader('Content-Type', 'application/json');
178
- res.writeHeader(200);
179
- res.end(JSON.stringify('USING BY BUILTIN ROUTING !! '));
180
- },
181
- });
182
-
183
- ____0.post('/x-dashboard-Language/Change', function (req, res) {
184
- let name = req.body.name || 'ar';
185
- req.session.lang = name;
186
- ____0.saveSession(req.session);
187
- res.ending(0, JSON.stringify({ done: !0 }));
188
- });
189
- };
1
+ module.exports = function init(____0) {
2
+ let dir = __dirname + '/../isite_files';
3
+
4
+ ____0.get({
5
+ name: '/x-dashboard-admin',
6
+ path: dir + '/html/index.html',
7
+ parser: 'html',
8
+ parserDir: dir,
9
+ hide: !0,
10
+ });
11
+ ____0.get({
12
+ name: '/x-dashboard-images',
13
+ path: dir + '/images',
14
+ hide: !0,
15
+ });
16
+ ____0.get({
17
+ name: '/x-dashboard-fonts',
18
+ path: dir + '/fonts',
19
+ hide: !0,
20
+ });
21
+ ____0.get({
22
+ name: '/x-dashboard-js',
23
+ path: dir + '/js',
24
+ hide: !0,
25
+ });
26
+ ____0.get({
27
+ name: '/x-dashboard-css',
28
+ path: dir + '/css',
29
+ compress: !0,
30
+ hide: !0,
31
+ });
32
+ ____0.get({
33
+ name: '/x-dashboard-css/bootstrap3.css',
34
+ path: [dir + '/css/bootstrap.css', dir + '/css/navbar.css'],
35
+ compress: !0,
36
+ hide: !0,
37
+ });
38
+ ____0.get({
39
+ name: '/x-dashboard-js/bootstrap3.js',
40
+ path: dir + '/js/bootstrap.js',
41
+ hide: !0,
42
+ });
43
+
44
+ ____0.get({
45
+ name: '/x-dashboard-js/script.js',
46
+ hide: !0,
47
+ compress: !0,
48
+ path: [dir + '/js/jquery.js', dir + '/js/bootstrap.js', dir + '/js/angular.js', dir + '/js/prism.js', dir + '/js/client.js'],
49
+ });
50
+ ____0.get({
51
+ name: '/x-dashboard-css/style.css',
52
+ hide: !0,
53
+ compress: !0,
54
+ path: [dir + '/css/bootstrap.css', dir + '/css/font-awesome.css', dir + '/css/navbar.css', dir + '/css/custom.css', dir + '/css/prism.css'],
55
+ });
56
+
57
+ ____0.all({
58
+ name: '/x-dashboard-admin/api/vars',
59
+ hide: !0,
60
+ callback: function (req, res) {
61
+ res.setHeader('x-dashboard-content', 'from x-dashboard-server');
62
+ res.setHeader('Content-Type', 'application/json');
63
+ res.writeHeader(200);
64
+ res.end(JSON.stringify(____0.vars));
65
+ },
66
+ });
67
+
68
+ ____0.all({
69
+ name: '/x-dashboard-admin/api/routes',
70
+ hide: !0,
71
+ callback: function (req, res) {
72
+ res.setHeader('x-dashboard-content', 'from x-dashboard-server');
73
+ res.setHeader('Content-Type', 'application/json');
74
+ res.writeHeader(200);
75
+ var arr = [];
76
+ for (var i = 0; i < ____0.routeList.length; i++) {
77
+ var r = ____0.routeList[i];
78
+ if (!r.hide) {
79
+ arr.push({
80
+ name: r.name,
81
+ path: r.path,
82
+ method: r.method,
83
+ count: r.count,
84
+ });
85
+ }
86
+ }
87
+ res.end(JSON.stringify(arr));
88
+ },
89
+ });
90
+
91
+ ____0.all({
92
+ name: '/x-dashboard-admin/api/session',
93
+ hide: !0,
94
+ callback: function (req, res) {
95
+ res.htmlContent(____0.toHtmlTable(req.session));
96
+ },
97
+ });
98
+
99
+ ____0.all({
100
+ name: '/x-dashboard-admin/api/sessions',
101
+ hide: !0,
102
+ callback: function (req, res) {
103
+ res.setHeader('x-dashboard-content', 'from x-dashboard-server');
104
+ res.setHeader('Content-Type', 'application/json');
105
+ res.writeHeader(200);
106
+ var arr = [];
107
+ for (var i = 0; i < ____0.sessions.length; i++) {
108
+ var s = ____0.sessions[i];
109
+ arr.push({
110
+ ip: s.ip,
111
+ user_id: s.user_id,
112
+ modifiedTime: s.modifiedTime,
113
+ accessToken: s.accessToken,
114
+ createdTime: s.createdTime,
115
+ requestesCount: s.requestesCount,
116
+ });
117
+ }
118
+ res.end(JSON.stringify(arr));
119
+ },
120
+ });
121
+
122
+ ____0.all({
123
+ name: '/x-dashboard-admin/api/cookie',
124
+ hide: !0,
125
+ callback: function (req, res) {
126
+ res.setHeader('x-dashboard-content', 'from x-dashboard-server');
127
+ res.setHeader('Content-Type', 'application/json');
128
+ res.writeHeader(200);
129
+ res.end(JSON.stringify(req.cookie));
130
+ },
131
+ });
132
+
133
+ ____0.all({
134
+ name: '/x-dashboard-admin/api/users',
135
+ hide: !0,
136
+ callback: function (req, res) {
137
+ res.set('x-dashboard-content', 'from x-dashboard-server');
138
+ res.set('Content-Type', 'application/json');
139
+ res.json(____0.security.users);
140
+ },
141
+ });
142
+
143
+ ____0.all({
144
+ name: '/x-dashboard-admin/api/user',
145
+ hide: !0,
146
+ callback: function (req, res) {
147
+ res.set('x-dashboard-content', 'from x-dashboard-server');
148
+ res.set('Content-Type', 'application/json');
149
+ res.json(req.session.user);
150
+ },
151
+ });
152
+
153
+ ____0.all({
154
+ name: '/x-dashboard-admin/api/files',
155
+ hide: !0,
156
+ callback: function (req, res) {
157
+ res.setHeader('x-dashboard-content', 'from x-dashboard-server');
158
+ res.setHeader('Content-Type', 'application/json');
159
+ res.writeHeader(200);
160
+ var arr = [];
161
+ for (var i = 0; i < ____0.fsm.list.length; i++) {
162
+ var f = ____0.fsm.list[i];
163
+ arr.push({
164
+ path: f.path,
165
+ count: f.count,
166
+ });
167
+ }
168
+ res.end(JSON.stringify(arr));
169
+ },
170
+ });
171
+
172
+ ____0.all({
173
+ name: '/x-dashboard-admin/api*',
174
+ hide: !0,
175
+ callback: function (req, res) {
176
+ res.setHeader('x-dashboard-content', 'from x-dashboard-server');
177
+ res.setHeader('Content-Type', 'application/json');
178
+ res.writeHeader(200);
179
+ res.end(JSON.stringify('USING BY BUILTIN ROUTING !! '));
180
+ },
181
+ });
182
+
183
+ ____0.post('/x-dashboard-Language/Change', function (req, res) {
184
+ let name = req.body.name || 'ar';
185
+ req.session.lang = name;
186
+ ____0.saveSession(req.session);
187
+ res.ending(0, JSON.stringify({ done: !0 }));
188
+ });
189
+ };