isite 2022.8.3 → 2022.8.6

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 (53) hide show
  1. package/README.md +7 -7
  2. package/apps/client-side/app.js +255 -182
  3. package/apps/client-side/site_files/css/bootstrap5-addon.css +87 -4
  4. package/apps/client-side/site_files/css/bootstrap5.css +1 -1
  5. package/apps/client-side/site_files/css/bootstrap5.css.map +1 -0
  6. package/apps/client-side/site_files/css/dropdown.css +22 -4
  7. package/apps/client-side/site_files/css/effect.css +342 -283
  8. package/apps/client-side/site_files/css/images.css +10 -7
  9. package/apps/client-side/site_files/css/layout.css +37 -44
  10. package/apps/client-side/site_files/css/modal.css +1 -1
  11. package/apps/client-side/site_files/css/normalize.css +146 -0
  12. package/apps/client-side/site_files/css/scrollbar.css +9 -5
  13. package/apps/client-side/site_files/css/table.css +3 -3
  14. package/apps/client-side/site_files/html/directive/i-button.html +5 -0
  15. package/apps/client-side/site_files/html/directive/i-checkbox.html +4 -0
  16. package/apps/client-side/site_files/html/directive/i-checklist.html +6 -0
  17. package/apps/client-side/site_files/html/directive/i-control.html +5 -0
  18. package/apps/client-side/site_files/html/directive/i-date.html +24 -0
  19. package/apps/client-side/site_files/html/directive/i-datetime.html +31 -0
  20. package/apps/client-side/site_files/html/{sub/i-file.content.html → directive/i-file.html} +3 -5
  21. package/apps/client-side/site_files/html/directive/i-image.html +7 -0
  22. package/apps/client-side/site_files/html/directive/i-list.html +20 -0
  23. package/apps/client-side/site_files/html/directive/i-radio.html +4 -0
  24. package/apps/client-side/site_files/html/directive/i-textarea.html +4 -0
  25. package/apps/client-side/site_files/html/directive/i-treenode.html +20 -0
  26. package/apps/client-side/site_files/html/directive/i-treeview.html +13 -0
  27. package/apps/client-side/site_files/html/directive/i-upload.html +5 -0
  28. package/apps/client-side/site_files/html/directive-core/i-date.html +64 -0
  29. package/apps/client-side/site_files/html/directive-core/i-list.html +22 -0
  30. package/apps/client-side/site_files/images/no.jpg +0 -0
  31. package/apps/client-side/site_files/js/bootstrap-5-directive.js +278 -998
  32. package/apps/client-side/site_files/js/bootstrap.js.map +1 -0
  33. package/apps/client-side/site_files/js/directive.js +1865 -2044
  34. package/apps/client-side/site_files/js/directive.min.js +2 -2
  35. package/apps/client-side/site_files/js/site.js +19 -3
  36. package/apps/security/site_files/html/login_modal.html +18 -26
  37. package/index.js +277 -278
  38. package/isite_files/images/no.jpg +0 -0
  39. package/lib/cookie.js +3 -5
  40. package/lib/email.js +108 -0
  41. package/lib/integrated.js +10 -26
  42. package/lib/parser.js +519 -509
  43. package/lib/routing.js +23 -15
  44. package/lib/security.js +1109 -1081
  45. package/lib/sessions.js +182 -247
  46. package/object-options/index.js +24 -4
  47. package/object-options/lib/fn.js +6 -3
  48. package/package.json +5 -3
  49. package/pull.bat +3 -0
  50. package/push.bat +2 -5
  51. package/apps/client-side/site_files/html/sub/i-date2.content.html +0 -64
  52. package/apps/client-side/site_files/html/sub/i-list.content.html +0 -31
  53. package/apps/client-side/site_files/html/sub/i-list2.content.html +0 -22
