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