aaden-cli 1.1.181 → 1.2.1

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.
Files changed (57) hide show
  1. package/.gitattributes +2 -2
  2. package/.github/workflows/submit-message.yml +49 -49
  3. package/AadenDeploy/Utils/LoadingUtils.sh +11 -11
  4. package/AadenDeploy/Utils/MyVersion.php +63 -63
  5. package/AadenDeploy/Utils/configureHttps.sh +5 -5
  6. package/AadenDeploy/Utils/convert.sql +18 -18
  7. package/AadenDeploy/Utils/startsUp.sh +6 -6
  8. package/AadenDeploy/Utils/tseEnable.sh +4 -4
  9. package/AadenDeploy/Utils/tseReady.sh +33 -33
  10. package/AadenDeploy/Utils/updateDataBaseCharSet.sh +5 -5
  11. package/AadenDeploy/Utils/usbPrinterSetup.sh +11 -11
  12. package/AadenDeploy/Utils/wlansetup.sh +12 -12
  13. package/AadenDeploy/aadensetup.sh +144 -144
  14. package/AadenDeploy/files/getFile.sh +27 -27
  15. package/AadenDeploy/lightUpdate.sh +11 -11
  16. package/AadenDeploy/mountTSE.sh +16 -16
  17. package/AadenDeploy/purge.sql +9 -9
  18. package/AadenDeploy/readme.md +179 -179
  19. package/AadenDeploy/scureSql.sh +91 -91
  20. package/AadenDeploy/update.sh +22 -22
  21. package/AadenDeploy/upgrade.sh +11 -11
  22. package/LICENSE +21 -21
  23. package/README.md +37 -37
  24. package/aws.js +42 -42
  25. package/dist/index.js +744 -741
  26. package/dist/patch/202010030826fixAuthority.sh +30 -30
  27. package/dist/patch/202010291116addUsrLocalBinToRootPath.sh +11 -11
  28. package/dist/patch/202104081433aptUpgrade.sh +2 -2
  29. package/dist/patch/202105052136useAxelToDownload.sh +2 -2
  30. package/dist/patch/202105052148createWorkDir.sh +5 -5
  31. package/dist/patch/202107031201addVersionPHP.sh +8 -8
  32. package/dist/patch/202107081404snapStopRefresh.sh +3 -3
  33. package/dist/patch/202107121635AddPHPExtension.sh +6 -6
  34. package/dist/patch/202107151032SnapStopRefresh2.sh +3 -3
  35. package/dist/patch/202107211049resetAutoUpgradeFixAuthProblem10.sh +17 -16
  36. package/generateFullSql.js +21 -21
  37. package/index.js +659 -656
  38. package/modules/cli-utils.js +42 -42
  39. package/package.json +41 -41
  40. package/patch/202010030826fixAuthority.sh +30 -30
  41. package/patch/202010291116addUsrLocalBinToRootPath.sh +11 -11
  42. package/patch/202104081433aptUpgrade.sh +2 -2
  43. package/patch/202105052136useAxelToDownload.sh +2 -2
  44. package/patch/202105052148createWorkDir.sh +5 -5
  45. package/patch/202107031201addVersionPHP.sh +8 -8
  46. package/patch/202107081404snapStopRefresh.sh +3 -3
  47. package/patch/202107121635AddPHPExtension.sh +6 -6
  48. package/patch/202107151032SnapStopRefresh2.sh +3 -3
  49. package/patch/202107211049resetAutoUpgradeFixAuthProblem10.sh +17 -16
  50. package/{dist/patch/202204061112ResetCronTab18.sh → patch/202204061112ResetCronTab19.sh} +17 -19
  51. package/sql/1.sql +1378 -1378
  52. package/sql/clean.sql +8 -8
  53. package/test.js +6 -6
  54. package/utils/checkInSet.js +23 -23
  55. package/utils/renameFile.js +19 -19
  56. package/AadenDeploy/Aaden/351/241/271/347/233/256/347/224/250/346/210/267/346/263/250/345/206/214/350/241/250.docx +0 -0
  57. package/patch/202204061112ResetCronTab18.sh +0 -19
