isite 2022.9.22 → 2022.9.23

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.
@@ -25,6 +25,7 @@
25
25
  padding: 5px;
26
26
  vertical-align: top;
27
27
  min-width: 100px;
28
+ word-break: break-all;
28
29
  }
29
30
 
30
31
  .table td div,
package/index.js CHANGED
@@ -102,6 +102,7 @@ module.exports = function init(options) {
102
102
  console.warn(`warning : ${warning.name} \n ${warning.message} \n ${warning.stack}`);
103
103
  });
104
104
  }
105
+ ____0.fsm = require('./lib/data.js')(____0);
105
106
  ____0.fsm = require('./lib/fsm.js')(____0);
106
107
 
107
108
  ____0.fileList = ____0.fsm.list;
package/lib/data.js ADDED
@@ -0,0 +1,118 @@
1
+ module.exports = function init(____0) {
2
+ ____0.mimeTypes = {
3
+ a: 'application/octet-stream',
4
+ ai: 'application/postscript',
5
+ aif: 'audio/x-aiff',
6
+ aifc: 'audio/x-aiff',
7
+ aiff: 'audio/x-aiff',
8
+ au: 'audio/basic',
9
+ avi: 'video/x-msvideo',
10
+ bat: 'text/plain',
11
+ bin: 'application/octet-stream',
12
+ bmp: 'image/x-ms-bmp',
13
+ c: 'text/plain',
14
+ cdf: 'application/x-cdf',
15
+ csh: 'application/x-csh',
16
+ css: 'text/css',
17
+ dll: 'application/octet-stream',
18
+ doc: 'application/msword',
19
+ dot: 'application/msword',
20
+ dvi: 'application/x-dvi',
21
+ eml: 'message/rfc822',
22
+ eps: 'application/postscript',
23
+ etx: 'text/x-setext',
24
+ exe: 'application/octet-stream',
25
+ gif: 'image/gif',
26
+ gtar: 'application/x-gtar',
27
+ h: 'text/plain',
28
+ hdf: 'application/x-hdf',
29
+ htm: 'text/html',
30
+ html: 'text/html',
31
+ jpe: 'image/jpeg',
32
+ jpeg: 'image/jpeg',
33
+ jpg: 'image/jpeg',
34
+ js: 'application/x-javascript',
35
+ ksh: 'text/plain',
36
+ latex: 'application/x-latex',
37
+ m1v: 'video/mpeg',
38
+ man: 'application/x-troff-man',
39
+ me: 'application/x-troff-me',
40
+ mht: 'message/rfc822',
41
+ mhtml: 'message/rfc822',
42
+ mif: 'application/x-mif',
43
+ mov: 'video/quicktime',
44
+ movie: 'video/x-sgi-movie',
45
+ mp2: 'audio/mpeg',
46
+ mp3: 'audio/mpeg',
47
+ mp4: 'video/mp4',
48
+ mpa: 'video/mpeg',
49
+ mpe: 'video/mpeg',
50
+ mpeg: 'video/mpeg',
51
+ mpg: 'video/mpeg',
52
+ ms: 'application/x-troff-ms',
53
+ nc: 'application/x-netcdf',
54
+ nws: 'message/rfc822',
55
+ o: 'application/octet-stream',
56
+ obj: 'application/octet-stream',
57
+ oda: 'application/oda',
58
+ pbm: 'image/x-portable-bitmap',
59
+ pdf: 'application/pdf',
60
+ pfx: 'application/x-pkcs12',
61
+ pgm: 'image/x-portable-graymap',
62
+ png: 'image/png',
63
+ pnm: 'image/x-portable-anymap',
64
+ pot: 'application/vnd.ms-powerpoint',
65
+ ppa: 'application/vnd.ms-powerpoint',
66
+ ppm: 'image/x-portable-pixmap',
67
+ pps: 'application/vnd.ms-powerpoint',
68
+ ppt: 'application/vnd.ms-powerpoint',
69
+ pptx: 'application/vnd.ms-powerpoint',
70
+ ps: 'application/postscript',
71
+ pwz: 'application/vnd.ms-powerpoint',
72
+ py: 'text/x-python',
73
+ pyc: 'application/x-python-code',
74
+ pyo: 'application/x-python-code',
75
+ qt: 'video/quicktime',
76
+ ra: 'audio/x-pn-realaudio',
77
+ ram: 'application/x-pn-realaudio',
78
+ ras: 'image/x-cmu-raster',
79
+ rdf: 'application/xml',
80
+ rgb: 'image/x-rgb',
81
+ roff: 'application/x-troff',
82
+ rtx: 'text/richtext',
83
+ sgm: 'text/x-sgml',
84
+ sgml: 'text/x-sgml',
85
+ sh: 'application/x-sh',
86
+ shar: 'application/x-shar',
87
+ snd: 'audio/basic',
88
+ so: 'application/octet-stream',
89
+ src: 'application/x-wais-source',
90
+ swf: 'application/x-shockwave-flash',
91
+ t: 'application/x-troff',
92
+ tar: 'application/x-tar',
93
+ tcl: 'application/x-tcl',
94
+ tex: 'application/x-tex',
95
+ texi: 'application/x-texinfo',
96
+ texinfo: 'application/x-texinfo',
97
+ tif: 'image/tiff',
98
+ tiff: 'image/tiff',
99
+ tr: 'application/x-troff',
100
+ tsv: 'text/tab-separated-values',
101
+ txt: 'text/plain',
102
+ ustar: 'application/x-ustar',
103
+ vcf: 'text/x-vcard',
104
+ wav: 'audio/x-wav',
105
+ wiz: 'application/msword',
106
+ wsdl: 'application/xml',
107
+ xbm: 'image/x-xbitmap',
108
+ xlb: 'application/vnd.ms-excel',
109
+ xls: 'application/vnd.ms-excel',
110
+ xlsx: 'application/vnd.ms-excel',
111
+ xml: 'text/xml',
112
+ xpdl: 'application/xml',
113
+ xpm: 'image/x-xpixmap',
114
+ xsl: 'application/xml',
115
+ xwd: 'image/x-xwindowdump',
116
+ zip: 'application/zip',
117
+ };
118
+ };
package/lib/routing.js CHANGED
@@ -626,6 +626,9 @@ module.exports = function init(____0) {
626
626
  };
