feat: MicrobitMore拡張機能のファームウェア更新機能の実装 #525
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Microbit拡張機能と同様に、MicrobitMore拡張機能でもファームウェア(.hexファイル)を自動的にダウンロードし、接続トラブル時に「周辺機器を更新 (Update Peripheral)」できるようにする機能を実装しました。
変更内容
scripts/prepublish.mjs: ビルド時に MicrobitMore の Hex をダウンロードし、URLファイルを生成する処理を追加。src/lib/microbit-more-update.js: MicrobitMore 専用の更新ロジックを実装。V2専用のHexであることを考慮し、V1デバイス検出時はエラーを表示するようにしました。src/containers/connection-modal.jsx:microbitMore拡張機能においてファームウェア更新UIを有効化し、適切な更新関数を呼び出すように修正。.gitignore: ダウンロードされた MicrobitMore の Hex を除外対象に追加。動作確認
node scripts/prepublish.mjsを実行し、正しくHexがダウンロードされ、src/generated/以下にファイルが生成されることを確認しました。