Repository navigation
feat(libs-data-access): load devices from certified devices json - #264
Merged
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Dashboard の Device Repository が、ローカルの
apps/web/public/devices.jsonではなくchirimen-certified-devicesのgenerated/devices.jsonを runtime で取得するようにしました。取得結果は #254 の Adapter で既存 UI Model へ変換し、上位層は Certified JSON の構造に依存しません。Type of change
Related issues
What changed?
InjectionTokenとして定義したJsonDeviceRepositoryが raw.githubusercontent.com から JSON を取得し、version 検証後に Adapter へ渡すようにしたdevices: []は成功として空配列を返すshareReplayを維持するAPI / Compatibility
CERTIFIED_DEVICES_JSON_URL/DEFAULT_CERTIFIED_DEVICES_JSON_URL/CERTIFIED_DEVICES_FETCH_TIMEOUT_MSを export。provideDeviceRepository()の戻り値をProviderからProvider[]に変更。取得失敗時は空配列ではなく Observable error になるprovideDeviceRepository()のままで動作する。runtime のデータソースは Certified Devices JSON になるため、Device ID 互換は [Feature]: Device ID と既存 URL の互換性を整理する #256 で扱うHow to test
pnpm nx test libs-data-accesspnpm nx serve webで一覧を開き、GitHub 上の Certified Devices JSON からデバイスが表示されることを確認する/devices/ADS1015など Certified 側の id で詳細が表示され、loading が止まっていることを確認するEnvironment (if relevant)
Checklist
Made with Cursor