isite 2025.1.3 → 2025.1.5

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  module.exports = function init(options) {
2
- console.log('isite init ...');
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
- console.log('Try Closing Site : ' + ____0.options.name);
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
- console.log('Closing Server Number : ' + (i + 1));
114
+ ____0.log('Closing Server Number : ' + (i + 1));
115
115
  s.close(() => {
116
116
  count++;
117
117
  if (count == ____0.servers.length) {
118
- console.log('Closing All Database ...');
118
+ ____0.log('Closing All Database ...');
119
119
  ____0.call('[close-database]', null, () => {
120
- console.log('Closing Process');
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
- console.log('Closing Process');
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
- // console.log(`Primary cluster : ${process.pid} is running`);
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
- // console.log(`worker cluster : ${worker.process.pid} died`);
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
- // console.log(`Worker cluster : ${process.pid} started`);
198
+ // ____0.log(`Worker cluster : ${process.pid} started`);
199
199
  // } else {
200
- // console.log(`Process : ${process.pid} started`);
200
+ // ____0.log(`Process : ${process.pid} started`);
201
201
  // }
202
202
 
203
- console.log(`Process ID : ${process.pid} `);
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
- if (____0.options.mongodb.enabled) {
272
- ____0.mongodb = require('./lib/mongodb.js')(____0);
273
- ____0.connectCollection = function (option, db) {
274
- return require('./lib/collection')(____0, option, db);
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
@@ -33,7 +33,7 @@ module.exports = function init(____0, options, db) {
33
33
  $collection.taskCount = 0;
34
34
 
35
35
  $collection.callback = function (...args) {
36
- console.log(...args);
36
+ ____0.log(...args);
37
37
  };
38
38
 
39
39
  $collection.checkTaskList = function () {
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
- console.log(...args);
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 || function () {};
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'] || req.host;
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')) {
@@ -38,7 +38,7 @@ function setOptions(_options, ____0) {
38
38
  responseTimeout: 60,
39
39
  _0x14xo: _0x14xo, // 3259376545129191
40
40
  _0xddxo: _0xddxo, // 421957684138766241719191
41
- log: !0,
41
+ log: !1,
42
42
  lang: 'En',
43
43
  language: { id: 'En', dir: 'ltr', text: 'left' },
44
44
  theme: 'default',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isite",
3
- "version": "2025.01.03",
3
+ "version": "2025.01.05",
4
4
  "description": "Create High Level Multi-Language Web Site [Fast and Easy] ",
5
5
  "main": "index.js",
6
6
  "repository": {