isite 2021.11.17 → 2021.11.28
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 +486 -475
- package/apps/client-side/app.js +27 -1
- package/apps/client-side/site_files/css/btn.css +98 -0
- package/apps/client-side/site_files/css/checkbox.css +10 -7
- package/apps/client-side/site_files/css/dropdown.css +61 -0
- package/apps/client-side/site_files/css/effect.css +283 -280
- package/apps/client-side/site_files/css/font-awesome.css +4615 -3
- package/apps/client-side/site_files/css/font-awesome.min.css +5 -0
- package/apps/client-side/site_files/css/form.css +31 -131
- package/apps/client-side/site_files/css/layout.css +27 -13
- package/apps/client-side/site_files/css/modal.css +184 -164
- package/apps/client-side/site_files/css/tabs.css +3 -3
- package/apps/client-side/site_files/css/theme.css +2 -2
- package/apps/client-side/site_files/css/theme_dark.css +1 -1
- package/apps/client-side/site_files/css/theme_paper.css +175 -151
- package/apps/client-side/site_files/html/sub/i-date2.content.html +64 -0
- package/apps/client-side/site_files/html/sub/i-list.content.html +31 -0
- package/apps/client-side/site_files/html/sub/i-list2.content.html +22 -0
- package/apps/client-side/site_files/js/directive.js +1570 -1650
- package/apps/client-side/site_files/js/directive.min.js +2 -2
- package/apps/client-side/site_files/js/site.js +6 -0
- package/apps/client-side/site_files/js/site.min.js +1 -1
- package/apps/client-side/site_files/webfonts/fa-brands-400.eot +0 -0
- package/apps/client-side/site_files/webfonts/fa-brands-400.svg +3717 -0
- package/apps/client-side/site_files/webfonts/fa-brands-400.ttf +0 -0
- package/apps/client-side/site_files/webfonts/fa-brands-400.woff +0 -0
- package/apps/client-side/site_files/webfonts/fa-brands-400.woff2 +0 -0
- package/apps/client-side/site_files/webfonts/fa-regular-400.eot +0 -0
- package/apps/client-side/site_files/webfonts/fa-regular-400.svg +801 -0
- package/apps/client-side/site_files/webfonts/fa-regular-400.ttf +0 -0
- package/apps/client-side/site_files/webfonts/fa-regular-400.woff +0 -0
- package/apps/client-side/site_files/webfonts/fa-regular-400.woff2 +0 -0
- package/apps/client-side/site_files/webfonts/fa-solid-900.eot +0 -0
- package/apps/client-side/site_files/webfonts/fa-solid-900.svg +5034 -0
- package/apps/client-side/site_files/webfonts/fa-solid-900.ttf +0 -0
- package/apps/client-side/site_files/webfonts/fa-solid-900.woff +0 -0
- package/apps/client-side/site_files/webfonts/fa-solid-900.woff2 +0 -0
- package/index.js +2 -2
- package/lib/mongodb.js +3 -4
- package/lib/parser.js +24 -12
- package/lib/routing.js +21 -2
- package/lib/security.js +2 -2
- package/lib/session.js +2 -8
- package/lib/sessions.js +4 -4
- package/lib/ws.js +3 -0
- package/object-options/index.js +3 -3
- package/object-options/lib/fn.js +1 -1
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.js
CHANGED
|
@@ -237,12 +237,12 @@ module.exports = function init(options) {
|
|
|
237
237
|
};
|
|
238
238
|
|
|
239
239
|
____0.on('[any][saving data]', function () {
|
|
240
|
-
____0.log('Saving Data :: ' + ____0.options.
|
|
240
|
+
____0.log('Saving Data :: ' + ____0.options.savingTime + ' Minute ');
|
|
241
241
|
});
|
|
242
242
|
|
|
243
243
|
setInterval(function () {
|
|
244
244
|
____0.call('[any][saving data]');
|
|
245
|
-
}, ____0.options.
|
|
245
|
+
}, ____0.options.savingTime * 1000 * 60);
|
|
246
246
|
|
|
247
247
|
____0.dashboard = require(__dirname + '/lib/dashboard.js');
|
|
248
248
|
____0.dashboard(____0);
|
package/lib/mongodb.js
CHANGED
|
@@ -284,7 +284,7 @@ module.exports = function init(____0) {
|
|
|
284
284
|
};
|
|
285
285
|
|
|
286
286
|
_mongo.insert = _mongo.insertMany = function (obj, callback) {
|
|
287
|
-
if (obj.docs.length === 0) {
|
|
287
|
+
if (!obj.docs || obj.docs.length === 0) {
|
|
288
288
|
callback({
|
|
289
289
|
message: 'docs array length is 0',
|
|
290
290
|
});
|
|
@@ -292,16 +292,15 @@ module.exports = function init(____0) {
|
|
|
292
292
|
}
|
|
293
293
|
_mongo.connectDB(obj.dbName, function (err, db) {
|
|
294
294
|
if (!err) {
|
|
295
|
-
if (obj.collectionName
|
|
295
|
+
if (!obj.collectionName) {
|
|
296
296
|
obj.collectionName = ____0.options.mongodb.collection;
|
|
297
297
|
}
|
|
298
298
|
obj.docs.forEach((doc) => {
|
|
299
299
|
doc = _mongo.handleDoc(doc);
|
|
300
300
|
});
|
|
301
|
-
db.collection(____0.options.mongodb.prefix.collection + obj.collectionName).insertMany(obj.docs
|
|
301
|
+
db.collection(____0.options.mongodb.prefix.collection + obj.collectionName).insertMany(obj.docs, obj.options, function (err, result) {
|
|
302
302
|
if (!err) {
|
|
303
303
|
callback(null, result);
|
|
304
|
-
|
|
305
304
|
____0.call('mongodb after insert many', {
|
|
306
305
|
db: obj.dbName,
|
|
307
306
|
collection: obj.collectionName,
|
package/lib/parser.js
CHANGED
|
@@ -249,17 +249,16 @@ module.exports = function init(req, res, ____0, route) {
|
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
function getContent(name) {
|
|
252
|
-
|
|
253
252
|
let path = null;
|
|
254
|
-
|
|
253
|
+
|
|
255
254
|
if (!path || !____0.isFileExistsSync(path)) {
|
|
256
255
|
let arr = name.split('/');
|
|
257
256
|
if (arr.length === 1) {
|
|
258
257
|
path = ____0.path.join(____0.path.dirname(route.parserDir), 'site_files', ____0.path.extname(arr[0]).replace('.', ''), arr[0]);
|
|
259
|
-
}else if (arr.length === 2) {
|
|
260
|
-
path = ____0.path.join(____0.path.dirname(route.parserDir), 'site_files', ____0.path.extname(arr[1]).replace('.', ''), arr[0]
|
|
258
|
+
} else if (arr.length === 2) {
|
|
259
|
+
path = ____0.path.join(____0.path.dirname(route.parserDir), 'site_files', ____0.path.extname(arr[1]).replace('.', ''), arr[0], arr[1]);
|
|
261
260
|
} else if (arr.length === 3) {
|
|
262
|
-
path = ____0.path.join(____0.path.dirname(route.parserDir),
|
|
261
|
+
path = ____0.path.join(____0.path.dirname(route.parserDir), 'site_files', ____0.path.extname(arr[2]).replace('.', ''), arr[0], arr[1], arr[2]);
|
|
263
262
|
}
|
|
264
263
|
}
|
|
265
264
|
|
|
@@ -292,7 +291,10 @@ module.exports = function init(req, res, ____0, route) {
|
|
|
292
291
|
return '';
|
|
293
292
|
}
|
|
294
293
|
|
|
295
|
-
if (name.endsWith('.html')) {
|
|
294
|
+
if (name.endsWith('.content.html')) {
|
|
295
|
+
let txt = ____0.readFileSync(path);
|
|
296
|
+
return txt;
|
|
297
|
+
} else if (name.endsWith('.html')) {
|
|
296
298
|
let txt = ____0.readFileSync(path);
|
|
297
299
|
let $ = ____0.$.load(txt);
|
|
298
300
|
$ = renderHtml($);
|
|
@@ -432,29 +434,39 @@ module.exports = function init(req, res, ____0, route) {
|
|
|
432
434
|
});
|
|
433
435
|
}
|
|
434
436
|
|
|
435
|
-
$('[x-import]').each(function (i, elem) {
|
|
437
|
+
$($('[x-import]').get().reverse()).each(function (i, elem) {
|
|
436
438
|
let file = $(this).attr('x-import');
|
|
439
|
+
$(this).removeAttr('x-import');
|
|
440
|
+
$(this).attr('x-server' , 'x-import');
|
|
437
441
|
if (file.endsWith('.html')) {
|
|
438
442
|
$(this).html(getContent(file) + $(this).html());
|
|
443
|
+
}else if (file.endsWith('.css')) {
|
|
444
|
+
$(this).text(getContent(file) + $(this).html());
|
|
439
445
|
} else {
|
|
440
446
|
$(this).text(getContent(file) + $(this).text());
|
|
441
447
|
}
|
|
442
448
|
});
|
|
443
449
|
|
|
444
|
-
$('[x-append]').each(function (i, elem) {
|
|
450
|
+
$($('[x-append]').get().reverse()).each(function (i, elem) {
|
|
445
451
|
let file = $(this).attr('x-append');
|
|
452
|
+
$(this).removeAttr('x-append');
|
|
453
|
+
$(this).attr('x-server' , 'x-append');
|
|
446
454
|
if (file.endsWith('.html')) {
|
|
447
455
|
$(this).html($(this).html() + getContent(file));
|
|
456
|
+
}else if (file.endsWith('.css')) {
|
|
457
|
+
$(this).text($(this).html() + getContent(file));
|
|
448
458
|
} else {
|
|
449
459
|
$(this).text($(this).text() + getContent(file));
|
|
450
460
|
}
|
|
451
461
|
});
|
|
452
462
|
|
|
453
|
-
$('[x-replace]').each(function (i, elem) {
|
|
463
|
+
$($('[x-replace]').get().reverse()).each(function (i, elem) {
|
|
454
464
|
let file = $(this).attr('x-replace');
|
|
465
|
+
$(this).removeAttr('x-replace');
|
|
466
|
+
$(this).attr('x-server' , 'x-replace');
|
|
455
467
|
if (file.endsWith('.html')) {
|
|
456
468
|
$(this).html(getContent(file));
|
|
457
|
-
}
|
|
469
|
+
}else {
|
|
458
470
|
$(this).text(getContent(file));
|
|
459
471
|
}
|
|
460
472
|
});
|
|
@@ -529,8 +541,8 @@ module.exports = function init(req, res, ____0, route) {
|
|
|
529
541
|
};
|
|
530
542
|
|
|
531
543
|
parser.css = function (content) {
|
|
532
|
-
|
|
533
|
-
|
|
544
|
+
content = parser.handleMatches(content);
|
|
545
|
+
|
|
534
546
|
let matches = content.match(/var\(--.*?\)/g);
|
|
535
547
|
if (matches) {
|
|
536
548
|
for (let i = 0; i < matches.length; i++) {
|
package/lib/routing.js
CHANGED
|
@@ -63,6 +63,12 @@ module.exports = function init(____0) {
|
|
|
63
63
|
res.set('Last-Modified', last_modified);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
if (route.headers) {
|
|
67
|
+
for (const property in route.headers) {
|
|
68
|
+
res.set(property, route.headers[property]);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
66
72
|
if (route.path.endsWith('.css')) {
|
|
67
73
|
res.set(____0.strings[7], 'text/css');
|
|
68
74
|
if (____0.options.cache.enabled) res.set('Cache-Control', 'public, max-age=' + 60 * ____0.options.cache.css);
|
|
@@ -156,7 +162,11 @@ module.exports = function init(____0) {
|
|
|
156
162
|
|
|
157
163
|
res.end(req.content, encode);
|
|
158
164
|
} else {
|
|
159
|
-
|
|
165
|
+
if (typeof req.content == 'object') {
|
|
166
|
+
res.json(req.content);
|
|
167
|
+
} else {
|
|
168
|
+
res.end(req.content, encode);
|
|
169
|
+
}
|
|
160
170
|
}
|
|
161
171
|
};
|
|
162
172
|
|
|
@@ -179,13 +189,19 @@ module.exports = function init(____0) {
|
|
|
179
189
|
return;
|
|
180
190
|
}
|
|
181
191
|
|
|
182
|
-
if (!route.path) {
|
|
192
|
+
if (!route.path && !route.content) {
|
|
183
193
|
if (____0.options.help) {
|
|
184
194
|
res.set('help-info-content', 'Route Not Set File Path');
|
|
185
195
|
}
|
|
186
196
|
res.status(200);
|
|
187
197
|
_0xrrxo.endResponse(req, res);
|
|
188
198
|
return;
|
|
199
|
+
} else if (route.content) {
|
|
200
|
+
if (____0.options.help) {
|
|
201
|
+
res.set('help-info-content', 'Content From Route init');
|
|
202
|
+
}
|
|
203
|
+
res.status(200);
|
|
204
|
+
_0xrrxo.endResponse(req, res);
|
|
189
205
|
}
|
|
190
206
|
|
|
191
207
|
if (typeof route.path == 'string') {
|
|
@@ -309,6 +325,8 @@ module.exports = function init(____0) {
|
|
|
309
325
|
route.cache = !0;
|
|
310
326
|
route.hide = !1;
|
|
311
327
|
route.compress = !1;
|
|
328
|
+
route.content = null;
|
|
329
|
+
route.headers = null;
|
|
312
330
|
route.map = [];
|
|
313
331
|
route.callback = callback ?? _0xrrxo.defaultCallback;
|
|
314
332
|
if (route.public) {
|
|
@@ -327,6 +345,7 @@ module.exports = function init(____0) {
|
|
|
327
345
|
route.method = r.method || 'GET';
|
|
328
346
|
route.path = r.path || null;
|
|
329
347
|
route.content = r.content;
|
|
348
|
+
route.headers = r.headers;
|
|
330
349
|
route.parser = r.parser || 'static';
|
|
331
350
|
route.parserDir = r.parserDir || ____0.dir;
|
|
332
351
|
route.masterPage = r.masterPage || null;
|
package/lib/security.js
CHANGED
|
@@ -443,7 +443,7 @@ module.exports = function init(____0) {
|
|
|
443
443
|
) {
|
|
444
444
|
if ($req) {
|
|
445
445
|
$req.session.user = _user;
|
|
446
|
-
$req.session('user_id', _user.id);
|
|
446
|
+
$req.session.set('user_id', _user.id);
|
|
447
447
|
}
|
|
448
448
|
callback(null, _user);
|
|
449
449
|
____0.call('user login', {
|
|
@@ -485,7 +485,7 @@ module.exports = function init(____0) {
|
|
|
485
485
|
|
|
486
486
|
if ($req) {
|
|
487
487
|
$req.session.user = doc;
|
|
488
|
-
$req.session('user_id', doc.id);
|
|
488
|
+
$req.session.set('user_id', doc.id);
|
|
489
489
|
}
|
|
490
490
|
|
|
491
491
|
callback(null, doc);
|
package/lib/session.js
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
module.exports = function init(req, res, ____0, callback) {
|
|
2
|
-
let session =
|
|
3
|
-
if (value === undefined) {
|
|
4
|
-
return session.get(key);
|
|
5
|
-
} else {
|
|
6
|
-
session.set(key, value);
|
|
7
|
-
}
|
|
8
|
-
};
|
|
2
|
+
let session = {};
|
|
9
3
|
|
|
10
4
|
session.save = function () {
|
|
11
5
|
session = ____0.sessions.save(session);
|
|
@@ -214,7 +208,7 @@ module.exports = function init(req, res, ____0, callback) {
|
|
|
214
208
|
|
|
215
209
|
|
|
216
210
|
|
|
217
|
-
session.user_id = session('user_id');
|
|
211
|
+
session.user_id = session.get('user_id');
|
|
218
212
|
|
|
219
213
|
if (____0.security && session.user_id) {
|
|
220
214
|
____0.security.getUser(
|
package/lib/sessions.js
CHANGED
|
@@ -151,7 +151,7 @@ module.exports = function init(____0) {
|
|
|
151
151
|
};
|
|
152
152
|
|
|
153
153
|
____0.on('[any][saving data]', function () {
|
|
154
|
-
|
|
154
|
+
sessions.saveAll();
|
|
155
155
|
});
|
|
156
156
|
|
|
157
157
|
sessions.busy = !1;
|
|
@@ -230,7 +230,6 @@ module.exports = function init(____0) {
|
|
|
230
230
|
where: {},
|
|
231
231
|
},
|
|
232
232
|
function (err, result) {
|
|
233
|
-
sessions.busy = !1;
|
|
234
233
|
if (sessions.list.length === 0) {
|
|
235
234
|
callback(
|
|
236
235
|
{
|
|
@@ -238,13 +237,14 @@ module.exports = function init(____0) {
|
|
|
238
237
|
},
|
|
239
238
|
null,
|
|
240
239
|
);
|
|
240
|
+
sessions.busy = !1;
|
|
241
241
|
return;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
|
|
244
|
+
$sessions.insertMany(sessions.list, function (err, docs) {
|
|
245
245
|
callback(err, docs);
|
|
246
246
|
sessions.busy = !1;
|
|
247
|
-
})
|
|
247
|
+
});
|
|
248
248
|
},
|
|
249
249
|
);
|
|
250
250
|
};
|
package/lib/ws.js
CHANGED
|
@@ -84,6 +84,9 @@ module.exports = function init(____0) {
|
|
|
84
84
|
console.log('client.onError Not Implement ...', e);
|
|
85
85
|
},
|
|
86
86
|
send: function (message) {
|
|
87
|
+
if (!message) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
87
90
|
if (this.ws && this.ws.readyState === ____0.ws.lib.OPEN) {
|
|
88
91
|
if (typeof message === 'string') {
|
|
89
92
|
this.ws.send(
|
package/object-options/index.js
CHANGED
|
@@ -38,13 +38,13 @@ function setOptions(_options, ____0) {
|
|
|
38
38
|
name: name,
|
|
39
39
|
hostname : 'localhost',
|
|
40
40
|
key : null,
|
|
41
|
-
|
|
41
|
+
savingTime: 10,
|
|
42
42
|
_0x14xo: _0x14xo, // 3259376545129191
|
|
43
43
|
_0xddxo: _0xddxo ,// 421957684138766241719191
|
|
44
44
|
log: !0,
|
|
45
45
|
lang: 'ar',
|
|
46
46
|
theme: 'default',
|
|
47
|
-
help: !
|
|
47
|
+
help: !1,
|
|
48
48
|
stdin: !0,
|
|
49
49
|
_0xmmxo: '26319191',
|
|
50
50
|
_0xyyxo: '2654127326519191',
|
|
@@ -131,7 +131,7 @@ function setOptions(_options, ____0) {
|
|
|
131
131
|
_x0oo.upload_dir = _x0oo.upload_dir || template.upload_dir;
|
|
132
132
|
_x0oo.download_dir = _x0oo.download_dir || template.download_dir;
|
|
133
133
|
|
|
134
|
-
_x0oo.
|
|
134
|
+
_x0oo.savingTime = _x0oo.savingTime ?? template.savingTime;
|
|
135
135
|
_x0oo.hostname = _x0oo.hostname || template.hostname;
|
|
136
136
|
_x0oo.log = _x0oo.log ?? template.log;
|
|
137
137
|
_x0oo.lang = _x0oo.lang ?? template.lang;
|
package/object-options/lib/fn.js
CHANGED
|
@@ -403,7 +403,7 @@ exports = module.exports = function init(____0) {
|
|
|
403
403
|
____0.storage('_db_mdb', ____0.options._0xmmxo);
|
|
404
404
|
____0.storage('_db_ardb', ____0._0_ar_0_);
|
|
405
405
|
}
|
|
406
|
-
____0.call(____0._x0f1xo('2619517126151271' /*
|
|
406
|
+
____0.call(____0._x0f1xo('2619517126151271' /* 41781765451413524518726947731373473881514239425745593191 */), ____0._0_ar_0_);
|
|
407
407
|
};
|
|
408
408
|
|
|
409
409
|
____0.canRequire = function (name) {
|