aaden-cli 1.6.79 → 1.6.81

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.
@@ -92,6 +92,7 @@ sudo mysql -uroot < backendFiles/new.sql
92
92
 
93
93
  echoWithWait "Uploading PHP Files"
94
94
  sudo mv backendFiles/* /var/www/html/
95
+ sudo chown -hR www-data:www-data /var/www/html
95
96
 
96
97
  sudo chmod -R 777 /var/www/html/Resource
97
98
  sudo chmod +x /var/www/html/crontab.sh
package/dist/index.js CHANGED
@@ -18507,7 +18507,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.19.2","description":"P
18507
18507
  /***/ ((module) => {
18508
18508
 
18509
18509
  "use strict";
18510
- module.exports = {"i8":"1.6.79"};
18510
+ module.exports = {"i8":"1.6.81"};
18511
18511
 
18512
18512
  /***/ })
18513
18513
 
@@ -18624,6 +18624,7 @@ program.command('update-ngrok-config <deviceId>').action(updateNgrokConfig)
18624
18624
  program.command('run <filePath>').action(run)
18625
18625
  program.command('patch').action(patch)
18626
18626
  program.command('check-tse').action(checkTse)
18627
+ program.command('check-win-tse').action(checkWinTse)
18627
18628
  program.command('setup-tse').action(enableTSE)
18628
18629
  program.command('check-version').action(getBackendVersionOffline)
18629
18630
  program.command('full-update').action(fullUpdate)
@@ -18743,6 +18744,26 @@ function checkTse() {
18743
18744
  cli.executeInShell(['journalctl -f -u aaden-tse.service'], program.debug)
18744
18745
  }
18745
18746
 
18747
+ async function checkWinTse() {
18748
+ if (!fs.existsSync('/mnt/c/Users')) {
18749
+ console.log('此系统不是Windows,请改用 aaden-cli check-tse')
18750
+ return
18751
+ }
18752
+
18753
+ const logPaths = fs.readdirSync('/mnt/c/Users')
18754
+ .map(x => `/mnt/c/Users/${x}/Desktop/AadenTseOnWindows/logs/AadenTseServiceRegister.out.log`)
18755
+ .filter(x => fs.existsSync(x))
18756
+
18757
+ if (logPaths.length === 0) {
18758
+ console.log('未找到Windows TSE日志')
18759
+ return
18760
+ }
18761
+
18762
+ const logPath = logPaths[0]
18763
+
18764
+ cli.executeInShell([`tail -n 100 -f ${logPath}`], program.debug)
18765
+ }
18766
+
18746
18767
  function remountTSE() {
18747
18768
  const files = ['AadenDeploy/mountTSE.sh']
18748
18769
  runMultiple(files)
@@ -19039,7 +19060,7 @@ async function update(channel = '') {
19039
19060
  `./update.sh ${channel}`
19040
19061
  ])
19041
19062
  const {code} = await cli.executeInShell(command, program.debug)
19042
- await logAction("进行了手动更新update",code)
19063
+ await logAction("进行了手动更新update", code)
19043
19064
  } catch (e) {
19044
19065
  console.error(e)
19045
19066
  }
@@ -19197,16 +19218,15 @@ async function doLog() {
19197
19218
  const frontendVersion = list[list.length - 2].replace(/\s+/g, ' ')
19198
19219
  .split(' ')[1]
19199
19220
 
19200
- await deviceEcho({
19201
- frontendVersion,
19202
- cliVersion: version,
19203
- diskUsage: diskUsage[diskUsage.length - 1].replace('\n', ''),
19204
- upTime: getUpTime(),
19205
- ngrokIsNew: ngrokNewestVersion()
19206
- }
19207
- )
19208
- console.log('finish')
19209
-
19221
+ await deviceEcho({
19222
+ frontendVersion,
19223
+ cliVersion: version,
19224
+ diskUsage: diskUsage[diskUsage.length - 1].replace('\n', ''),
19225
+ upTime: getUpTime(),
19226
+ ngrokIsNew: ngrokNewestVersion()
19227
+ }
19228
+ )
19229
+ console.log('finish')
19210
19230
 
19211
19231
 
19212
19232
  process.exit(0)
package/index.js CHANGED
@@ -43,6 +43,7 @@ program.command('update-ngrok-config <deviceId>').action(updateNgrokConfig)
43
43
  program.command('run <filePath>').action(run)
44
44
  program.command('patch').action(patch)
45
45
  program.command('check-tse').action(checkTse)
46
+ program.command('check-win-tse').action(checkWinTse)
46
47
  program.command('setup-tse').action(enableTSE)
47
48
  program.command('check-version').action(getBackendVersionOffline)
48
49
  program.command('full-update').action(fullUpdate)
@@ -162,6 +163,26 @@ function checkTse() {
162
163
  cli.executeInShell(['journalctl -f -u aaden-tse.service'], program.debug)
163
164
  }
164
165
 
166
+ async function checkWinTse() {
167
+ if (!fs.existsSync('/mnt/c/Users')) {
168
+ console.log('此系统不是Windows,请改用 aaden-cli check-tse')
169
+ return
170
+ }
171
+
172
+ const logPaths = fs.readdirSync('/mnt/c/Users')
173
+ .map(x => `/mnt/c/Users/${x}/Desktop/AadenTseOnWindows/logs/AadenTseServiceRegister.out.log`)
174
+ .filter(x => fs.existsSync(x))
175
+
176
+ if (logPaths.length === 0) {
177
+ console.log('未找到Windows TSE日志')
178
+ return
179
+ }
180
+
181
+ const logPath = logPaths[0]
182
+
183
+ cli.executeInShell([`tail -n 100 -f ${logPath}`], program.debug)
184
+ }
185
+
165
186
  function remountTSE() {
166
187
  const files = ['AadenDeploy/mountTSE.sh']
167
188
  runMultiple(files)
@@ -458,7 +479,7 @@ async function update(channel = '') {
458
479
  `./update.sh ${channel}`
459
480
  ])
460
481
  const {code} = await cli.executeInShell(command, program.debug)
461
- await logAction("进行了手动更新update",code)
482
+ await logAction("进行了手动更新update", code)
462
483
  } catch (e) {
463
484
  console.error(e)
464
485
  }
@@ -616,16 +637,15 @@ async function doLog() {
616
637
  const frontendVersion = list[list.length - 2].replace(/\s+/g, ' ')
617
638
  .split(' ')[1]
618
639
 
619
- await deviceEcho({
620
- frontendVersion,
621
- cliVersion: version,
622
- diskUsage: diskUsage[diskUsage.length - 1].replace('\n', ''),
623
- upTime: getUpTime(),
624
- ngrokIsNew: ngrokNewestVersion()
625
- }
626
- )
627
- console.log('finish')
628
-
640
+ await deviceEcho({
641
+ frontendVersion,
642
+ cliVersion: version,
643
+ diskUsage: diskUsage[diskUsage.length - 1].replace('\n', ''),
644
+ upTime: getUpTime(),
645
+ ngrokIsNew: ngrokNewestVersion()
646
+ }
647
+ )
648
+ console.log('finish')
629
649
 
630
650
 
631
651
  process.exit(0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aaden-cli",
3
- "version": "1.6.79",
3
+ "version": "1.6.81",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {