feat: arduino-cli升级到v1.2.2
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
"libraries": [
|
||||
"./arduino-cli/libraries"
|
||||
],
|
||||
"cache": "./arduino-cli/cache",
|
||||
"config": "./arduino-cli/arduino-cli.json"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10,7 +10,7 @@ import * as tar from 'tar';
|
||||
import shell from 'shelljs';
|
||||
|
||||
|
||||
const version = '0.35.2';
|
||||
const version = '1.2.2';
|
||||
|
||||
|
||||
function getPlatformTarget() {
|
||||
|
||||
@@ -16,7 +16,6 @@ export default class ShellArduino extends Shell {
|
||||
'compile',
|
||||
'-b', arduino.key,
|
||||
'--config-file', `"${arduino.path.config}"`,
|
||||
'--build-cache-path', `"${arduino.path.cache}"`,
|
||||
'--verbose',
|
||||
'--libraries', `"${arduino.path.libraries.join('","')}"`,
|
||||
'--build-path', `"${arduino.path.build}"`,
|
||||
@@ -36,7 +35,6 @@ export default class ShellArduino extends Shell {
|
||||
'-p', arduino.port,
|
||||
'-b', arduino.key,
|
||||
'--config-file', `"${arduino.path.config}"`,
|
||||
'--build-cache-path', `"${arduino.path.cache}"`,
|
||||
'--verbose',
|
||||
'--libraries', `"${arduino.path.libraries.join('","')}"`,
|
||||
'--build-path', `"${arduino.path.build}"`,
|
||||
|
||||
@@ -26,9 +26,11 @@ export function getDefaultHosts() {
|
||||
}
|
||||
|
||||
function generateCertificate() {
|
||||
const workingPath = process.cwd();
|
||||
fsExtra.ensureDirSync(CERTS_PATH);
|
||||
shell.cd(CERTS_PATH);
|
||||
shell.exec(`mkcert -key-file server.key -cert-file server.crt ${getDefaultHosts().join(' ')}`);
|
||||
shell.cd(workingPath);
|
||||
console.log('new certificate generated successfully!');
|
||||
const certPem = fsExtra.readFileSync(path.resolve(CERTS_PATH, 'server.crt'));
|
||||
const keyPem = fsExtra.readFileSync(path.resolve(CERTS_PATH, 'server.key'));
|
||||
|
||||
Reference in New Issue
Block a user