arduino-mcp-server 0.2.2 → 0.2.5
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/build/boardReference.js +14 -0
- package/build/index.js +922 -60
- package/build/portCoordinator.js +46 -0
- package/build/safety.js +204 -0
- package/build/serialSessions.js +385 -0
- package/package.json +2 -2
package/build/boardReference.js
CHANGED
|
@@ -3,6 +3,20 @@ const store = boardReferenceData;
|
|
|
3
3
|
export function listBoardReferences() {
|
|
4
4
|
return store.boards;
|
|
5
5
|
}
|
|
6
|
+
export function getBoardReferenceById(id) {
|
|
7
|
+
const normalized = id.trim().toLowerCase();
|
|
8
|
+
if (!normalized) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
return store.boards.find((board) => board.id.toLowerCase() === normalized) ?? null;
|
|
12
|
+
}
|
|
13
|
+
export function findBoardReferenceByFqbn(fqbn) {
|
|
14
|
+
const normalized = fqbn.trim().toLowerCase();
|
|
15
|
+
if (!normalized) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
return (store.boards.find((board) => board.fqbnCandidates.some((candidate) => candidate.toLowerCase() === normalized)) ?? null);
|
|
19
|
+
}
|
|
6
20
|
export function findBoardReference(query) {
|
|
7
21
|
const normalized = query.trim().toLowerCase();
|
|
8
22
|
if (!normalized) {
|