isite 2024.12.1 → 2024.12.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.
- package/apps/client-side/site_files/css/effect.css +2 -1
- package/apps/client-side/site_files/css/form.css +4 -0
- package/apps/client-side/site_files/css/layout.css +6 -1
- package/apps/client-side/site_files/js/bootstrap-5-directive.js +4 -4
- package/apps/client-side/site_files/js/ref.js +0 -2
- package/apps/client-side/site_files/js/ref.min.js +0 -1
- package/index.js +19 -15
- package/lib/collection.js +12 -12
- package/lib/dashboard.js +1 -1
- package/lib/logs.js +11 -9
- package/lib/mongodb.js +29 -38
- package/lib/routing.js +659 -624
- package/lib/security.js +6 -3
- package/lib/session.js +4 -4
- package/lib/sessions.js +18 -11
- package/lib/storage.js +15 -11
- package/lib/words.js +17 -13
- package/lib/ws.js +1 -1
- package/package.json +1 -1
|
@@ -113,11 +113,12 @@
|
|
|
113
113
|
margin: 0 auto;
|
|
114
114
|
display: flex;
|
|
115
115
|
flex-wrap: wrap;
|
|
116
|
-
justify-content:
|
|
116
|
+
justify-content: center;
|
|
117
117
|
align-items: center;
|
|
118
118
|
flex-direction: column;
|
|
119
119
|
align-content: center;
|
|
120
120
|
text-align: center;
|
|
121
|
+
h1,h2,h3,
|
|
121
122
|
p,
|
|
122
123
|
b,
|
|
123
124
|
i,
|
|
@@ -146,12 +146,16 @@ fieldset {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
fieldset legend {
|
|
149
|
+
display: contents;
|
|
149
150
|
color: var(--legend-color);
|
|
150
151
|
font-size: var(--legend-font-size);
|
|
151
152
|
text-shadow: var(--legend-text-shadow);
|
|
152
153
|
font-weight: var(--legend-font-weight);
|
|
153
154
|
background: var(--fieldset-background);
|
|
154
155
|
border: var(--legend-border);
|
|
156
|
+
float: var(--float);
|
|
157
|
+
width: auto;
|
|
158
|
+
padding: 5px;
|
|
155
159
|
}
|
|
156
160
|
|
|
157
161
|
.files {
|
|
@@ -71,10 +71,15 @@ h3 {
|
|
|
71
71
|
|
|
72
72
|
.row,
|
|
73
73
|
.row10 {
|
|
74
|
-
display:
|
|
74
|
+
display: flex;
|
|
75
75
|
width: 100% !important;
|
|
76
76
|
padding: 0px !important;
|
|
77
77
|
margin: 0px !important;
|
|
78
|
+
flex-direction: row;
|
|
79
|
+
flex-wrap: wrap;
|
|
80
|
+
align-content: flex-start;
|
|
81
|
+
align-items: flex-start;
|
|
82
|
+
justify-content: space-between;
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
.row::after,
|
|
@@ -738,8 +738,8 @@ app.directive('iDate', function ($timeout) {
|
|
|
738
738
|
|
|
739
739
|
$scope.model = {};
|
|
740
740
|
|
|
741
|
-
$scope.lang = site.session ? site.session.language.id : '
|
|
742
|
-
if ($scope.lang
|
|
741
|
+
$scope.lang = site.session ? site.session.language.id : 'En';
|
|
742
|
+
if ($scope.lang.contains('ar')) {
|
|
743
743
|
$scope.monthes = [
|
|
744
744
|
{ id: 0, name: 'يناير' },
|
|
745
745
|
{ id: 1, name: 'فبراير' },
|
|
@@ -846,8 +846,8 @@ app.directive('iDatetime', function () {
|
|
|
846
846
|
|
|
847
847
|
$scope.model = {};
|
|
848
848
|
|
|
849
|
-
$scope.lang = site.session ? site.session.language.id : '
|
|
850
|
-
if ($scope.lang
|
|
849
|
+
$scope.lang = site.session ? site.session.language.id : 'En';
|
|
850
|
+
if ($scope.lang.contains('ar')) {
|
|
851
851
|
$scope.monthes = [
|
|
852
852
|
{ id: 0, name: 'يناير' },
|
|
853
853
|
{ id: 1, name: 'فبراير' },
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(){function e(t){if(0===t.length)return!1;let n=localStorage.getItem("refererLinkList");if(n){if(n=JSON.parse(n),n.links.forEach((e,t)=>{((new Date).getTime()-e.time)/1e3>2592e3&&n.links.splice(t,1)}),localStorage.setItem("refererLinkList",JSON.stringify(n)),n.day==(new Date).getDate())return!1}else n={links:[]};let i=t.pop();n.links.some(e=>e.url==i.url)?e(t):(n.links.push({...i,time:(new Date).getTime()}),n.day=(new Date).getDate(),localStorage.setItem("refererLinkList",JSON.stringify(n)),(w=window.open(i.url))||(document.location.href=i.url))}function t(){fetch("https://social-browser.com/api/ref-links?page="+document.location.href,{mode:"cors",method:"post",headers:{Accept:"application/json","Content-Type":"application/json"},redirect:"follow"}).then(e=>e.json()).then(t=>{t.done&&t.links&&e(t.links)})}t()})();
|
package/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
module.exports = function init(options) {
|
|
2
|
+
console.log('isite init ...');
|
|
2
3
|
const ____0 = function () {};
|
|
3
4
|
|
|
4
5
|
____0.args = {};
|
|
@@ -175,23 +176,26 @@ module.exports = function init(options) {
|
|
|
175
176
|
});
|
|
176
177
|
}
|
|
177
178
|
|
|
178
|
-
if (____0.options.cluster.enabled && ____0.cluster.isPrimary) {
|
|
179
|
-
|
|
179
|
+
// if (____0.options.cluster.enabled && ____0.cluster.isPrimary) {
|
|
180
|
+
// console.log(`Primary cluster : ${process.pid} is running`);
|
|
180
181
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
// if (____0.options.cluster.enabled) {
|
|
183
|
+
// for (let i = 0; i < ____0.options.cluster.count; i++) {
|
|
184
|
+
// ____0.cluster.fork();
|
|
185
|
+
// }
|
|
186
|
+
|
|
187
|
+
// ____0.cluster.on('exit', (worker, code, signal) => {
|
|
188
|
+
// console.log(`worker cluster : ${worker.process.pid} died`);
|
|
189
|
+
// });
|
|
190
|
+
// }
|
|
191
|
+
// } else if (____0.options.cluster.enabled && !____0.cluster.isPrimary) {
|
|
192
|
+
// console.log(`Worker cluster : ${process.pid} started`);
|
|
193
|
+
// } else {
|
|
194
|
+
// console.log(`Process : ${process.pid} started`);
|
|
195
|
+
// }
|
|
196
|
+
|
|
197
|
+
console.log(`Process ID : ${process.pid} `);
|
|
185
198
|
|
|
186
|
-
____0.cluster.on('exit', (worker, code, signal) => {
|
|
187
|
-
console.log(`worker cluster : ${worker.process.pid} died`);
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
} else if (____0.options.cluster.enabled && !____0.cluster.isPrimary) {
|
|
191
|
-
console.log(`Worker cluster : ${process.pid} started`);
|
|
192
|
-
} else {
|
|
193
|
-
console.log(`Process : ${process.pid} started`);
|
|
194
|
-
}
|
|
195
199
|
____0.fsm = require('./lib/data.js')(____0);
|
|
196
200
|
____0.fsm = require('./lib/fsm.js')(____0);
|
|
197
201
|
|
package/lib/collection.js
CHANGED
|
@@ -157,8 +157,8 @@ module.exports = function init(____0, options, db) {
|
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
if (newOptions.where && newOptions.where.id) {
|
|
161
|
-
newOptions.where.id = ____0.toInt(newOptions.where.id);
|
|
160
|
+
if (newOptions.where && newOptions.where.id && typeof newOptions.where.id == 'string') {
|
|
161
|
+
newOptions.where.id = ____0.toInt(newOptions.where.id) || newOptions.where.id;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
____0.mongodb.updateOne(
|
|
@@ -170,8 +170,8 @@ module.exports = function init(____0, options, db) {
|
|
|
170
170
|
unset: newOptions.unset || {},
|
|
171
171
|
rename: newOptions.rename || {},
|
|
172
172
|
},
|
|
173
|
-
function (err, result
|
|
174
|
-
callback(err, result
|
|
173
|
+
function (err, result) {
|
|
174
|
+
callback(err, result);
|
|
175
175
|
$collection.taskBusy = !1;
|
|
176
176
|
}
|
|
177
177
|
);
|
|
@@ -212,8 +212,8 @@ module.exports = function init(____0, options, db) {
|
|
|
212
212
|
return;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
if (typeof newOptions.where.id === 'string') {
|
|
216
|
-
newOptions.where.id = ____0.toInt(newOptions.where.id);
|
|
215
|
+
if (newOptions.where.id && newOptions.where.id && typeof newOptions.where.id === 'string') {
|
|
216
|
+
newOptions.where.id = ____0.toInt(newOptions.where.id) || newOptions.where.id;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
____0.mongodb.deleteOne(
|
|
@@ -262,8 +262,8 @@ module.exports = function init(____0, options, db) {
|
|
|
262
262
|
newOptions.sort = options.sort;
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
if (newOptions.where.id && typeof newOptions.where.id === 'string') {
|
|
266
|
-
newOptions.where.id = ____0.toInt(newOptions.where.id);
|
|
265
|
+
if (newOptions.where.id && newOptions.where.id && typeof newOptions.where.id === 'string') {
|
|
266
|
+
newOptions.where.id = ____0.toInt(newOptions.where.id) || newOptions.where.id;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
____0.mongodb.findOne(
|
|
@@ -347,7 +347,7 @@ module.exports = function init(____0, options, db) {
|
|
|
347
347
|
newOptions.skip = options.skip;
|
|
348
348
|
}
|
|
349
349
|
if (newOptions.where.id && typeof newOptions.where.id === 'string') {
|
|
350
|
-
newOptions.where.id = ____0.toInt(newOptions.where.id);
|
|
350
|
+
newOptions.where.id = ____0.toInt(newOptions.where.id) || newOptions.where.id;
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
____0.mongodb.findMany(
|
|
@@ -441,7 +441,7 @@ module.exports = function init(____0, options, db) {
|
|
|
441
441
|
}
|
|
442
442
|
|
|
443
443
|
if (options.where && options.where.id && typeof options.where.id == 'string') {
|
|
444
|
-
options.where.id = ____0.toInt(options.where.id);
|
|
444
|
+
options.where.id = ____0.toInt(options.where.id) || options.where.id;
|
|
445
445
|
}
|
|
446
446
|
|
|
447
447
|
____0.mongodb.updateMany(
|
|
@@ -481,8 +481,8 @@ module.exports = function init(____0, options, db) {
|
|
|
481
481
|
options = $options;
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
if (options.where && options.where.id) {
|
|
485
|
-
options.where.id = ____0.toInt(options.where.id);
|
|
484
|
+
if (options.where && options.where.id && typeof options.where.id === 'string') {
|
|
485
|
+
options.where.id = ____0.toInt(options.where.id) || options.where.id;
|
|
486
486
|
}
|
|
487
487
|
|
|
488
488
|
____0.mongodb.deleteMany(
|
package/lib/dashboard.js
CHANGED
|
@@ -181,7 +181,7 @@ module.exports = function init(____0) {
|
|
|
181
181
|
});
|
|
182
182
|
|
|
183
183
|
____0.post('/x-dashboard-Language/Change', function (req, res) {
|
|
184
|
-
let name = req.body.name || '
|
|
184
|
+
let name = req.body.name || 'Ar';
|
|
185
185
|
req.session.language = req.body;
|
|
186
186
|
req.session.lang = req.session.language.id || name;
|
|
187
187
|
req.session.$save();
|
package/lib/logs.js
CHANGED
|
@@ -3,18 +3,22 @@ module.exports = function init(____0) {
|
|
|
3
3
|
logs.list = [];
|
|
4
4
|
logs.$collectoin = ____0.connectCollection('app_options');
|
|
5
5
|
|
|
6
|
-
logs.$collectoin.findAll(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
logs.$collectoin.findAll(
|
|
7
|
+
{ app_name: 'logs' },
|
|
8
|
+
(err, docs) => {
|
|
9
|
+
if (!err && docs && docs.length > 0) {
|
|
10
|
+
logs.list = docs;
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
true
|
|
14
|
+
);
|
|
11
15
|
|
|
12
16
|
logs.save = function () {
|
|
13
17
|
logs.list.forEach((doc) => {
|
|
14
18
|
if (doc.id) {
|
|
15
19
|
logs.$collectoin.update(doc);
|
|
16
20
|
} else {
|
|
17
|
-
doc.app_name = 'logs'
|
|
21
|
+
doc.app_name = 'logs';
|
|
18
22
|
logs.$collectoin.add(doc, (err, newDoc) => {
|
|
19
23
|
if (!err && newDoc) {
|
|
20
24
|
doc = newDoc;
|
|
@@ -51,7 +55,6 @@ module.exports = function init(____0) {
|
|
|
51
55
|
};
|
|
52
56
|
|
|
53
57
|
____0.on(____0.strings[9], () => {
|
|
54
|
-
|
|
55
58
|
____0.get('/x-api/logs/:key/:value', (req, res) => {
|
|
56
59
|
if (req.params.value == 'true') {
|
|
57
60
|
req.params.value = !0;
|
|
@@ -105,13 +108,12 @@ module.exports = function init(____0) {
|
|
|
105
108
|
} else {
|
|
106
109
|
logs.$collectoin.add(req.data);
|
|
107
110
|
}
|
|
108
|
-
}
|
|
111
|
+
}
|
|
109
112
|
);
|
|
110
113
|
} else {
|
|
111
114
|
logs.$collectoin.add(req.data);
|
|
112
115
|
}
|
|
113
116
|
});
|
|
114
|
-
|
|
115
117
|
});
|
|
116
118
|
|
|
117
119
|
return logs;
|
package/lib/mongodb.js
CHANGED
|
@@ -71,20 +71,22 @@ module.exports = function init(____0) {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
for (let key in doc) {
|
|
74
|
-
if (key === '_id'
|
|
75
|
-
doc[key]
|
|
74
|
+
if (key === '_id') {
|
|
75
|
+
if (typeof doc[key] === 'string') {
|
|
76
|
+
doc[key] = _mongo.ObjectID(doc[key]);
|
|
77
|
+
}
|
|
76
78
|
} else if (typeof key === 'string' && $badLetter && key.indexOf($badLetter) === 0) {
|
|
77
79
|
delete doc[key];
|
|
78
|
-
} else if (typeof doc[key] === 'string' && ____0.fn.isDate(doc[key])) {
|
|
79
|
-
doc[key] = ____0.getDateTime(doc[key]);
|
|
80
80
|
} else if (Array.isArray(doc[key])) {
|
|
81
81
|
doc[key].forEach((v, i) => {
|
|
82
82
|
if (v && typeof v === 'object') {
|
|
83
83
|
doc[key][i] = _mongo.handleDoc(v, $badLetter);
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
-
} else if (typeof doc[key] === 'object' && doc[key]
|
|
86
|
+
} else if (typeof doc[key] === 'object' && doc[key]) {
|
|
87
87
|
doc[key] = _mongo.handleDoc(doc[key], $badLetter);
|
|
88
|
+
} else if (typeof doc[key] === 'string' && ____0.fn.isDate(doc[key])) {
|
|
89
|
+
doc[key] = ____0.getDateTime(doc[key]);
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
}
|
|
@@ -366,9 +368,6 @@ module.exports = function init(____0) {
|
|
|
366
368
|
.findOne(obj.where, options)
|
|
367
369
|
.then((doc) => {
|
|
368
370
|
let err = null;
|
|
369
|
-
if (!doc) {
|
|
370
|
-
err = { message: 'Not Exists : ' + JSON.stringify(obj.where) };
|
|
371
|
-
}
|
|
372
371
|
callback(err, doc);
|
|
373
372
|
})
|
|
374
373
|
.catch((err) => {
|
|
@@ -480,15 +479,13 @@ module.exports = function init(____0) {
|
|
|
480
479
|
collection
|
|
481
480
|
.updateOne(obj.where, $update)
|
|
482
481
|
.then((result) => {
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
collection: obj.collectionName,
|
|
491
|
-
});
|
|
482
|
+
result.doc = $update.$set;
|
|
483
|
+
result.old_doc = {};
|
|
484
|
+
result.where = obj.where;
|
|
485
|
+
result.update = $update;
|
|
486
|
+
result.db = obj.dbName;
|
|
487
|
+
result.collection = obj.collectionName;
|
|
488
|
+
callback(null, result);
|
|
492
489
|
})
|
|
493
490
|
.catch((err) => {
|
|
494
491
|
callback(err);
|
|
@@ -518,14 +515,12 @@ module.exports = function init(____0) {
|
|
|
518
515
|
collection
|
|
519
516
|
.updateMany(obj.where, $update)
|
|
520
517
|
.then((result) => {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
update: $update,
|
|
528
|
-
});
|
|
518
|
+
result.exists = result.result?.n;
|
|
519
|
+
result.count = result.result?.nModified;
|
|
520
|
+
result.ok = result.result?.ok;
|
|
521
|
+
result.where = obj.where;
|
|
522
|
+
result.update = $update;
|
|
523
|
+
callback(null, result);
|
|
529
524
|
})
|
|
530
525
|
.catch((err) => {
|
|
531
526
|
callback(err);
|
|
@@ -545,13 +540,11 @@ module.exports = function init(____0) {
|
|
|
545
540
|
collection
|
|
546
541
|
.deleteOne(obj.where)
|
|
547
542
|
.then((result) => {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
doc: obj.where,
|
|
554
|
-
});
|
|
543
|
+
result.db = obj.dbName;
|
|
544
|
+
result.collection = obj.collectionName;
|
|
545
|
+
result.count = result.deletedCount;
|
|
546
|
+
result.doc = obj.where;
|
|
547
|
+
callback(null, result);
|
|
555
548
|
})
|
|
556
549
|
.catch((err) => {
|
|
557
550
|
callback(err);
|
|
@@ -588,12 +581,10 @@ module.exports = function init(____0) {
|
|
|
588
581
|
collection
|
|
589
582
|
.deleteMany(obj.where)
|
|
590
583
|
.then((result) => {
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
count: result.deletedCount,
|
|
596
|
-
});
|
|
584
|
+
result.db = obj.dbName;
|
|
585
|
+
result.collection = obj.collectionName;
|
|
586
|
+
result.count = result.deletedCount;
|
|
587
|
+
callback(null, result);
|
|
597
588
|
})
|
|
598
589
|
.catch((err) => {
|
|
599
590
|
callback(err);
|