package/README.md CHANGED
@@ -1,37 +1,37 @@
1
- # aaden-cli
2
-
3
- Aaden系统的Cli应用.
4
-
5
- usage:
6
-
7
- ```
8
- $ >npm istall -g aaden-cli
9
-
10
- $ >aaden-cli
11
- _ _____ _ _____
12
- /\ | | / ____| | |_ _|
13
- / \ __ _ __| | ___ _ __ | | | | | |
14
- / /\ \ / _` |/ _` |/ _ \ '_ \ | | | | | |
15
- / ____ \ (_| | (_| | __/ | | | | |____| |____ _| |_
16
- /_/ \_\__,_|\__,_|\___|_| |_| \_____|______|_____|
17
-
18
-
19
- Aaden@InnerKen CLI Version:1.0.19
20
-
21
-
22
- Usage: index [options] [command]
23
-
24
- Options:
25
- -V, --version output the version number
26
- -d, --debug use Debug Out put
27
- -h, --help display help for command
28
-
29
- Commands:
30
- update [channel]
31
- install [options] <deviceId> [channel]
32
- setup-wifi
33
- upgrade
34
- where
35
- help [command] display help for command
36
-
37
- ```
1
+ # aaden-cli
2
+
3
+ Aaden系统的Cli应用.
4
+
5
+ usage:
6
+
7
+ ```
8
+ $ >npm istall -g aaden-cli
9
+
10
+ $ >aaden-cli
11
+ _ _____ _ _____
12
+ /\ | | / ____| | |_ _|
13
+ / \ __ _ __| | ___ _ __ | | | | | |
14
+ / /\ \ / _` |/ _` |/ _ \ '_ \ | | | | | |
15
+ / ____ \ (_| | (_| | __/ | | | | |____| |____ _| |_
16
+ /_/ \_\__,_|\__,_|\___|_| |_| \_____|______|_____|
17
+
18
+
19
+ Aaden@InnerKen CLI Version:1.0.19
20
+
21
+
22
+ Usage: index [options] [command]
23
+
24
+ Options:
25
+ -V, --version output the version number
26
+ -d, --debug use Debug Out put
27
+ -h, --help display help for command
28
+
29
+ Commands:
30
+ update [channel]
31
+ install [options] <deviceId> [channel]
32
+ setup-wifi
33
+ upgrade
34
+ where
35
+ help [command] display help for command
36
+
37
+ ```
package/aws.js CHANGED
@@ -1,42 +1,42 @@
1
- const AWS = require('aws-sdk')
2
- const fs = require('fs')
3
-
4
- const id = 'AKIA4TTJEQRYQ7CBPK5W'
5
- const secret = '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'
6
- const bucketName = 'aaden-backup-bucket'
7
-
8
- const s3 = new AWS.S3({
9
- accessKeyId: id,
10
- secretAccessKey: secret
11
- })
12
-
13
- function getMyDeviceId () {
14
- const loadIniFile = require('read-ini-file')
15
- try {
16
- return loadIniFile.sync('/var/www/html/Resource/config/config.ini').Device.DeviceId
17
- } catch (e) {
18
- return -1
19
- }
20
-
21
- }
22
-
23
- const uploadFile = (fileName) => {
24
- const fileContent = fs.readFileSync(fileName)
25
-
26
- const params = {
27
- Bucket: bucketName,
28
- Key: getMyDeviceId() + '/backups/' + 'backup.sql',
29
- Body: fileContent
30
- }
31
-
32
- s3.upload(params, function (err, data) {
33
- if (err) {
34
- throw err
35
- }
36
- console.log(`File uploaded successfully. ${data.Location}`)
37
- })
38
- }
39
-
40
- module.exports = {
41
- uploadFile
42
- }
1
+ const AWS = require('aws-sdk')
2
+ const fs = require('fs')
3
+
4
+ const id = 'AKIA4TTJEQRYQ7CBPK5W'
5
+ const secret = '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'
6
+ const bucketName = 'aaden-backup-bucket'
7
+
8
+ const s3 = new AWS.S3({
9
+ accessKeyId: id,
10
+ secretAccessKey: secret
11
+ })
12
+
13
+ function getMyDeviceId () {
14
+ const loadIniFile = require('read-ini-file')
15
+ try {
16
+ return loadIniFile.sync('/var/www/html/Resource/config/config.ini').Device.DeviceId
17
+ } catch (e) {
18
+ return -1
19
+ }
20
+
21
+ }
22
+
23
+ const uploadFile = (fileName) => {
24
+ const fileContent = fs.readFileSync(fileName)
25
+
26
+ const params = {
27
+ Bucket: bucketName,
28
+ Key: getMyDeviceId() + '/backups/' + 'backup.sql',
29
+ Body: fileContent
30
+ }
31
+
32
+ s3.upload(params, function (err, data) {
33
+ if (err) {
34
+ throw err
35
+ }
36
+ console.log(`File uploaded successfully. ${data.Location}`)
37
+ })
38
+ }
39
+
40
+ module.exports = {
41
+ uploadFile
42
+ }