aaden-cli 1.1.98 → 1.1.102
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/ngrok/ngrok +0 -0
- package/dist/index.js +38 -1
- package/index.js +37 -0
- package/package.json +1 -1
package/AadenDeploy/ngrok/ngrok
CHANGED
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -18248,7 +18248,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.19.2","description":"P
|
|
|
18248
18248
|
/***/ ((module) => {
|
|
18249
18249
|
|
|
18250
18250
|
"use strict";
|
|
18251
|
-
module.exports = {"i8":"1.1.
|
|
18251
|
+
module.exports = {"i8":"1.1.101"};
|
|
18252
18252
|
|
|
18253
18253
|
/***/ }),
|
|
18254
18254
|
|
|
@@ -18463,6 +18463,9 @@ program.command('full-update').action(fullUpdate)
|
|
|
18463
18463
|
program.command('return-terminal').action(returnTerminal)
|
|
18464
18464
|
program.command('db').action(enterDatabase)
|
|
18465
18465
|
program.command('printer-test').action(testPrinter)
|
|
18466
|
+
program.command('enable-mile-pay').action(enableMilePay)
|
|
18467
|
+
program.command('start-mile-pay').action(startService)
|
|
18468
|
+
|
|
18466
18469
|
if (program.debug) {
|
|
18467
18470
|
debugInfo()
|
|
18468
18471
|
console.log(process.argv)
|
|
@@ -18946,6 +18949,40 @@ async function removeAllData () {
|
|
|
18946
18949
|
cli.executeInShell(command, program.debug)
|
|
18947
18950
|
}
|
|
18948
18951
|
|
|
18952
|
+
async function enableMilePay () {
|
|
18953
|
+
cli.executeInShell([
|
|
18954
|
+
'cd /home/aaden',
|
|
18955
|
+
'sudo mkdir biomace',
|
|
18956
|
+
'cd biomace',
|
|
18957
|
+
'wget https://innerken.com/biomace/biomace.sh',
|
|
18958
|
+
'wget https://innerken.com/biomace/logback-spring-biomace.xml',
|
|
18959
|
+
'wget https://innerken.com/biomace/application.yml',
|
|
18960
|
+
'wget https://innerken.com/biomace/biomace-0.0.1-SNAPSHOT.jar',
|
|
18961
|
+
'wget https://innerken.com/biomace/mile-pay-pay-method.sql',
|
|
18962
|
+
'sudo mkdir log',
|
|
18963
|
+
'cd /etc/systemd/system',
|
|
18964
|
+
'wget https://innerken.com/biomace/biomace.service',
|
|
18965
|
+
'aaden-cli start-mile-pay',
|
|
18966
|
+
], program.debug)
|
|
18967
|
+
}
|
|
18968
|
+
|
|
18969
|
+
async function startService(){
|
|
18970
|
+
const deviceId = getMyDeviceId()
|
|
18971
|
+
if (deviceId === -1) return
|
|
18972
|
+
const filePath = '/home/aaden/biomace/application.yml'
|
|
18973
|
+
const res = fs.readFileSync(filePath) ?? ''
|
|
18974
|
+
const out = res.replace('identifier: IK0001', 'identifier: ' + deviceId)
|
|
18975
|
+
fs.writeFileSync(filePath, out)
|
|
18976
|
+
|
|
18977
|
+
cli.executeInShell([
|
|
18978
|
+
'sudo systemctl start biomace.service',
|
|
18979
|
+
'sudo systemctl enable biomace.service',
|
|
18980
|
+
'sudo service biomace start',
|
|
18981
|
+
'echo "请输入数据库密码(和开机密码,sudo密码相同)"',
|
|
18982
|
+
'mysql -uaaden -Daaden -p < /home/aaden/biomace/mile-pay-pay-method.sql',
|
|
18983
|
+
], program.debug)
|
|
18984
|
+
}
|
|
18985
|
+
|
|
18949
18986
|
function returnTerminal () {
|
|
18950
18987
|
|
|
18951
18988
|
}
|
package/index.js
CHANGED
|
@@ -51,6 +51,9 @@ program.command('full-update').action(fullUpdate)
|
|
|
51
51
|
program.command('return-terminal').action(returnTerminal)
|
|
52
52
|
program.command('db').action(enterDatabase)
|
|
53
53
|
program.command('printer-test').action(testPrinter)
|
|
54
|
+
program.command('enable-mile-pay').action(enableMilePay)
|
|
55
|
+
program.command('start-mile-pay').action(startService)
|
|
56
|
+
|
|
54
57
|
if (program.debug) {
|
|
55
58
|
debugInfo()
|
|
56
59
|
console.log(process.argv)
|
|
@@ -534,6 +537,40 @@ async function removeAllData () {
|
|
|
534
537
|
cli.executeInShell(command, program.debug)
|
|
535
538
|
}
|
|
536
539
|
|
|
540
|
+
async function enableMilePay () {
|
|
541
|
+
cli.executeInShell([
|
|
542
|
+
'cd /home/aaden',
|
|
543
|
+
'sudo mkdir biomace',
|
|
544
|
+
'cd biomace',
|
|
545
|
+
'wget https://innerken.com/biomace/biomace.sh',
|
|
546
|
+
'wget https://innerken.com/biomace/logback-spring-biomace.xml',
|
|
547
|
+
'wget https://innerken.com/biomace/application.yml',
|
|
548
|
+
'wget https://innerken.com/biomace/biomace-0.0.1-SNAPSHOT.jar',
|
|
549
|
+
'wget https://innerken.com/biomace/mile-pay-pay-method.sql',
|
|
550
|
+
'sudo mkdir log',
|
|
551
|
+
'cd /etc/systemd/system',
|
|
552
|
+
'wget https://innerken.com/biomace/biomace.service',
|
|
553
|
+
'aaden-cli start-mile-pay',
|
|
554
|
+
], program.debug)
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
async function startService(){
|
|
558
|
+
const deviceId = getMyDeviceId()
|
|
559
|
+
if (deviceId === -1) return
|
|
560
|
+
const filePath = '/home/aaden/biomace/application.yml'
|
|
561
|
+
const res = fs.readFileSync(filePath) ?? ''
|
|
562
|
+
const out = res.replace('identifier: IK0001', 'identifier: ' + deviceId)
|
|
563
|
+
fs.writeFileSync(filePath, out)
|
|
564
|
+
|
|
565
|
+
cli.executeInShell([
|
|
566
|
+
'sudo systemctl start biomace.service',
|
|
567
|
+
'sudo systemctl enable biomace.service',
|
|
568
|
+
'sudo service biomace start',
|
|
569
|
+
'echo "请输入数据库密码(和开机密码,sudo密码相同)"',
|
|
570
|
+
'mysql -uaaden -Daaden -p < /home/aaden/biomace/mile-pay-pay-method.sql',
|
|
571
|
+
], program.debug)
|
|
572
|
+
}
|
|
573
|
+
|
|
537
574
|
function returnTerminal () {
|
|
538
575
|
|
|
539
576
|
}
|