From b4457b74f5022c3c2987556318926a21516aaa84 Mon Sep 17 00:00:00 2001 From: byGalax Date: Wed, 13 May 2026 23:35:17 +0200 Subject: [PATCH] chore(mobile): add runtime canary import from @chat-app/shared --- apps/mobile/lib/sharedSmoke.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 apps/mobile/lib/sharedSmoke.ts diff --git a/apps/mobile/lib/sharedSmoke.ts b/apps/mobile/lib/sharedSmoke.ts new file mode 100644 index 0000000..c736362 --- /dev/null +++ b/apps/mobile/lib/sharedSmoke.ts @@ -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 };