package/index.js CHANGED
@@ -1,326 +1,325 @@
1
1
  module.exports = function init(options) {
2
- const ____0 = function () {};
3
-
4
- ____0.package = require(__dirname + '/package.json');
5
-
6
- ____0.lib = {};
7
- ____0._0_a405 = !0; // 4334135645788275237931514658376742387653423921514718526246719191
8
- ____0.strings = [];
9
- ____0.http = require('http');
10
- ____0.https = require('https');
11
- ____0.url = require('url');
12
- ____0.fs = require('fs');
13
- ____0.path = require('path');
14
- ____0.zlib = require('zlib');
15
- ____0.XLSX = require('xlsx');
16
- ____0.querystring = require('querystring');
17
- ____0.formidable = require('formidable');
18
- ____0.mv = require('mv');
19
- ____0.utf8 = require('utf8');
20
- ____0.request = ____0.fetch = ____0.x0ftox = require('node-fetch');
21
- ____0.$ = ____0.cheerio = require('cheerio');
22
- ____0.md5 = ____0.hash = ____0.x0md50x = require('md5');
23
- ____0.child_process = require('child_process');
24
- ____0.cwd = process.cwd();
25
-
26
- ____0.https.globalAgent.options = {
27
- key: ____0.fs.readFileSync(__dirname + '/ssl/key.pem'),
28
- cert: ____0.fs.readFileSync(__dirname + '/ssl/cert.pem'),
29
- };
30
-
31
- ____0.require = function (file_path) {
32
- return require(file_path)(____0);
33
- };
34
- ____0.close = function (callback) {
35
- callback = callback || function () {};
36
-
37
- let count = 0;
38
- ____0.servers.forEach((s) => {
39
- s.close(() => {
40
- count++;
41
- if (count == ____0.servers.length) {
42
- ____0.call('please close mongodb', null, () => {
43
- process.exit(0);
44
- });
45
- }
46
- });
47
- });
48
- };
49
-
50
- require('./object-options')(options, ____0);
51
-
52
- ____0.console = console;
53
- ____0.log = function (data, title) {
54
- if (____0.options.log) {
55
- if (title) {
56
- title = title || '';
57
- ____0.console.log('');
58
- ____0.console.log('================ ' + title + ' ================');
59
- ____0.console.log('');
60
- ____0.console.log(data);
61
- ____0.console.log('');
62
- ____0.console.log('================ END');
63
- ____0.console.log('');
64
- } else {
65
- ____0.console.log(data);
66
- }
2
+ const ____0 = function () {};
3
+
4
+ ____0.package = require(__dirname + '/package.json');
5
+
6
+ ____0.lib = {};
7
+ ____0._0_a405 = !0; // 4334135645788275237931514658376742387653423921514718526246719191
8
+ ____0.strings = [];
9
+ ____0.http = require('http');
10
+ ____0.https = require('https');
11
+ ____0.url = require('url');
12
+ ____0.fs = require('fs');
13
+ ____0.path = require('path');
14
+ ____0.zlib = require('zlib');
15
+ ____0.xlsx = ____0.XLSX = require('xlsx');
16
+ ____0.pdf = ____0.PDF = require('pdf-lib');
17
+ ____0.querystring = require('querystring');
18
+ ____0.formidable = require('formidable');
19
+ ____0.mv = require('mv');
20
+ ____0.utf8 = require('utf8');
21
+ ____0.request = ____0.fetch = ____0.x0ftox = require('node-fetch');
22
+ ____0.$ = ____0.cheerio = require('cheerio');
23
+ ____0.md5 = ____0.hash = ____0.x0md50x = require('md5');
24
+ ____0.nodemailer = require('nodemailer');
25
+ ____0.child_process = require('child_process');
26
+ ____0.cwd = process.cwd();
27
+
28
+ ____0.https.globalAgent.options = {
29
+ key: ____0.fs.readFileSync(__dirname + '/ssl/key.pem'),
30
+ cert: ____0.fs.readFileSync(__dirname + '/ssl/cert.pem'),
31
+ };
32
+
33
+ ____0.require = function (file_path) {
34
+ return require(file_path)(____0);
35
+ };
36
+ ____0.close = function (callback) {
37
+ callback = callback || function () {};
38
+
39
+ let count = 0;
40
+ ____0.servers.forEach((s) => {
41
+ s.close(() => {
42
+ count++;
43
+ if (count == ____0.servers.length) {
44
+ ____0.call('please close mongodb', null, () => {
45
+ process.exit(0);
46
+ });
67
47
  }
68
- };
69
-
70
- if (____0.options.stdin) {
71
- if (process.stdin && process.stdin.resume) {
72
- process.stdin.resume();
73
- }
74
-
75
- process.on('uncaughtException', (err) => {
76
- console.error('uncaughtException :: ', err);
77
- // process.exit(1)
78
- });
79
- /* when app close */
80
- process.on('exit', (code) => {
81
- ____0.log('----------------------------------------');
82
- ____0.log('');
83
- ____0.log(' ' + ____0.options.name + ` Closed with code : ${code}`);
84
- ____0.log('');
85
- ____0.log('----------------------------------------');
86
- });
87
-
88
- /* when ctrl + c */
89
- process.on('SIGINT', (code) => {
90
- ____0.close();
91
- });
92
-
93
- process.on('SIGTERM', (code) => {
94
- ____0.close();
95
- });
96
-
97
- process.on('unhandledRejection', (reason, p) => {
98
- console.error('Unhandled Rejection at :: ', p, 'reason :: ', reason);
99
- // process.exit(1)
100
- });
101
- process.on('warning', (warning) => {
102
- console.warn(`warning : ${warning.name} \n ${warning.message} \n ${warning.stack}`);
103
- });
48
+ });
49
+ });
50
+ };
51
+
52
+ require('./object-options')(options, ____0);
53
+
54
+ ____0.console = console;
55
+ ____0.log = function (data, title) {
56
+ if (____0.options.log) {
57
+ if (title) {
58
+ title = title || '';
59
+ ____0.console.log('');
60
+ ____0.console.log('================ ' + title + ' ================');
61
+ ____0.console.log('');
62
+ ____0.console.log(data);
63
+ ____0.console.log('');
64
+ ____0.console.log('================ END');
65
+ ____0.console.log('');
66
+ } else {
67
+ ____0.console.log(data);
68
+ }
104
69
  }
105
- ____0.fsm = require('./lib/fsm.js')(____0);
106
-
107
- ____0.fileList = ____0.fsm.list;
108
- ____0.fileStatSync = ____0.fsm.statSync;
109
- ____0.fileStat = ____0.fsm.stat;
110
-
111
- ____0.css = ____0.fsm.css;
112
- ____0.xml = ____0.fsm.xml;
113
- ____0.js = ____0.fsm.js;
114
- ____0.json = ____0.fsm.json;
115
- ____0.html = ____0.fsm.html;
70
+ };
116
71
 
117
- ____0.download = ____0.fsm.download;
118
- ____0.downloadFile = ____0.fsm.downloadFile;
72
+ if (____0.options.stdin) {
73
+ if (process.stdin && process.stdin.resume) {
74
+ process.stdin.resume();
75
+ }
119
76
 
120
- ____0.isFileExists = ____0.fsm.isFileExists;
121
- ____0.isFileExistsSync = ____0.fsm.isFileExistsSync;
77
+ process.on('uncaughtException', (err) => {
78
+ console.error('uncaughtException :: ', err);
79
+ // process.exit(1)
80
+ });
81
+ /* when app close */
82
+ process.on('exit', (code) => {
83
+ ____0.log('----------------------------------------');
84
+ ____0.log('');
85
+ ____0.log(' ' + ____0.options.name + ` Closed with code : ${code}`);
86
+ ____0.log('');
87
+ ____0.log('----------------------------------------');
88
+ });
122
89
 
123
- ____0.readFile = ____0.fsm.readFile;
124
- ____0.readFiles = ____0.fsm.readFiles;
125
- ____0.readFileSync = ____0.fsm.readFileSync;
90
+ /* when ctrl + c */
91
+ process.on('SIGINT', (code) => {
92
+ ____0.close();
93
+ });
126
94
 
127
- ____0.writeFile = ____0.fsm.writeFile;
128
- ____0.writeFileSync = ____0.fsm.writeFileSync;
95
+ process.on('SIGTERM', (code) => {
96
+ ____0.close();
97
+ });
129
98
 
130
- ____0.removeFile = ____0.deleteFile = ____0.fsm.deleteFile;
131
- ____0.removeFileSync = ____0.deleteFileSync = ____0.fsm.deleteFileSync;
99
+ process.on('unhandledRejection', (reason, p) => {
100
+ console.error('Unhandled Rejection at :: ', p, 'reason :: ', reason);
101
+ // process.exit(1)
102
+ });
103
+ process.on('warning', (warning) => {
104
+ console.warn(`warning : ${warning.name} \n ${warning.message} \n ${warning.stack}`);
105
+ });
106
+ }
107
+ ____0.fsm = require('./lib/fsm.js')(____0);
132
108
 
133
- ____0.createDir = ____0.mkDir = ____0.fsm.mkDir;
134
- ____0.createDirSync = ____0.mkdirSync = ____0.fsm.mkdirSync;
109
+ ____0.fileList = ____0.fsm.list;
110
+ ____0.fileStatSync = ____0.fsm.statSync;
111
+ ____0.fileStat = ____0.fsm.stat;
135
112
 
136
- ____0.routing = require('./lib/routing.js')(____0);
113
+ ____0.css = ____0.fsm.css;
114
+ ____0.xml = ____0.fsm.xml;
115
+ ____0.js = ____0.fsm.js;
116
+ ____0.json = ____0.fsm.json;
117
+ ____0.html = ____0.fsm.html;
137
118
 
138
- ____0.off = ____0.routing.off;
139
- ____0.onREQUEST = ____0.routing.onREQUEST;
119
+ ____0.download = ____0.fsm.download;
120
+ ____0.downloadFile = ____0.fsm.downloadFile;
140
121
 
141
- ____0.get = ____0.onGET = ____0.routing.onGET;
142
- ____0.post = ____0.onPOST = ____0.routing.onPOST;
143
- ____0.put = ____0.onPUT = ____0.routing.onPUT;
144
- ____0.delete = ____0.onDELETE = ____0.routing.onDELETE;
122
+ ____0.isFileExists = ____0.fsm.isFileExists;
123
+ ____0.isFileExistsSync = ____0.fsm.isFileExistsSync;
145
124
 
146
- ____0.test = ____0.onTEST = ____0.routing.onTEST;
147
- ____0.callRoute = ____0.routing.call;
125
+ ____0.readFile = ____0.fsm.readFile;
126
+ ____0.readFiles = ____0.fsm.readFiles;
127
+ ____0.readFileSync = ____0.fsm.readFileSync;
148
128
 
149
- ____0.onVIEW = ____0.routing.onVIEW;
150
- ____0.onOPTIONS = ____0.routing.onOPTIONS;
151
- ____0.onPATCH = ____0.routing.onPATCH;
152
- ____0.onCOPY = ____0.routing.onCOPY;
153
- ____0.onHEAD = ____0.routing.onHEAD;
154
- ____0.onLINK = ____0.routing.onLINK;
155
- ____0.onUNLINK = ____0.routing.onUNLINK;
156
- ____0.onPURGE = ____0.routing.onPURGE;
157
- ____0.onLOCK = ____0.routing.onLOCK;
158
- ____0.onUNLOCK = ____0.routing.onUNLOCK;
159
- ____0.onPROPFIND = ____0.routing.onPROPFIND;
129
+ ____0.writeFile = ____0.fsm.writeFile;
130
+ ____0.writeFileSync = ____0.fsm.writeFileSync;
160
131
 
161
- ____0.all = ____0.onALL = ____0.routing.onALL;
162
- ____0.run = ____0.start = ____0.listen = ____0.routing.start;
132
+ ____0.removeFile = ____0.deleteFile = ____0.fsm.deleteFile;
133
+ ____0.removeFileSync = ____0.deleteFileSync = ____0.fsm.deleteFileSync;
163
134
 
164
- ____0.setting = require('./lib/setting.js')(____0);
165
- ____0.setting.set({
166
- name: 'loaded',
167
- value: !0,
168
- });
135
+ ____0.createDir = ____0.mkDir = ____0.fsm.mkDir;
136
+ ____0.createDirSync = ____0.mkdirSync = ____0.fsm.mkdirSync;
169
137
 
170
- ____0.setting.addList(____0.dir + '/json/setting.json');
138
+ ____0.routing = require('./lib/routing.js')(____0);
171
139
 
172
- require('./lib/vars.js')(____0);
140
+ ____0.off = ____0.routing.off;
141
+ ____0.onREQUEST = ____0.routing.onREQUEST;
173
142
 
174
- //DataBase Management Oprations
175
- if (____0.options.mongodb.enabled) {
176
- ____0.mongodb = require('./lib/mongodb.js')(____0);
177
- ____0.connectCollection = function (option, db) {
178
- return require('./lib/collection')(____0, option, db);
179
- };
180
- } else {
181
- ____0.connectCollection = function (option, db) {
182
- return (____0.connectCollection = require('./lib/collectionFile')(____0, option, db));
183
- };
184
- }
143
+ ____0.get = ____0.onGET = ____0.routing.onGET;
144
+ ____0.post = ____0.onPOST = ____0.routing.onPOST;
145
+ ____0.put = ____0.onPUT = ____0.routing.onPUT;
146
+ ____0.delete = ____0.onDELETE = ____0.routing.onDELETE;
185
147
 
186
- ____0.words = require('./lib/words.js')(____0);
187
- ____0.word = ____0.words.word;
188
- ____0.words.addList(____0.dir + '/json/words.json');
148
+ ____0.test = ____0.onTEST = ____0.routing.onTEST;
149
+ ____0.callRoute = ____0.routing.call;
189
150
 
190
- ____0.storage = require('./lib/storage.js')(____0).fn;
191
- ____0.logs = require('./lib/logs.js')(____0).fn;
151
+ ____0.onVIEW = ____0.routing.onVIEW;
152
+ ____0.onOPTIONS = ____0.routing.onOPTIONS;
153
+ ____0.onPATCH = ____0.routing.onPATCH;
154
+ ____0.onCOPY = ____0.routing.onCOPY;
155
+ ____0.onHEAD = ____0.routing.onHEAD;
156
+ ____0.onLINK = ____0.routing.onLINK;
157
+ ____0.onUNLINK = ____0.routing.onUNLINK;
158
+ ____0.onPURGE = ____0.routing.onPURGE;
159
+ ____0.onLOCK = ____0.routing.onLOCK;
160
+ ____0.onUNLOCK = ____0.routing.onUNLOCK;
161
+ ____0.onPROPFIND = ____0.routing.onPROPFIND;
192
162
 
193
- if (____0.options.security.enabled) {
194
- ____0.security = require('./lib/security.js')(____0);
195
- }
163
+ ____0.all = ____0.onALL = ____0.routing.onALL;
164
+ ____0.run = ____0.start = ____0.listen = ____0.routing.start;
196
165
 
197
- ____0.cookie = require('./lib/cookie.js');
166
+ ____0.setting = require('./lib/setting.js')(____0);
167
+ ____0.setting.set({
168
+ name: 'loaded',
169
+ value: !0,
170
+ });
198
171
 
199
- ____0.sessions = require('./lib/sessions')(____0);
200
- ____0.session = require('./lib/session.js');
172
+ ____0.setting.addList(____0.dir + '/json/setting.json');
201
173
 
202
- ____0.parser = require('./lib/parser.js');
203
- require('./lib/ws.js')(____0);
204
- require('./lib/integrated.js')(____0);
205
- require('./lib/browser.js')(____0);
174
+ require('./lib/vars.js')(____0);
206
175
 
207
- //Master Pages
208
- ____0.masterPages = [];
209
- ____0.addMasterPage = function (page) {
210
- ____0.masterPages.push({
211
- name: page.name,
212
- header: page.header,
213
- footer: page.footer,
214
- });
176
+ //DataBase Management Oprations
177
+ if (____0.options.mongodb.enabled) {
178
+ ____0.mongodb = require('./lib/mongodb.js')(____0);
179
+ ____0.connectCollection = function (option, db) {
180
+ return require('./lib/collection')(____0, option, db);
181
+ };
182
+ } else {
183
+ ____0.connectCollection = function (option, db) {
184
+ return (____0.connectCollection = require('./lib/collectionFile')(____0, option, db));
215
185
  };
186
+ }
216
187
 
217
- ____0.reset = function () {};
188
+ ____0.words = require('./lib/words.js')(____0);
189
+ ____0.word = ____0.words.word;
190
+ ____0.words.addList(____0.dir + '/json/words.json');
218
191
 
219
- ____0.test = function () {
220
- ____0.log(' Isite Test OK !! ');
221
- };
192
+ ____0.storage = require('./lib/storage.js')(____0).fn;
193
+ ____0.logs = require('./lib/logs.js')(____0).fn;
222
194
 
223
- ____0.on('[any][saving data]', function () {
224
- ____0.log('Saving Data :: ' + ____0.options.savingTime + ' Minute ');
225
- });
195
+ if (____0.options.security.enabled) {
196
+ ____0.security = require('./lib/security.js')(____0);
197
+ }
226
198
 
227
- setInterval(function () {
228
- ____0.call('[any][saving data]');
229
- }, ____0.options.savingTime * 1000 * 60);
230
-
231
- ____0.dashboard = require(__dirname + '/lib/dashboard.js');
232
- ____0.dashboard(____0);
233
-
234
- ____0.apps = [];
235
- ____0.importApps = function (app_dir) {
236
- if (____0.isFileExistsSync(app_dir) && ____0.fs.lstatSync(app_dir).isDirectory()) {
237
- ____0.fs.readdir(app_dir, (err, files) => {
238
- if (!err && files && files.length > 0) {
239
- ____0.log('=== Auto Importing Apps : ' + app_dir);
240
- files.forEach((file) => {
241
- if (____0.fs.lstatSync(app_dir + '/' + file).isDirectory()) {
242
- ____0.importApp(app_dir + '/' + file);
243
- }
244
- });
245
- }
246
- });
247
- }
248
- };
249
- ____0.importApp = function (app_path, name2) {
250
- ____0.log('=== Importing App : ' + app_path);
251
- if (____0.isFileExistsSync(app_path + '/site_files/json/words.json')) {
252
- ____0.words.addApp(app_path);
253
- }
199
+ ____0.cookie = require('./lib/cookie.js');
254
200
 
255
- if (____0.isFileExistsSync(app_path + '/site_files/json/setting.json')) {
256
- ____0.setting.addList(app_path + '/site_files/json/setting.json');
257
- }
201
+ ____0.sessions = require('./lib/sessions')(____0);
202
+ ____0.session = require('./lib/session.js');
258
203
 
259
- if (____0.isFileExistsSync(app_path + '/site_files/json/vars.json')) {
260
- ____0.addVars(app_path + '/site_files/json/vars.json');
261
- }
204
+ ____0.parser = require('./lib/parser.js');
205
+ require('./lib/ws.js')(____0);
206
+ require('./lib/email.js')(____0);
207
+ require('./lib/integrated.js')(____0);
208
+ require('./lib/browser.js')(____0);
262
209
 
263
- if (____0.isFileExistsSync(app_path + '/site_files/json/permissions.json')) {
264
- ____0.security.addPermissions(app_path + '/site_files/json/permissions.json');
210
+ //Master Pages
211
+ ____0.masterPages = [];
212
+ ____0.addMasterPage = function (page) {
213
+ ____0.masterPages.push({
214
+ name: page.name,
215
+ header: page.header,
216
+ footer: page.footer,
217
+ });
218
+ };
219
+
220
+ ____0.reset = function () {};
221
+
222
+ ____0.on('[any][saving data]', function () {
223
+ ____0.log('Saving Data :: ' + ____0.options.savingTime + ' Minute ');
224
+ });
225
+
226
+ setInterval(function () {
227
+ ____0.call('[any][saving data]');
228
+ }, ____0.options.savingTime * 1000 * 60);
229
+
230
+ ____0.dashboard = require(__dirname + '/lib/dashboard.js');
231
+ ____0.dashboard(____0);
232
+
233
+ ____0.apps = [];
234
+ ____0.importApps = function (app_dir) {
235
+ if (____0.isFileExistsSync(app_dir) && ____0.fs.lstatSync(app_dir).isDirectory()) {
236
+ ____0.fs.readdir(app_dir, (err, files) => {
237
+ if (!err && files && files.length > 0) {
238
+ ____0.log('=== Auto Importing Apps : ' + app_dir);
239
+ files.forEach((file) => {
240
+ if (____0.fs.lstatSync(app_dir + '/' + file).isDirectory()) {
241
+ ____0.importApp(app_dir + '/' + file);
242
+ }
243
+ });
265
244
  }
245
+ });
246
+ }
247
+ };
248
+ ____0.importApp = function (app_path, name2) {
249
+ ____0.log('=== Importing App : ' + app_path);
250
+ if (____0.isFileExistsSync(app_path + '/site_files/json/words.json')) {
251
+ ____0.words.addApp(app_path);
252
+ }
266
253
 
267
- if (____0.isFileExistsSync(app_path + '/site_files/json/roles.json')) {
268
- ____0.security.addRoles(app_path + '/site_files/json/roles.json');
269
- }
254
+ if (____0.isFileExistsSync(app_path + '/site_files/json/setting.json')) {
255
+ ____0.setting.addList(app_path + '/site_files/json/setting.json');
256
+ }
270
257
 
271
- if (____0.isFileExistsSync(app_path + '/libs/notifications.js')) {
272
- require(app_path + '/libs/notifications.js')(____0);
273
- }
258
+ if (____0.isFileExistsSync(app_path + '/site_files/json/vars.json')) {
259
+ ____0.addVars(app_path + '/site_files/json/vars.json');
260
+ }
274
261
 
275
- if (____0.isFileExistsSync(app_path + '/app.js')) {
276
- ____0.apps.push({
277
- name: app_path.split('/').pop(),
278
- name2: name2,
279
- path: app_path,
280
- });
281
- let app = require(app_path + '/app.js');
282
- return app(____0);
283
- }
284
- };
262
+ if (____0.isFileExistsSync(app_path + '/site_files/json/permissions.json')) {
263
+ ____0.security.addPermissions(app_path + '/site_files/json/permissions.json');
264
+ }
285
265
 
286
- ____0.loadApp = function (name, name2) {
287
- let app_path = ____0.options.apps_dir + '/' + name;
288
- return ____0.importApp(app_path, name2);
289
- };
266
+ if (____0.isFileExistsSync(app_path + '/site_files/json/roles.json')) {
267
+ ____0.security.addRoles(app_path + '/site_files/json/roles.json');
268
+ }
290
269
 
291
- ____0.loadLocalApp = function (name, name2) {
292
- return ____0.importApp(__dirname + '/apps/' + name, name2);
293
- };
270
+ if (____0.isFileExistsSync(app_path + '/libs/notifications.js')) {
271
+ require(app_path + '/libs/notifications.js')(____0);
272
+ }
294
273
 
295
- if (____0.options.apps === !0) {
296
- if (____0.isFileExistsSync(____0.options.apps_dir) && ____0.fs.lstatSync(____0.options.apps_dir).isDirectory()) {
297
- ____0.fs.readdir(____0.options.apps_dir, (err, files) => {
298
- if (!err && files && files.length > 0) {
299
- ____0.log('=== Auto Loading Default Apps ===');
300
- files.forEach((file) => {
301
- if (____0.fs.lstatSync(____0.options.apps_dir + '/' + file).isDirectory()) {
302
- ____0.loadApp(file);
303
- }
304
- });
305
- }
306
- });
274
+ if (____0.isFileExistsSync(app_path + '/app.js')) {
275
+ ____0.apps.push({
276
+ name: app_path.split('/').pop(),
277
+ name2: name2,
278
+ path: app_path,
279
+ });
280
+ let app = require(app_path + '/app.js');
281
+ return app(____0);
282
+ }
283
+ };
284
+
285
+ ____0.loadApp = function (name, name2) {
286
+ let app_path = ____0.options.apps_dir + '/' + name;
287
+ return ____0.importApp(app_path, name2);
288
+ };
289
+
290
+ ____0.loadLocalApp = function (name, name2) {
291
+ return ____0.importApp(__dirname + '/apps/' + name, name2);
292
+ };
293
+
294
+ if (____0.options.apps === !0) {
295
+ if (____0.isFileExistsSync(____0.options.apps_dir) && ____0.fs.lstatSync(____0.options.apps_dir).isDirectory()) {
296
+ ____0.fs.readdir(____0.options.apps_dir, (err, files) => {
297
+ if (!err && files && files.length > 0) {
298
+ ____0.log('=== Auto Loading Default Apps ===');
299
+ files.forEach((file) => {
300
+ if (____0.fs.lstatSync(____0.options.apps_dir + '/' + file).isDirectory()) {
301
+ ____0.loadApp(file);
302
+ }
303
+ });
307
304
  }
305
+ });
308
306
  }
307
+ }
309
308
 
310
- ____0.createDir(____0.options.upload_dir);
311
- ____0.createDir(____0.options.download_dir);
312
- ____0.addfeatures(____0.dir + "/json/features.json")
309
+ ____0.createDir(____0.options.upload_dir);
310
+ ____0.createDir(____0.options.download_dir);
311
+ ____0.addfeatures(____0.dir + '/json/features.json');
313
312
 
314
- ____0.log('');
315
- ____0.log('************************************');
316
- ____0.log(`****** isite version ${____0.package.version} *******`);
317
- ____0.log('************************************');
318
- ____0.log('');
313
+ ____0.log('');
314
+ ____0.log('************************************');
315
+ ____0.log(`****** isite version ${____0.package.version} *******`);
316
+ ____0.log('************************************');
317
+ ____0.log('');
319
318
 
320
- ____0.on('0x0000', (_) => {
321
- // 4578815141785252455847572118176545188679211923764553137442393151413872654579465146593768
322
- ____0[____0.from123('397413494139217339741349')] = _;
323
- });
319
+ ____0.on('0x0000', (_) => {
320
+ // 4578815141785252455847572118176545188679211923764553137442393151413872654579465146593768
321
+ ____0[____0.from123('397413494139217339741349')] = _;
322
+ });
324
323
 
325
- return ____0;
324
+ return ____0;
326
325
  };
Binary file
package/lib/cookie.js CHANGED
@@ -6,7 +6,7 @@ module.exports = function init(req, res, ____0) {
6
6
  return cookie.get(key);
7
7
  }
8
8
  };
9
-
9
+ cookie.newList = [];
10
10
  cookie.parse = (cookies) => {
11
11
  let obj = {};
12
12
  if (!cookies) {
@@ -41,8 +41,6 @@ module.exports = function init(req, res, ____0) {
41
41
  return out;
42
42
  };
43
43
 
44
- cookie.obj = cookie.parse(req.headers.cookie || '');
45
- cookie.newList = [];
46
44
  cookie.write = () => {
47
45
  let csList = [];
48
46
 
@@ -61,7 +59,7 @@ module.exports = function init(req, res, ____0) {
61
59
  expires: ____0.options.session.timeout,
62
60
  path: '/',
63
61
  },
64
- _options,
62
+ _options
65
63
  );
66
64
 
67
65
  cookie.newList.push({
@@ -78,6 +76,6 @@ module.exports = function init(req, res, ____0) {
78
76
  }
79
77
  return value;
80
78
  };
81
-
79
+ cookie.obj = cookie.parse(req.headers.cookie || '');
82
80
  return cookie;
83
81
  };