chore: 更新arduino-cli版本 (version: 1.3.1)

This commit is contained in:
王立帮
2025-10-04 10:33:41 +08:00
parent 4528544827
commit 1ca644bfa1
35 changed files with 6468 additions and 6454 deletions

0
src/common/boards.js Normal file → Executable file
View File

0
src/common/config.js Normal file → Executable file
View File

0
src/common/debug.js Normal file → Executable file
View File

0
src/common/events-base.js Normal file → Executable file
View File

0
src/common/events.js Normal file → Executable file
View File

0
src/common/id-generator.js Normal file → Executable file
View File

0
src/common/mstring.js Normal file → Executable file
View File

0
src/common/registry.js Normal file → Executable file
View File

0
src/common/serial.js Normal file → Executable file
View File

0
src/common/shell-ampy.js Normal file → Executable file
View File

2
src/common/shell-arduino.js Normal file → Executable file
View File

@@ -19,6 +19,7 @@ export default class ShellArduino extends Shell {
'--verbose',
'--libraries', `"${arduino.path.libraries.join('","')}"`,
'--build-path', `"${arduino.path.build}"`,
'--output-dir', `"${arduino.path.output}"`,
`"${arduino.path.code}"`,
'--no-color'
].join(' ');
@@ -38,6 +39,7 @@ export default class ShellArduino extends Shell {
'--verbose',
'--libraries', `"${arduino.path.libraries.join('","')}"`,
'--build-path', `"${arduino.path.build}"`,
'--output-dir', `"${arduino.path.output}"`,
`"${arduino.path.code}"`,
'--no-color'
].join(' ');

0
src/common/shell-micropython.js Normal file → Executable file
View File

0
src/common/shell.js Normal file → Executable file
View File

20
src/common/socket.js Normal file → Executable file
View File

@@ -78,11 +78,14 @@ export default class Socket {
const shell = this.#shellArduino_.getItem(socket.id);
config.path = config?.path ?? {};
config.path.build = path.resolve(TEMP_PATH, socket.id, 'build');
config.path.output = path.resolve(TEMP_PATH, socket.id, 'output');
config.path.code = path.resolve(TEMP_PATH, socket.id, 'testArduino/testArduino.ino');
let [error1,] = await to(fsExtra.ensureDir(config.path.build));
error1 && Debug.error(error1);
let [error2,] = await to(fsExtra.outputFile(config.path.code, config.code));
let [error2,] = await to(fsExtra.ensureDir(config.path.output));
error2 && Debug.error(error2);
let [error3,] = await to(fsExtra.outputFile(config.path.code, config.code));
error3 && Debug.error(error3);
const [error, result] = await to(shell.compile(config));
if (error) {
Debug.error(error);
@@ -100,11 +103,14 @@ export default class Socket {
const shell = this.#shellArduino_.getItem(socket.id);
config.path = config?.path ?? {};
config.path.build = path.resolve(TEMP_PATH, socket.id, 'build');
config.path.output = path.resolve(TEMP_PATH, socket.id, 'output');
config.path.code = path.resolve(TEMP_PATH, socket.id, 'testArduino/testArduino.ino');
let [error1,] = await to(fsExtra.ensureDir(config.path.build));
error1 && Debug.error(error1);
let [error2,] = await to(fsExtra.outputFile(config.path.code, config.code));
let [error2,] = await to(fsExtra.ensureDir(config.path.output));
error2 && Debug.error(error2);
let [error3,] = await to(fsExtra.outputFile(config.path.code, config.code));
error3 && Debug.error(error3);
const [error, result] = await to(shell.compile(config));
if (error) {
Debug.error(error);
@@ -219,11 +225,14 @@ export default class Socket {
const shell = this.#shellArduino_.getItem(socket.id);
config.path = config?.path ?? {};
config.path.build = path.resolve(TEMP_PATH, socket.id, 'build');
config.path.output = path.resolve(TEMP_PATH, socket.id, 'output');
config.path.code = path.resolve(TEMP_PATH, socket.id, 'testArduino/testArduino.ino');
let [error1,] = await to(fsExtra.ensureDir(config.path.build));
error1 && Debug.error(error1);
let [error2,] = await to(fsExtra.outputFile(config.path.code, config.code));
let [error2,] = await to(fsExtra.ensureDir(config.path.output));
error2 && Debug.error(error2);
let [error3,] = await to(fsExtra.outputFile(config.path.code, config.code));
error3 && Debug.error(error3);
const [error, result] = await to(shell.compile(config));
error && Debug.error(error);
callback([error, result]);
@@ -233,11 +242,14 @@ export default class Socket {
config.path = config?.path ?? {};
const shell = this.#shellArduino_.getItem(socket.id);
config.path.build = path.resolve(TEMP_PATH, socket.id, 'build');
config.path.output = path.resolve(TEMP_PATH, socket.id, 'output');
config.path.code = path.resolve(TEMP_PATH, socket.id, 'testArduino/testArduino.ino');
let [error1,] = await to(fsExtra.ensureDir(config.path.build));
error1 && Debug.error(error1);
let [error2,] = await to(fsExtra.outputFile(config.path.code, config.code));
let [error2,] = await to(fsExtra.ensureDir(config.path.output));
error2 && Debug.error(error2);
let [error3,] = await to(fsExtra.outputFile(config.path.code, config.code));
error3 && Debug.error(error3);
const [error, result] = await to(shell.upload(config));
error && Debug.error(error);
callback([error, result]);

0
src/common/utils.js Normal file → Executable file
View File

0
src/index.js Normal file → Executable file
View File