From 20a473d868854c6d7a228eb3ac0c22e42842b276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com> Date: Thu, 8 May 2025 23:45:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20arduino-cli=E5=8D=87=E7=BA=A7=E5=88=B0v?= =?UTF-8?q?1.2.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.json | 1 - scripts/arduino-install.js | 2 +- src/common/shell-arduino.js | 2 -- src/common/utils.js | 2 ++ 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/config.json b/config.json index f857c3a..ab8471b 100644 --- a/config.json +++ b/config.json @@ -7,7 +7,6 @@ "libraries": [ "./arduino-cli/libraries" ], - "cache": "./arduino-cli/cache", "config": "./arduino-cli/arduino-cli.json" } }, diff --git a/scripts/arduino-install.js b/scripts/arduino-install.js index de56124..b89c306 100644 --- a/scripts/arduino-install.js +++ b/scripts/arduino-install.js @@ -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() { diff --git a/src/common/shell-arduino.js b/src/common/shell-arduino.js index e08b7cf..be01aa3 100644 --- a/src/common/shell-arduino.js +++ b/src/common/shell-arduino.js @@ -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}"`, diff --git a/src/common/utils.js b/src/common/utils.js index 77606f5..00dbc3e 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -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'));