aaden-cli 1.2.23 → 1.2.25
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.
- package/AadenDeploy/files/getFile.sh +0 -0
- package/AadenDeploy/mountTSE.sh +1 -6
- package/AadenDeploy/ngrok/ngrok +0 -0
- package/AadenDeploy/update.sh +0 -0
- package/dist/index.js +38 -20
- package/index.js +37 -19
- package/package.json +1 -1
|
File without changes
|
package/AadenDeploy/mountTSE.sh
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
|
|
3
|
-
TSE_PATH=$(sudo fdisk -l | grep 7,5 | cut -d ' ' -f 1)
|
|
4
|
-
echo "TSE_PATH:$TSE_PATH"
|
|
5
|
-
UUID=$(sudo blkid $TSE_PATH | cut -d "=" -f 3 | cut -d '"' -f 2)
|
|
6
|
-
echo "UUID:$UUID"
|
|
7
|
-
|
|
8
3
|
sudo mkdir -p "/media/aaden/SWISSBIT"
|
|
9
4
|
sudo touch tmp
|
|
10
5
|
sudo chmod 777 tmp
|
|
11
6
|
sudo cat /etc/fstab >tmp
|
|
12
|
-
echo "UUID
|
|
7
|
+
echo "UUID=5AFD-8706 /media/aaden/SWISSBIT vfat defaults 0 2" >>tmp
|
|
13
8
|
sudo mv /etc/fstab /etc/fstab.backup
|
|
14
9
|
sudo mv tmp /etc/fstab
|
|
15
10
|
echo 'END AUTO CONFIG'
|
package/AadenDeploy/ngrok/ngrok
CHANGED
|
File without changes
|
package/AadenDeploy/update.sh
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
@@ -58161,7 +58161,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.19.2","description":"P
|
|
|
58161
58161
|
/***/ ((module) => {
|
|
58162
58162
|
|
|
58163
58163
|
"use strict";
|
|
58164
|
-
module.exports = {"i8":"1.2.
|
|
58164
|
+
module.exports = {"i8":"1.2.24"};
|
|
58165
58165
|
|
|
58166
58166
|
/***/ }),
|
|
58167
58167
|
|
|
@@ -58450,6 +58450,14 @@ program.command('enable-resource-track').action(enableResourceTrack)
|
|
|
58450
58450
|
program.command('start-resource-track').action(startResourceTrack)
|
|
58451
58451
|
program.command('auto-send-mail').action(editIni)
|
|
58452
58452
|
program.command('auto-send-summary').action(autoSendSummaryLastMonth)
|
|
58453
|
+
program.command('set-do-not-send-zbon-when-print-true').
|
|
58454
|
+
action(editConfigIni(setConfig('Email', 'DoNotSendZbonWhenPrint', true)))
|
|
58455
|
+
program.command('set-do-not-send-zbon-when-print-false').
|
|
58456
|
+
action(editConfigIni(setConfig('Email', 'DoNotSendZbonWhenPrint', false)))
|
|
58457
|
+
program.command('set-auto-send-3in1-today-true').
|
|
58458
|
+
action(editConfigIni(setConfig('Email', 'AutoSend3in1Today', true)))
|
|
58459
|
+
program.command('set-auto-send-3in1-today-false').
|
|
58460
|
+
action(editConfigIni(setConfig('Email', 'AutoSend3in1Today', false)))
|
|
58453
58461
|
|
|
58454
58462
|
if (program.debug) {
|
|
58455
58463
|
debugInfo()
|
|
@@ -59073,18 +59081,13 @@ function editIni () {
|
|
|
59073
59081
|
cli.executeInShell([
|
|
59074
59082
|
'sudo chmod 777 /var/www/html/Resource/config/config.ini',
|
|
59075
59083
|
'aaden-cli fix-cronjob',
|
|
59076
|
-
],program.debug)
|
|
59077
|
-
const ini = __nccwpck_require__(80045)
|
|
59078
|
-
const filePath = '/var/www/html/Resource/config/config.ini'
|
|
59079
|
-
const info = ini.parse(fs.readFileSync(filePath, 'utf-8'))
|
|
59080
|
-
console.log(info)
|
|
59081
|
-
if(!info.Email) {
|
|
59082
|
-
info.Email = {}
|
|
59083
|
-
}
|
|
59084
|
-
info.Email.AutoSend3in1LastMonth = true
|
|
59085
|
-
|
|
59086
|
-
fs.writeFileSync(filePath, ini.stringify(info))
|
|
59084
|
+
], program.debug)
|
|
59087
59085
|
|
|
59086
|
+
editConfigIni(composeMany([
|
|
59087
|
+
setConfig('Email', 'AutoSend3in1LastMonth', true),
|
|
59088
|
+
setConfig('Email', 'DoNotSendZbonWhenPrint', true),
|
|
59089
|
+
setConfig('Email', 'AutoSend3in1Today', false),
|
|
59090
|
+
]))()
|
|
59088
59091
|
}
|
|
59089
59092
|
|
|
59090
59093
|
function autoSendSummaryLastMonth () {
|
|
@@ -59092,17 +59095,32 @@ function autoSendSummaryLastMonth () {
|
|
|
59092
59095
|
'sudo chmod 777 /var/www/html/Resource/config/config.ini',
|
|
59093
59096
|
'aaden-cli fix-cronjob',
|
|
59094
59097
|
], program.debug)
|
|
59095
|
-
|
|
59096
|
-
|
|
59097
|
-
|
|
59098
|
-
|
|
59099
|
-
|
|
59100
|
-
|
|
59098
|
+
|
|
59099
|
+
editConfigIni(setConfig('Email', 'AutoSendSummaryLastMonth', true))()
|
|
59100
|
+
}
|
|
59101
|
+
|
|
59102
|
+
function editConfigIni (f) {
|
|
59103
|
+
return () => {
|
|
59104
|
+
const ini = __nccwpck_require__(80045)
|
|
59105
|
+
const filePath = '/var/www/html/Resource/config/config.ini'
|
|
59106
|
+
const info = ini.parse(fs.readFileSync(filePath, 'utf-8'))
|
|
59107
|
+
f(info)
|
|
59108
|
+
fs.writeFileSync(filePath, ini.stringify(info))
|
|
59101
59109
|
}
|
|
59102
|
-
|
|
59110
|
+
}
|
|
59103
59111
|
|
|
59104
|
-
|
|
59112
|
+
function setConfig (section, key, value) {
|
|
59113
|
+
return file => {
|
|
59114
|
+
if (!file[section]) {
|
|
59115
|
+
file[section] = {}
|
|
59116
|
+
}
|
|
59117
|
+
file[section][key] = value
|
|
59118
|
+
return file
|
|
59119
|
+
}
|
|
59120
|
+
}
|
|
59105
59121
|
|
|
59122
|
+
function composeMany (fs) {
|
|
59123
|
+
return fs.reduce((f, g) => x => g(f(x)), x => x)
|
|
59106
59124
|
}
|
|
59107
59125
|
|
|
59108
59126
|
function getPrivilegeCMD (path, pri = '+x', relativePath = true) {
|
package/index.js
CHANGED
|
@@ -69,6 +69,14 @@ program.command('enable-resource-track').action(enableResourceTrack)
|
|
|
69
69
|
program.command('start-resource-track').action(startResourceTrack)
|
|
70
70
|
program.command('auto-send-mail').action(editIni)
|
|
71
71
|
program.command('auto-send-summary').action(autoSendSummaryLastMonth)
|
|
72
|
+
program.command('set-do-not-send-zbon-when-print-true').
|
|
73
|
+
action(editConfigIni(setConfig('Email', 'DoNotSendZbonWhenPrint', true)))
|
|
74
|
+
program.command('set-do-not-send-zbon-when-print-false').
|
|
75
|
+
action(editConfigIni(setConfig('Email', 'DoNotSendZbonWhenPrint', false)))
|
|
76
|
+
program.command('set-auto-send-3in1-today-true').
|
|
77
|
+
action(editConfigIni(setConfig('Email', 'AutoSend3in1Today', true)))
|
|
78
|
+
program.command('set-auto-send-3in1-today-false').
|
|
79
|
+
action(editConfigIni(setConfig('Email', 'AutoSend3in1Today', false)))
|
|
72
80
|
|
|
73
81
|
if (program.debug) {
|
|
74
82
|
debugInfo()
|
|
@@ -692,18 +700,13 @@ function editIni () {
|
|
|
692
700
|
cli.executeInShell([
|
|
693
701
|
'sudo chmod 777 /var/www/html/Resource/config/config.ini',
|
|
694
702
|
'aaden-cli fix-cronjob',
|
|
695
|
-
],program.debug)
|
|
696
|
-
const ini = require("ini")
|
|
697
|
-
const filePath = '/var/www/html/Resource/config/config.ini'
|
|
698
|
-
const info = ini.parse(fs.readFileSync(filePath, 'utf-8'))
|
|
699
|
-
console.log(info)
|
|
700
|
-
if(!info.Email) {
|
|
701
|
-
info.Email = {}
|
|
702
|
-
}
|
|
703
|
-
info.Email.AutoSend3in1LastMonth = true
|
|
704
|
-
|
|
705
|
-
fs.writeFileSync(filePath, ini.stringify(info))
|
|
703
|
+
], program.debug)
|
|
706
704
|
|
|
705
|
+
editConfigIni(composeMany([
|
|
706
|
+
setConfig('Email', 'AutoSend3in1LastMonth', true),
|
|
707
|
+
setConfig('Email', 'DoNotSendZbonWhenPrint', true),
|
|
708
|
+
setConfig('Email', 'AutoSend3in1Today', false),
|
|
709
|
+
]))()
|
|
707
710
|
}
|
|
708
711
|
|
|
709
712
|
function autoSendSummaryLastMonth () {
|
|
@@ -711,17 +714,32 @@ function autoSendSummaryLastMonth () {
|
|
|
711
714
|
'sudo chmod 777 /var/www/html/Resource/config/config.ini',
|
|
712
715
|
'aaden-cli fix-cronjob',
|
|
713
716
|
], program.debug)
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
717
|
+
|
|
718
|
+
editConfigIni(setConfig('Email', 'AutoSendSummaryLastMonth', true))()
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
function editConfigIni (f) {
|
|
722
|
+
return () => {
|
|
723
|
+
const ini = require('ini')
|
|
724
|
+
const filePath = '/var/www/html/Resource/config/config.ini'
|
|
725
|
+
const info = ini.parse(fs.readFileSync(filePath, 'utf-8'))
|
|
726
|
+
f(info)
|
|
727
|
+
fs.writeFileSync(filePath, ini.stringify(info))
|
|
720
728
|
}
|
|
721
|
-
|
|
729
|
+
}
|
|
722
730
|
|
|
723
|
-
|
|
731
|
+
function setConfig (section, key, value) {
|
|
732
|
+
return file => {
|
|
733
|
+
if (!file[section]) {
|
|
734
|
+
file[section] = {}
|
|
735
|
+
}
|
|
736
|
+
file[section][key] = value
|
|
737
|
+
return file
|
|
738
|
+
}
|
|
739
|
+
}
|
|
724
740
|
|
|
741
|
+
function composeMany (fs) {
|
|
742
|
+
return fs.reduce((f, g) => x => g(f(x)), x => x)
|
|
725
743
|
}
|
|
726
744
|
|
|
727
745
|
function getPrivilegeCMD (path, pri = '+x', relativePath = true) {
|