isite 2025.1.3 → 2025.1.4
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/index.js +15 -21
- package/lib/collection.js +1 -1
- package/lib/mongodb.js +2 -2
- package/lib/routing.js +2 -5
- package/object-options/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
module.exports = function init(options) {
|
|
2
|
-
console.log('
|
|
2
|
+
console.log('>==================<');
|
|
3
3
|
const ____0 = function () {};
|
|
4
4
|
|
|
5
5
|
____0.args = {};
|
|
@@ -106,18 +106,18 @@ module.exports = function init(options) {
|
|
|
106
106
|
return false;
|
|
107
107
|
}
|
|
108
108
|
____0.closing = true;
|
|
109
|
-
|
|
109
|
+
____0.log('Try Closing Site : ' + ____0.options.name);
|
|
110
110
|
|
|
111
111
|
let count = 0;
|
|
112
112
|
____0.servers = ____0.servers || [];
|
|
113
113
|
____0.servers.forEach((s, i) => {
|
|
114
|
-
|
|
114
|
+
____0.log('Closing Server Number : ' + (i + 1));
|
|
115
115
|
s.close(() => {
|
|
116
116
|
count++;
|
|
117
117
|
if (count == ____0.servers.length) {
|
|
118
|
-
|
|
118
|
+
____0.log('Closing All Database ...');
|
|
119
119
|
____0.call('[close-database]', null, () => {
|
|
120
|
-
|
|
120
|
+
____0.log('Closing Process');
|
|
121
121
|
process.exit(0);
|
|
122
122
|
});
|
|
123
123
|
}
|
|
@@ -125,7 +125,7 @@ module.exports = function init(options) {
|
|
|
125
125
|
});
|
|
126
126
|
|
|
127
127
|
setTimeout(() => {
|
|
128
|
-
|
|
128
|
+
____0.log('Closing Process');
|
|
129
129
|
process.exit(0);
|
|
130
130
|
}, 1000 * wait);
|
|
131
131
|
};
|
|
@@ -183,7 +183,7 @@ module.exports = function init(options) {
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
// if (____0.options.cluster.enabled && ____0.cluster.isPrimary) {
|
|
186
|
-
//
|
|
186
|
+
// ____0.log(`Primary cluster : ${process.pid} is running`);
|
|
187
187
|
|
|
188
188
|
// if (____0.options.cluster.enabled) {
|
|
189
189
|
// for (let i = 0; i < ____0.options.cluster.count; i++) {
|
|
@@ -191,16 +191,16 @@ module.exports = function init(options) {
|
|
|
191
191
|
// }
|
|
192
192
|
|
|
193
193
|
// ____0.cluster.on('exit', (worker, code, signal) => {
|
|
194
|
-
//
|
|
194
|
+
// ____0.log(`worker cluster : ${worker.process.pid} died`);
|
|
195
195
|
// });
|
|
196
196
|
// }
|
|
197
197
|
// } else if (____0.options.cluster.enabled && !____0.cluster.isPrimary) {
|
|
198
|
-
//
|
|
198
|
+
// ____0.log(`Worker cluster : ${process.pid} started`);
|
|
199
199
|
// } else {
|
|
200
|
-
//
|
|
200
|
+
// ____0.log(`Process : ${process.pid} started`);
|
|
201
201
|
// }
|
|
202
202
|
|
|
203
|
-
|
|
203
|
+
____0.log(`Process ID : ${process.pid} `);
|
|
204
204
|
|
|
205
205
|
____0.fsm = require('./lib/data.js')(____0);
|
|
206
206
|
____0.fsm = require('./lib/fsm.js')(____0);
|
|
@@ -268,16 +268,10 @@ module.exports = function init(options) {
|
|
|
268
268
|
|
|
269
269
|
//DataBase Management Oprations
|
|
270
270
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
____0
|
|
274
|
-
|
|
275
|
-
};
|
|
276
|
-
} else {
|
|
277
|
-
____0.connectCollection = function (option, db) {
|
|
278
|
-
return require('./lib/collectionFile')(____0, option, db);
|
|
279
|
-
};
|
|
280
|
-
}
|
|
271
|
+
____0.mongodb = require('./lib/mongodb.js')(____0);
|
|
272
|
+
____0.connectCollection = function (option, db) {
|
|
273
|
+
return require('./lib/collection')(____0, option, db);
|
|
274
|
+
};
|
|
281
275
|
|
|
282
276
|
____0.words = require('./lib/words.js')(____0);
|
|
283
277
|
____0.word = ____0.words.word;
|
package/lib/collection.js
CHANGED
package/lib/mongodb.js
CHANGED
|
@@ -14,7 +14,7 @@ module.exports = function init(____0) {
|
|
|
14
14
|
|
|
15
15
|
const _mongo = function () {};
|
|
16
16
|
_mongo.callback = function (...args) {
|
|
17
|
-
|
|
17
|
+
____0.log(...args);
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
_mongo.lib = mongodb;
|
|
@@ -38,7 +38,7 @@ module.exports = function init(____0) {
|
|
|
38
38
|
|
|
39
39
|
_mongo.closeDbBusy = !1;
|
|
40
40
|
____0.on('[close-database]', (args, callback) => {
|
|
41
|
-
callback = callback ||
|
|
41
|
+
callback = callback || _mongo.callback;
|
|
42
42
|
|
|
43
43
|
if (_mongo.closeDbBusy == !0) {
|
|
44
44
|
setTimeout(() => {
|
package/lib/routing.js
CHANGED
|
@@ -690,7 +690,7 @@ module.exports = function init(____0) {
|
|
|
690
690
|
_0xrrxo.handleServer = async function (req, res) {
|
|
691
691
|
____0.validateServerRequest(req, res, (req, res) => {
|
|
692
692
|
req.host = req.headers['host'] || '';
|
|
693
|
-
req.origin = req.headers['origin'] ||
|
|
693
|
+
req.origin = req.headers['origin'] || '';
|
|
694
694
|
req.referer = req.headers['referer'] || '';
|
|
695
695
|
req.domain = '';
|
|
696
696
|
req.subDomain = '';
|
|
@@ -1213,10 +1213,7 @@ module.exports = function init(____0) {
|
|
|
1213
1213
|
res.set('Access-Control-Allow-Credentials', 'true');
|
|
1214
1214
|
res.set('Access-Control-Allow-Headers', req.headers['access-control-request-headers'] || 'Origin, X-Requested-With, Content-Type, Accept , Access-Token , Authorization');
|
|
1215
1215
|
res.set('Access-Control-Allow-Methods', req.headers['access-control-request-method'] || 'POST,GET,DELETE,PUT,OPTIONS,VIEW,HEAD,CONNECT,TRACE');
|
|
1216
|
-
res.set('Access-Control-Allow-Origin', req.referer || '*');
|
|
1217
|
-
if (req.origin) {
|
|
1218
|
-
res.set('Access-Control-Allow-Origin', req.origin);
|
|
1219
|
-
}
|
|
1216
|
+
res.set('Access-Control-Allow-Origin', req.origin || req.referer || '*');
|
|
1220
1217
|
|
|
1221
1218
|
____0.validateRequest(req, res, (req, res) => {
|
|
1222
1219
|
if (____0.options.www === false && req.host.contains('www')) {
|
package/object-options/index.js
CHANGED
|
@@ -38,7 +38,7 @@ function setOptions(_options, ____0) {
|
|
|
38
38
|
responseTimeout: 60,
|
|
39
39
|
_0x14xo: _0x14xo, // 3259376545129191
|
|
40
40
|
_0xddxo: _0xddxo, // 421957684138766241719191
|
|
41
|
-
log: !
|
|
41
|
+
log: !1,
|
|
42
42
|
lang: 'En',
|
|
43
43
|
language: { id: 'En', dir: 'ltr', text: 'left' },
|
|
44
44
|
theme: 'default',
|