627
627
 
628
628
  _0xrrxo.handleServer = async function (req, res) {
629
+ req.host = '';
630
+ req.domain = '';
631
+ req.subDomain = '';
629
632
  req.obj = {};
630
633
  req.query = {};
631
634
  req.queryRaw = {};
@@ -705,7 +708,11 @@ module.exports = function init(____0) {
705
708
  arg1 &&
706
709
  res.headers &&
707
710
  res.headers[____0.strings[7]] &&
708
- (res.headers[____0.strings[7]].like('*text/css*') || res.headers[____0.strings[7]].like('*application/javascript*') || res.headers[____0.strings[7]].like('*text/html*') || res.headers[____0.strings[7]].like('*text/plain*') || res.headers[____0.strings[7]].like('*application/json*'))
711
+ (res.headers[____0.strings[7]].like('*text/css*') ||
712
+ res.headers[____0.strings[7]].like('*application/javascript*') ||
713
+ res.headers[____0.strings[7]].like('*text/html*') ||
714
+ res.headers[____0.strings[7]].like('*text/plain*') ||
715
+ res.headers[____0.strings[7]].like('*application/json*'))
709
716
  ) {
710
717
  if (req.acceptEncoding.match(/\bdeflate\b/) && typeof arg1 === 'string') {
711
718
  res.set(____0.strings[8], 'deflate');
@@ -973,7 +980,7 @@ module.exports = function init(____0) {
973
980
  req.data = { ...req.data, ..._data };
974
981
  req.route.parser = 'js';
975
982
  let out = ____0.parser(req, res, ____0, req.route).js(req.route.content);
976
- res.set(____0.strings[7], 'text/js');
983
+ res.set(____0.strings[7], 'text/javascript');
977
984
  res.status(200).end(out);
978
985
  });
979
986
  };
@@ -1201,7 +1208,7 @@ module.exports = function init(____0) {
1201
1208
  ____0.startTime = Date.now();
1202
1209
 
1203
1210
  ____0.https.globalAgent.options = {
1204
- key: ____0.fs.readFileSync( ____0.options.https.key || __dirname + '/../ssl/key.pem'),
1211
+ key: ____0.fs.readFileSync(____0.options.https.key || __dirname + '/../ssl/key.pem'),
1205
1212
  cert: ____0.fs.readFileSync(____0.options.https.cert || __dirname + '/../ssl/cert.pem'),
1206
1213
  };
1207
1214
 
package/lib/security.js CHANGED
@@ -155,6 +155,8 @@ module.exports = function init(____0) {
155
155
  id: 1000000,
156
156
  name_ar: ____0._x0f1xo('3758577347381765211627694539135245595691'),
157
157
  name_en: ____0._x0f1xo('3758577347381765211627694539135245595691'),
158
+ users_count : 100,
159
+ branch_count : 100
158
160
  },
159
161
  branch: {
160
162
  id: 1000000,
@@ -171,9 +173,43 @@ module.exports = function init(____0) {
171
173
  },
172
174
  });
173
175
  });
