chore(mobile): add runtime canary import from @chat-app/shared

This commit is contained in:
byGalax
2026-05-13 23:35:17 +02:00
parent bb7aeec345
commit b4457b74f5
+14
View File
@@ -0,0 +1,14 @@
// Runtime canary import from @chat-app/shared. Phase 0's only goal here
// is to prove that Metro can resolve the workspace package and that
// nothing in shared/crypto pulls in an RN-incompatible module path.
//
// `import type` would be erased by the TypeScript compiler before
// reaching Metro, so we deliberately import a runtime symbol —
// `crypto.setCryptoBackend` — and stash it in an exported reference.
// We never call it here; Phase 1's real adapter does that after
// constructing a CryptoBackend wrapping react-native-libsodium.
//
// This file is deleted in Phase 1 once the real adapter lands.
import { crypto } from '@chat-app/shared';
export const sharedSmoke = { register: crypto.setCryptoBackend };