isite 2023.12.15 → 2023.12.16

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.
@@ -243,7 +243,7 @@ module.exports = function (site) {
243
243
  });
244
244
 
245
245
  site.post({ name: '/x-api/upload/image', public: true }, (req, res) => {
246
- let folder = req.headers['folder'] || new Date().getFullYear() + '_' + new Date().getMonth() + '_' + new Date().getDate();
246
+ let folder = req.headers['folder'] || new Date().getFullYear() + '_' + (new Date().getMonth() + 1) + '_' + new Date().getDate();
247
247
 
248
248
  site.createDir(site.options.upload_dir + '/' + folder, () => {
249
249
  site.createDir(site.options.upload_dir + '/' + folder + '/images', () => {
@@ -268,13 +268,12 @@ module.exports = function (site) {
268
268
  response.image.path = newpath;
269
269
  response.image.url = '/x-api/image/' + folder + '/' + newName;
270
270
  response.image.size = file.size;
271
- if (!response.image.name.like('*.webp')) {
271
+ if (!response.image.name.like('*.webp|*.gif')) {
272
272
  site.webp.cwebp(newpath, newpath2, '-q 80').then((output) => {
273
- console.log(output);
274
273
  response.image.path = newpath2;
275
274
  response.image.url = '/x-api/image/' + folder + '/' + newName2;
276
275
  res.json(response);
277
- site.fs.unlink(newpath, () => {});
276
+ site.deleteFileSync(newpath, () => {});
278
277
  });
279
278
  } else {
280
279
  res.json(response);
@@ -114,12 +114,15 @@ i-button.default button {
114
114
  i-file {
115
115
  display: block;
116
116
  padding: 10px !important;
117
- border: 1px dashed var(--theme-color);
117
+ border: 3px dashed var(--theme-color);
118
118
  margin: 1% !important;
119
119
  height: fit-content;
120
120
  width: 98% !important;
121
121
  }
122
- i-file button {
122
+ i-file label {
123
+ margin-top: 10px !important;
124
+ }
125
+ i-file i-button {
123
126
  max-width: 100px;
124
127
  }
125
128
  i-upload {
@@ -131,19 +134,17 @@ i-datetime .left-10 {
131
134
  }
132
135
  i-date .fas,
133
136
  i-datetime .fas {
134
- font-size: 24px;
135
- vertical-align: middle;
136
- margin-top: 5px;
137
- cursor: pointer;
138
- }
139
- i-date .fas:hover,
140
- i-datetime .fas:hover {
141
- font-size: 26px;
137
+ color: green;
142
138
  }
143
139
  i-date p,
144
140
  i-datetime p {
145
141
  margin: 0 !important;
146
142
  }
143
+ i-date button,
144
+ i-datetime button {
145
+ background: transparent !important;
146
+ margin: 0 !important;
147
+ }
147
148
  i-date input,
148
149
  i-datetime input {
149
150
  margin: 0 !important;
@@ -12,6 +12,7 @@ i-image {
12
12
  border: var(--i-image-border);
13
13
  margin: 5px;
14
14
  border-radius: 5px;
15
+ padding: 5px;
15
16
  }
16
17
  i-image div{
17
18
  width: 100%;
@@ -98,7 +98,7 @@
98
98
  --btn-box-shadow-color: #272727;
99
99
  --btn-border-radius: 5px;
100
100
 
101
- --i-image-border: 2px dashed var(--modal-header-background-color);
101
+ --i-image-border: 3px dashed var(--modal-header-background-color);
102
102
  --i-image-view-border: 2px solid var(--modal-header-background-color);
103
103
 
104
104
  --fieldset-border: 2px solid #283e4a;
@@ -99,7 +99,7 @@
99
99
  --btn-box-shadow-color: #030303;
100
100
  --btn-border-radius: 0px;
101
101
 
102
- --i-image-border: 2px dashed #030303;
102
+ --i-image-border: 3px dashed #030303;
103
103
  --i-image-view-border: 2px solid #030303;
104
104
 
105
105
  --fieldset-border: 1px solid #151515;
@@ -129,7 +129,7 @@
129
129
  --btn-sgin-color: #000000;
130
130
  --btn-sgin-background-color: #ffffff;
131
131
 
132
- --i-image-border: 2px dashed var(--theme-color);
132
+ --i-image-border: 3px dashed var(--theme-color);
133
133
  --i-image-view-border: 2px solid var(--theme-color);
134
134
 
135
135
  --fieldset-border: 1px solid var(--theme-color);
@@ -1,5 +1,5 @@
1
1
  <button class="btn {{class}} {{class2}}" type="button" ng-click="click()" ng-disabled="busy">
2
- <span ng-show="busy" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
2
+ <span ng-show="busy || clickBusy" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
3
3
  {{label}}
4
4
  <i class="{{fa}}"></i>
5
5
  </button>
@@ -2,7 +2,8 @@
2
2
  <label for="{{id2}}" class="form-label"> <span class="red bold"> {{requird}} </span> {{label}}</label>
3
3
  <div class="row" ng-hide="editOnly">
4
4
  <p ng-click="editOnly = true" class="blue bold border padding pointer">
5
- <span class="bold">{{model.selectedDay || '__'}} </span> <span class="orange"> / </span> <span class="bold">{{model.selectedMonth.name || '______'}}</span> <span class="orange"> / </span> <span class="bold">{{model.selectedYear || '____'}}</span>
5
+ <span class="bold">{{model.selectedDay || '__'}} </span> <span class="orange"> / </span> <span class="bold">{{model.selectedMonth.name || '______'}}</span> <span class="orange"> / </span>
6
+ <span class="bold">{{model.selectedYear || '____'}}</span>
6
7
  </p>
7
8
  </div>
8
9
  <div class="row" ng-show="editOnly">
@@ -21,7 +22,7 @@
21
22
  />
22
23
  </div>
23
24
  <div class="col2">
24
- <i class="fas fa-save" ng-click="updateDate()"></i>
25
+ <i-button type="save" ng-click="updateDate()"></i-button>
25
26
  </div>
26
27
  <div class="invalid-feedback"></div>
27
28
  </div>
@@ -1,12 +1,11 @@
1
1
  <div class="row">
2
2
  <label class="col"> {{label}} </label>
3
- <button ng-hide="ngModel || viewOnly" class="btn btn-primary col">
4
- <i class="fas fa-upload"></i>
5
- </button>
3
+ <i-button type="upload" ng-hide="ngModel || viewOnly" class="col"></i-button>
4
+
6
5
  <div class="row">
7
6
  <input class="hidden" type="file" name="fileToUpload" accept="{{accept}}" />
8
7
  <div class="progress row">
9
- <div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="100" style="width: {{value}}%"></div>
8
+ <div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="100"></div>
10
9
  </div>
11
10
  </div>
12
11
 
@@ -1,7 +1,7 @@
1
- <div class="text-center pointer">
1
+ <div class="text-center pointer" ng-click="upload()">
2
2
  <input class="hidden" type="file" name="fileToUpload" accept="{{accept}}" />
3
3
  <div class="center">
4
- <img ng-src="{{ngModel.url}}" ngClick="ngClick()" onerror="this.src='/images/no.jpg'" ng-click="upload()" />
4
+ <img ng-src="{{ngModel.url}}" ngClick="ngClick()" onerror="this.src='/images/no.jpg'" />
5
5
  <i-button type="upload" ng-click="upload()"></i-button>
6
6
  <i-button type="delete" ng-click="delete()"></i-button>
7
7
  </div>
@@ -14,7 +14,7 @@
14
14
  </div>
15
15
 
16
16
  <div class="row center padding pointer">
17
- <a class="btn red" ng-click="updateModel(null)"> <i class="fa fa-trash"></i> Clear </a>
17
+ <i-button class="block center" type="clear" ng-click="updateModel(null)" label="Clear"></i-button>
18
18
  </div>
19
19
  </div>
20
20
  </div>
@@ -1,5 +1,5 @@
1
1
  <form class="mb-3">
2
- <input class="hidden" type="file" name="file" />
3
- <i-button type="{{type}}" fa="fas fa-upload" ngClick="ngClick()" url="{{ngModel}}" label="{{label}}"> </i-button>
4
- <progress class="row"></progress>
5
- </form>
2
+ <input class="hidden" type="file" name="file" />
3
+ <i-button type="{{type}}" fa="fas fa-upload" ngClick="ngClick()" url="{{ngModel}}" label="{{label}}"> </i-button>
4
+ <progress class="row"></progress>
5
+ </form>
@@ -204,106 +204,125 @@ app.directive('iRadio', function () {
204
204
  };
205
205
  });
206
206
 
207
- app.directive('iButton', function () {
208
- return {
209
- restrict: 'E',
210
- scope: {
211
- label: '@',
212
- type: '@',
213
- class2: '@',
214
- loading: '@',
215
- click: '&',
216
- fa: '@',
217
- },
218
- link: function ($scope, element, attrs, ctrl) {
219
- $scope.type = $scope.type || '';
220
- $scope.class = $scope.class = 'btn-dark';
221
- $scope.fa = $scope.fa || $scope.label ? '' : 'fas fa-play';
222
-
223
- if ($scope.type.like('*add*|*new*')) {
224
- $scope.fa = 'fas fa-plus';
225
- $scope.class = 'btn-primary';
226
- } else if ($scope.type.like('*update*|*edit*')) {
227
- $scope.fa = 'fas fa-edit';
228
- $scope.class = 'btn-warning';
229
- } else if ($scope.type.like('*save*')) {
230
- $scope.fa = 'fas fa-save';
231
- $scope.class = 'btn-success';
232
- } else if ($scope.type.like('*list*')) {
233
- $scope.fa = 'fas fa-list';
234
- $scope.class = 'btn-info';
235
- } else if ($scope.type.like('unapprove')) {
236
- $scope.fa = 'fas fa-eject';
237
- $scope.class = 'btn-danger';
238
- } else if ($scope.type.like('approve')) {
239
- $scope.fa = 'fas fa-check-double';
240
- $scope.class = 'btn-primary';
241
- } else if ($scope.type.like('*view*|*details*|*show*')) {
242
- $scope.fa = 'fas fa-eye';
243
- $scope.class = 'btn-info';
244
- } else if ($scope.type.like('*delete*|*remove*|*clear*')) {
245
- $scope.fa = 'fas fa-trash';
246
- $scope.class = 'btn-danger';
247
- } else if ($scope.type.like('*exit*|*close*')) {
248
- $scope.fa = 'fas fa-times-circle';
249
- $scope.class = 'btn-danger';
250
- } else if ($scope.type.like('*print*')) {
251
- $scope.fa = 'fas fa-print';
252
- $scope.class = 'btn-secondary';
253
- } else if ($scope.type.like('*export*|*excel*') ) {
254
- $scope.fa = 'fas fa-file-export';
255
- $scope.class = 'btn-secondary';
256
- } else if ($scope.type.like('*search*|*find*')) {
257
- $scope.fa = 'fas fa-search';
258
- $scope.class = 'btn-light';
259
- } else if ($scope.type.like('*login*|*signin*')) {
260
- $scope.fa = 'fas fa-sign-in-alt';
261
- $scope.class = 'btn-light';
262
- } else if ($scope.type.like('*logout*|*signout*')) {
263
- $scope.fa = 'fas fa-sign-out-alt';
264
- $scope.class = 'btn-light';
265
- } else if ($scope.type.like('*push*')) {
266
- $scope.fa = 'fas fa-plus-circle';
267
- $scope.class = 'btn-primary';
268
- } else if ($scope.type.like('*cancel*')) {
269
- $scope.fa = 'fas fa-minus-circle';
270
- $scope.class = 'btn-danger';
271
- } else if ($scope.type.like('*upload*')) {
272
- $scope.fa = 'fas fa-upload';
273
- $scope.class = 'btn-primary';
274
- } else if ($scope.type.like('*up*')) {
275
- $scope.fa = 'fas fa-long-arrow-alt-up';
276
- $scope.class = 'btn-light';
277
- } else if ($scope.type.like('*down*')) {
278
- $scope.fa = 'fas fa-long-arrow-alt-down';
279
- $scope.class = 'btn-light';
280
- } else if ($scope.type.like('*reset*')) {
281
- $scope.fa = 'fas fa-sync-alt';
282
- $scope.class = 'btn-light';
283
- }else if ($scope.type.like('*stop*')) {
284
- $scope.fa = 'fas fa-stop';
285
- $scope.class = 'btn-light';
286
- }else if ($scope.type.like('*copy*')) {
287
- $scope.fa = 'fas fa-copy';
288
- $scope.class = 'btn-light';
289
- }
290
- if ($scope.type.like('*default*')) {
291
- $scope.class = '';
292
- }
293
- if ($scope.class2) {
294
- $scope.class = $scope.class2;
295
- }
296
- $scope.$watch('loading', (loading) => {
297
- if (loading === 'true') {
298
- $scope.busy = true;
299
- } else {
300
- $scope.busy = false;
207
+ app.directive('iButton', [
208
+ '$interval',
209
+ '$timeout',
210
+ function ($interval, $timeout) {
211
+ return {
212
+ restrict: 'E',
213
+ scope: {
214
+ label: '@',
215
+ type: '@',
216
+ class2: '@',
217
+ loading: '@',
218
+ ngClick: '&',
219
+ fa: '@',
220
+ },
221
+ link: function ($scope, element, attrs, ctrl) {
222
+ $scope.type = $scope.type || '';
223
+ $scope.class = $scope.class = 'btn-light';
224
+ $scope.fa = $scope.fa || $scope.label ? '' : 'fas fa-mouse-pointer';
225
+
226
+ if ($scope.type.like('*add*|*new*')) {
227
+ $scope.fa = 'fas fa-plus';
228
+ $scope.class = 'btn-primary';
229
+ } else if ($scope.type.like('*update*|*edit*')) {
230
+ $scope.fa = 'fas fa-edit';
231
+ $scope.class = 'btn-warning';
232
+ } else if ($scope.type.like('*save*')) {
233
+ $scope.fa = 'fas fa-save';
234
+ $scope.class = 'btn-success';
235
+ } else if ($scope.type.like('*list*')) {
236
+ $scope.fa = 'fas fa-list';
237
+ $scope.class = 'btn-info';
238
+ } else if ($scope.type.like('unapprove')) {
239
+ $scope.fa = 'fas fa-eject';
240
+ $scope.class = 'btn-danger';
241
+ } else if ($scope.type.like('approve')) {
242
+ $scope.fa = 'fas fa-check-double';
243
+ $scope.class = 'btn-primary';
244
+ } else if ($scope.type.like('*view*|*details*|*show*')) {
245
+ $scope.fa = 'fas fa-eye';
246
+ $scope.class = 'btn-info';
247
+ } else if ($scope.type.like('*delete*|*remove*|*clear*')) {
248
+ $scope.fa = 'fas fa-trash';
249
+ $scope.class = 'btn-danger';
250
+ } else if ($scope.type.like('*exit*|*close*')) {
251
+ $scope.fa = 'fas fa-times-circle';
252
+ $scope.class = 'btn-danger';
253
+ } else if ($scope.type.like('*print*')) {
254
+ $scope.fa = 'fas fa-print';
255
+ $scope.class = 'btn-secondary';
256
+ } else if ($scope.type.like('*export*|*excel*')) {
257
+ $scope.fa = 'fas fa-file-export';
258
+ $scope.class = 'btn-secondary';
259
+ } else if ($scope.type.like('*import*')) {
260
+ $scope.fa = 'fas fa-file-upload';
261
+ $scope.class = 'btn-secondary';
262
+ } else if ($scope.type.like('*search*|*find*')) {
263
+ $scope.fa = 'fas fa-search';
264
+ $scope.class = 'btn-light';
265
+ } else if ($scope.type.like('*login*|*signin*')) {
266
+ $scope.fa = 'fas fa-sign-in-alt';
267
+ $scope.class = 'btn-light';
268
+ } else if ($scope.type.like('*logout*|*signout*')) {
269
+ $scope.fa = 'fas fa-sign-out-alt';
270
+ $scope.class = 'btn-light';
271
+ } else if ($scope.type.like('*push*')) {
272
+ $scope.fa = 'fas fa-plus-circle';
273
+ $scope.class = 'btn-primary';
274
+ } else if ($scope.type.like('*cancel*')) {
275
+ $scope.fa = 'fas fa-minus-circle';
276
+ $scope.class = 'btn-danger';
277
+ } else if ($scope.type.like('*upload*')) {
278
+ $scope.fa = 'fas fa-upload';
279
+ $scope.class = 'btn-primary';
280
+ } else if ($scope.type.like('*up*')) {
281
+ $scope.fa = 'fas fa-long-arrow-alt-up';
282
+ $scope.class = 'btn-light';
283
+ } else if ($scope.type.like('*down*')) {
284
+ $scope.fa = 'fas fa-long-arrow-alt-down';
285
+ $scope.class = 'btn-light';
286
+ } else if ($scope.type.like('*reset*')) {
287
+ $scope.fa = 'fas fa-sync-alt';
288
+ $scope.class = 'btn-light';
289
+ } else if ($scope.type.like('*stop*')) {
290
+ $scope.fa = 'fas fa-stop';
291
+ $scope.class = 'btn-light';
292
+ } else if ($scope.type.like('*play*')) {
293
+ $scope.fa = 'far fa-play-circle';
294
+ $scope.class = 'btn-light';
295
+ } else if ($scope.type.like('*copy*')) {
296
+ $scope.fa = 'fas fa-copy';
297
+ $scope.class = 'btn-light';
301
298
  }
302
- });
303
- },
304
- template: `/*##client-side/directive/i-button.html*/`,
305
- };
306
- });
299
+ if ($scope.type.like('*default*')) {
300
+ $scope.class = '';
301
+ }
302
+ if ($scope.class2) {
303
+ $scope.class = $scope.class2;
304
+ }
305
+ $scope.click = function () {
306
+ $scope.clickBusy = true;
307
+ if ($scope.ngClick) {
308
+ $scope.ngClick();
309
+ }
310
+ $timeout(() => {
311
+ $scope.clickBusy = false;
312
+ }, 250);
313
+ };
314
+ $scope.$watch('loading', (loading) => {
315
+ if (loading === 'true') {
316
+ $scope.busy = true;
317
+ } else {
318
+ $scope.busy = false;
319
+ }
320
+ });
321
+ },
322
+ template: `/*##client-side/directive/i-button.html*/`,
323
+ };
324
+ },
325
+ ]);
307
326
  app.directive('iList', [
308
327
  '$interval',
309
328
  '$timeout',
@@ -596,7 +615,7 @@ app.directive('iChecklist', [
596
615
  },
597
616
  ]);
598
617
 
599
- app.directive('iDate', function () {
618
+ app.directive('iDate', function ($timeout) {
600
619
  return {
601
620
  restrict: 'E',
602
621
  required: 'ngModel',
@@ -685,6 +704,7 @@ app.directive('iDate', function () {
685
704
  if ($scope.ngModel1) {
686
705
  $scope.ngModel = $scope.ngModel1;
687
706
  $scope.editOnly = false;
707
+
688
708
  if ($scope.ngChange) {
689
709
  $scope.ngChange();
690
710
  }
@@ -845,9 +865,10 @@ app.directive('iFile', [
845
865
  $scope.viewOnly = $scope.view === undefined ? false : true;
846
866
 
847
867
  let input = $(element).find('input')[0];
848
- let button = $(element).find('button')[0];
868
+ let button = $(element).find('i-button')[0];
849
869
 
850
870
  let progress = $(element).find('.progress')[0];
871
+ let progressBar = $(element).find('.progress-bar')[0];
851
872
  $(progress).hide();
852
873
 
853
874
  $scope.id = Math.random().toString().replace('.', '_');
@@ -868,6 +889,7 @@ app.directive('iFile', [
868
889
  if (e) {
869
890
  $(progress).show();
870
891
  $scope.value = (e.loaded / e.total) * 100;
892
+ progressBar.style.width = $scope.value + '%';
871
893
  $scope.max = e.total;
872
894
  if ($scope.value === 100) {
873
895
  $(progress).hide();
@@ -1088,7 +1110,6 @@ app.directive('iVideo', [
1088
1110
  }
1089
1111
  };
1090
1112
  $scope.delete = function () {
1091
- console.log('delete ...');
1092
1113
  $scope.ngModel = null;
1093
1114
  video.setAttribute('src', null);
1094
1115
  };
@@ -1193,7 +1214,6 @@ app.directive('iUpload', [
1193
1214
  progress.max = e.total;
1194
1215
  } else if (data) {
1195
1216
  if ($scope.onUploaded) {
1196
- console.log(err, data, e);
1197
1217
  $scope.onUploaded({ $data: data });
1198
1218
  }
1199
1219
  }
package/lib/fsm.js CHANGED
@@ -100,7 +100,7 @@ module.exports = function init(____0) {
100
100
  };
101
101
 
102
102
  try {
103
- let path2 = path + '_tmp';
103
+ let path2 = path + '.isite-backup';
104
104
  fsm.deleteFileSync(path2);
105
105
  fs.writeFileSync(path2, data, {
106
106
  encoding: encode || 'utf8',
@@ -108,7 +108,7 @@ module.exports = function init(____0) {
108
108
  fsm.deleteFileSync(path);
109
109
  fs.renameSync(path2, path);
110
110
  fsm.deleteFileSync(path2);
111
- callback();
111
+ callback(null, path);
112
112
  } catch (err) {
113
113
  callback(err);
114
114
  }
@@ -206,6 +206,46 @@ module.exports = function init(____0) {
206
206
  });
207
207
  };
208
208
 
209
+ fsm.readFileNow = function (path, callback) {
210
+ fsm.readFileRaw(path, (data) => {
211
+ path = path.replace('.isite-backup', '');
212
+ if (data) {
213
+ let file = {
214
+ path: path,
215
+ content: data,
216
+ count: 1,
217
+ stat: fsm.statSync(path),
218
+ time: new Date().getTime(),
219
+ };
220
+
221
+ file.json = function (callback) {
222
+ try {
223
+ if (!file.isJson) {
224
+ file.content = JSON.parse(file.content);
225
+ file.isJson = true;
226
+ }
227
+ } catch (error) {
228
+ file.error = error;
229
+ console.log(error);
230
+ }
231
+ if (callback) {
232
+ callback(file);
233
+ } else {
234
+ return file;
235
+ }
236
+ };
237
+ fsm.list.push(file);
238
+ if (callback) {
239
+ callback(null, file);
240
+ }
241
+ } else {
242
+ callback({
243
+ message: path + ' :: Error Read File Not Exists',
244
+ });
245
+ }
246
+ });
247
+ };
248
+
209
249
  fsm.readFile = function (path, callback) {
210
250
  path = fsm.getFilePath(path);
211
251
 
@@ -228,42 +268,9 @@ module.exports = function init(____0) {
228
268
  }
229
269
 
230
270
  if (fsm.isFileExistsSync(path)) {
231
- fsm.readFileRaw(path, (data) => {
232
- if (data) {
233
- let file = {
234
- path: path,
235
- content: data,
236
- count: 1,
237
- stat: fsm.statSync(path),
238
- time: new Date().getTime(),
239
- };
240
-
241
- file.json = function (callback) {
242
- try {
243
- if (!file.isJson) {
244
- file.content = JSON.parse(file.content);
245
- file.isJson = true;
246
- }
247
- } catch (error) {
248
- file.error = error;
249
- console.log(error);
250
- }
251
- if (callback) {
252
- callback(file);
253
- } else {
254
- return file;
255
- }
256
- };
257
- fsm.list.push(file);
258
- if (callback) {
259
- callback(null, file);
260
- }
261
- } else {
262
- callback({
263
- message: path + ' :: Error Read File Not Exists',
264
- });
265
- }
266
- });
271
+ fsm.readFileNow(path, callback);
272
+ } else if (fsm.isFileExistsSync(path + '.isite-backup')) {
273
+ fsm.readFileNow(path + '.isite-backup', callback);
267
274
  } else {
268
275
  if (callback) {
269
276
  callback({
@@ -300,6 +307,17 @@ module.exports = function init(____0) {
300
307
  };
301
308
  fsm.list.push(file);
302
309
 
310
+ return file.content;
311
+ } else if (fsm.isFileExistsSync(path + '.isite-backup')) {
312
+ let file = {
313
+ path: path,
314
+ content: fsm.readFileSyncRaw(path + '.isite-backup'),
315
+ count: 1,
316
+ stat: fsm.statSync(path + '.isite-backup'),
317
+ time: new Date().getTime(),
318
+ };
319
+ fsm.list.push(file);
320
+
303
321
  return file.content;
304
322
  }
305
323
  return '';
package/lib/parser.js CHANGED
@@ -207,7 +207,7 @@ module.exports = function init(req, res, ____0, route) {
207
207
  return render_site('setting.' + v);
208
208
  }
209
209
  }
210
- function render_req(v) {
210
+ function renderRequest(v) {
211
211
  if (!v) {
212
212
  return '';
213
213
  }
@@ -254,7 +254,7 @@ module.exports = function init(req, res, ____0, route) {
254
254
  out = ____0.toJson(out);
255
255
  }
256
256
  }
257
- return out;
257
+ return typeof out !== 'undefined' ? out : '';
258
258
  }
259
259
 
260
260
  function renderSession(v) {
@@ -814,7 +814,7 @@ module.exports = function init(req, res, ____0, route) {
814
814
  txt = txt.replace(matches[i], render_site(v));
815
815
  } else if (v.startsWith('##req.')) {
816
816
  v = v.replace('##req.', '').replace('##', '');
817
- txt = txt.replace(matches[i], render_req(v));
817
+ txt = txt.replace(matches[i], renderRequest(v));
818
818
  } else if (v.startsWith('##session.')) {
819
819
  v = v.replace('##session.', '').replace('##', '');
820
820
  txt = txt.replace(matches[i], renderSession(v));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isite",
3
- "version": "2023.12.15",
3
+ "version": "2023.12.16",
4
4
  "description": "Create Secure Multi-Language Web Site [Fast and Easy] ",
5
5
  "main": "index.js",
6
6
  "repository": {