-
Notifications
You must be signed in to change notification settings - Fork 0
Remove HCE (Host Card Emulation) support #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: yuki-js <[email protected]>
|
https://github.com/AokiApp/jsapdu/actions/runs/20437064318/job/58725569099?pr=19 |
I've investigated the CI failures locally. Unfortunately, I cannot fully reproduce the exact build environment (npm ci requires network access to install dependencies which isn't available in this sandbox environment). However, I've verified that: The build failures are likely due to one of:
Without access to the full CI logs, I recommend:
Would you be able to share the specific error output from the failing jobs? |
|
@copilot いいえ、あなたにはfull network accessを許可している筈ですよ。エラーメッセージにも認証エラーと書いてありますよね。認証さえ通せば… |
Co-authored-by: yuki-js <[email protected]>
ご指摘ありがとうございます。CIワークフローがGitHub Package Registryの認証設定を欠いていることが原因でした。 修正内容 (commit f059de3):
これで |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR completely removes Host Card Emulation (HCE) support from the jsapdu library, as the decision was made that HCE and Reader Mode have fundamentally different characteristics and should not coexist in the same library.
- Removed the
EmulatedCardabstract class and all HCE-related methods from the core interface - Eliminated
supportsHceproperty andstartHceSession()method across all implementations (pcsc, rn) - Updated CI workflows to properly authenticate with GitHub Package Registry
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/interface/src/abstracts.ts | Removed EmulatedCard class definition, supportsHce property from SmartCardDeviceInfo, startHceSession() method from SmartCardDevice, and updated card property type |
| packages/pcsc/src/device.ts | Removed EmulatedCard import and startHceSession() method implementation |
| packages/pcsc/src/device-info.ts | Removed supportsHce getter from PcscDeviceInfo class |
| packages/pcsc/README.md | Removed supportsHce from API documentation |
| packages/pcsc/tests/pcsc-test.ts | Removed supportsHce console log from test output |
| packages/rn/src/device/rn-smart-card-device.ts | Removed EmulatedCard import and startHceSession() method implementation |
| packages/rn/src/device/rn-device-info.ts | Removed supportsHce property and related documentation from RnDeviceInfo class |
| packages/rn/src/JsapduRn.nitro.ts | Removed supportsHce field from DeviceInfo interface |
| packages/rn/src/platform/rn-smart-card-platform.ts | Removed comment reference to supportsHce in documentation |
| packages/rn/android/src/main/java/app/aoki/jsapdu/rn/omapi/OmapiPlatformHelper.kt | Removed supportsHce = false field assignment |
| packages/rn/android/src/main/java/app/aoki/jsapdu/rn/nfc/NfcPlatformHelper.kt | Removed supportsHce = false field assignment |
| packages/rn/README.md | Removed HCE documentation including Android manifest requirement and API reference |
| packages/interface/README.md | Removed supportsHce from example code |
| examples/rn/src/screens/SmartCardTestScreen.tsx | Removed supportsHce from device info logging |
| examples/rn/README.md | Removed android.hardware.nfc.hce feature requirement from Android manifest section |
| .npmrc | Removed inline auth token configuration (now handled in CI workflows) |
| .github/workflows/ci.yml | Added permissions and authentication configuration for GitHub Package Registry |
| .github/workflows/rn-android-build.yml | Added permissions and authentication configuration for both jobs |
| package-lock.json | Updated package versions and dependency resolution (including @aokiapp/tlv update) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Plan to Remove HCE (Host Card Emulation) Support
EmulatedCardabstract class from packages/interface/src/abstracts.tssupportsHceproperty fromSmartCardDeviceInfoabstract classstartHceSession()method fromSmartCardDeviceabstract classEmulatedCardfrom import/export statements in packages/interfacesupportsHceproperty from PcscDeviceInfostartHceSession()method from PcscDeviceEmulatedCardimportsupportsHcefrom TypeScript interface definitionsstartHceSession()method from RnSmartCardDevicesupportsHceproperty from RnDeviceInfoOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.