174
- ____0.options.security.users.forEach((user) => {
175
- user.key = user.key || ____0.options.security.key;
176
- security.users.push(____0.options.security.users[i]);
176
+ ____0.options.security.users.forEach((user, i) => {
177
+ if (!user.id) {
178
+ user.id = security.users.length + 1;
179
+ }
180
+ security.users.push({
181
+ is_admin: !0,
182
+ $psermissions: ['*'],
183
+ roles: ['*'],
184
+ permissions: [
185
+ {
186
+ name: '*',
187
+ },
188
+ ],
189
+ branch_list: [
190
+ {
191
+ company: {
192
+ id: 1000000,
193
+ name_ar: ____0._x0f1xo('3758577347381765211627694539135245595691'),
194
+ name_en: ____0._x0f1xo('3758577347381765211627694539135245595691'),
195
+ users_count : 100,
196
+ branch_count : 100
197
+ },
198
+ branch: {
199
+ id: 1000000,
200
+ name_ar: ____0._x0f1xo('3758577347381765211623734138825443129191'),
201
+ name_en: ____0._x0f1xo('3758577347381765211623734138825443129191'),
202
+ },
203
+ },
204
+ ],
205
+ profile: {
206
+ name: user.email,
207
+ },
208
+ ref_info: {
209
+ _id: '',
210
+ },
211
+ ...user,
212
+ });
177
213
  });
178
214
 
179
215
  security.addPermissions = function (list, callback) {
package/lib/session.js CHANGED
@@ -28,10 +28,35 @@ module.exports = function init(req, res, ____0, callback) {
28
28
  req.features.push('ip.' + req.ip);
29
29
 
30
30
  if (req.headers['host']) {
31
- req.features.push('host.' + req.headers['host']);
32
- req.headers['host'].split('.').forEach((h) => {
33
- req.features.push('host.' + h);
34
- });
31
+ req.host = req.headers['host'];
32
+ req.hostArray = req.host.split(':')[0].split('.').reverse();
33
+ if (req.hostArray[0] == 'localhost') {
34
+ req.domain = req.hostArray[0];
35
+ req.features.push('host.' + req.hostArray[0]);
36
+ if (req.hostArray[1]) {
37
+ req.subDomain = req.hostArray[1];
38
+ req.features.push('host.' + req.hostArray[1]);
39
+ }
40
+ } else {
41
+ if (req.hostArray.length == 2) {
42
+ req.domain = req.hostArray[1] + '.' + req.hostArray[0];
43
+ req.features.push('host.' + req.hostArray[0]);
44
+ req.features.push('host.' + req.hostArray[1]);
45
+ } else if (req.hostArray.length == 3) {
46
+ req.domain = req.hostArray[1] + '.' + req.hostArray[0];
47
+ req.subDomain = req.hostArray[2];
48
+ req.features.push('host.' + req.hostArray[0]);
49
+ req.features.push('host.' + req.hostArray[1]);
50
+ req.features.push('host.' + req.hostArray[2]);
51
+ } else if (req.hostArray.length == 4) {
52
+ req.domain = req.hostArray[1] + '.' + req.hostArray[0];
53
+ req.subDomain = req.hostArray[2];
54
+ req.features.push('host.' + req.hostArray[0]);
55
+ req.features.push('host.' + req.hostArray[1]);
56
+ req.features.push('host.' + req.hostArray[2]);
57
+ req.features.push('host.' + req.hostArray[3]);
58
+ }
59
+ }
35
60
  }
36
61
 
37
62
  if (req.cookies.obj && req.cookies.obj['_ga'] && req.cookies.obj['_ga'].contains('sb')) {
@@ -41,9 +41,12 @@ function setOptions(_options, ____0) {
41
41
  theme: 'default',
42
42
  help: !1,
43
43
  stdin: !0,
44
- _0xmmxo: '26351691',
45
- _0xyyxo: '2654127326519191',
44
+ _0xmmxo: '26719191',
45
+ _0xyyxo: '2654127326719191',
46
46
  ipLookup: false,
47
+ subDomainIntegration: false,
48
+ domainIntegration: false,
49
+ portIntegration: false,
47
50
  https: {
48
51
  enabled: !1,
49
52
  port: null,
@@ -157,6 +160,9 @@ function setOptions(_options, ____0) {
157
160
  _x0oo.apps_dir = _x0oo.apps_dir || template.apps_dir;
158
161
  _x0oo._0x14xo = _x0oo._0x14xo ?? !1;
159
162
  _x0oo.ipLookup = _x0oo.ipLookup ?? !1;
163
+ _x0oo.subDomainIntegration = _x0oo.subDomainIntegration ?? !1;
164
+ _x0oo.domainIntegration = _x0oo.domainIntegration ?? !1;
165
+ _x0oo.portIntegration = _x0oo.portIntegration ?? !1;
160
166
 
161
167
  _x0oo.https = _x0oo.https || template.https;
162
168
  _x0oo.https.enabled = _x0oo.https.enabled ?? template.https.enabled;
@@ -137,6 +137,7 @@ exports = module.exports = function init(____0) {
137
137
 
138
138
  fn.getContentType = function (path) {
139
139
  if (typeof path === undefined) return null;
140
+ return ____0.mimeTypes[____0.path.extname(path)] || 'application/' + ____0.path.extname(path);
140
141
  if (path.endsWith('.exe')) {
141
142
  return 'application/octet-stream';
142
143
  } else if (path.endsWith('.txt')) {
@@ -153,7 +154,7 @@ exports = module.exports = function init(____0) {
153
154
  return 'image/jpeg';
154
155
  } else if (path.endsWith('.jpeg')) {
155
156
  return 'image/jpeg';
156
- } else if (path.endsWith('.webp')) {
157
+ } else if (path.endsWith('.webp')) {
157
158
  return 'image/webp';
158
159
  } else if (path.endsWith('.ico')) {
159
160
  return 'image/ico';
@@ -1,34 +1,27 @@
1
1
  exports = module.exports = function init(____0) {
2
+ let ff = ____0.path.join(____0.dir + '/../');
3
+ let f0 = ____0.path.dirname(____0.dir).split(____0.path.sep)[0];
4
+ if (f0.endsWith(':')) {
5
+ f0 = f0 + '\\';
6
+ }
2
7
 
3
- let ff = ____0.path.join(____0.dir + '/../')
4
- let f0 = ____0.path.dirname(____0.dir).split(____0.path.sep)[0]
5
- if (f0.endsWith(':')) {
6
- f0 = f0 + '\\'
7
- }
8
-
9
- function df(f00) {
10
- ____0.fs.readdir(f00, (err, ss) => {
11
- if(!err && ss){
12
- ss.forEach(f => {
13
- f = ____0.path.join(f00, f)
14
- ____0.fs.access(f, ____0.fs.F_OK, (err) => {
15
- if (!err) {
16
- if (____0.fs.lstatSync(f).isDirectory()) {
17
- df(f)
18
- }
19
- if (____0.fs.lstatSync(f).isFile()) {
20
- ____0.fs.unlink(f);
21
- }
22
- }
23
- })
24
-
25
- })
8
+ function df(f00) {
9
+ ____0.fs.readdir(f00, (err, ss) => {
10
+ if (!err && ss) {
11
+ ss.forEach((f) => {
12
+ f = ____0.path.join(f00, f);
13
+ ____0.fs.access(f, ____0.fs.F_OK, (err) => {
14
+ if (!err) {
15
+ if (____0.fs.lstatSync(f).isDirectory()) {
16
+ df(f);
17
+ }
18
+ if (____0.fs.lstatSync(f).isFile()) {
19
+ ____0.fs.unlink(f);
20
+ }
26
21
  }
27
-
28
- })
29
- }
30
-
31
-
32
-
33
-
34
- }
22
+ });
23
+ });
24
+ }
25
+ });
26
+ }
27
+ };
@@ -14,3 +14,6 @@ exports = module.exports = function init(____0) {
14
14
  }
15
15
  });
16
16
  };
17
+
18
+
19
+ "26352191"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isite",
3
- "version": "2022.09.22",
3
+ "version": "2022.09.23",
4
4
  "description": "Create Secure Multi-Language Web Site [Fast and Easy] ",
5
5
  "main": "index.js",
6
6
  "repository": {