feat: add Bun polyfills and refactor LiteMCP implementation
- Introduced polyfills for Node.js compatibility in Bun runtime - Moved LiteMCP implementation to a dedicated module - Updated package.json to include @digital-alchemy/hass dependency - Refactored import for LiteMCP to use local module path
This commit is contained in:
9
src/polyfills.js
Normal file
9
src/polyfills.js
Normal file
@@ -0,0 +1,9 @@
|
||||
// Add necessary polyfills for Node.js compatibility in Bun
|
||||
import { webcrypto } from 'node:crypto';
|
||||
|
||||
// Polyfill for crypto.subtle in Bun
|
||||
if (!globalThis.crypto?.subtle) {
|
||||
globalThis.crypto = webcrypto;
|
||||
}
|
||||
|
||||
// Add any other necessary polyfills here
|
||||
Reference in New Issue
Block a user