fix(shared): drop .js extensions from relative imports for Metro
packages/shared/src/index.ts and all sub-modules used .js extensions on relative imports (e.g. './admin/index.js') pointing at .ts source files. TypeScript with moduleResolution: "Bundler" doesn't need them, and Metro's eager exporter (used for preview / production builds) reads them literally and fails — only the dev-server Metro fell back to .ts. Workspace typecheck remains 8/8 green; Vite and TS Bundler resolution already accept both styles, so desktop is unaffected.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { getCryptoBackend } from './backend.js';
|
||||
import { getCryptoBackend } from './backend';
|
||||
|
||||
// Authenticated encryption using XSalsa20-Poly1305 + X25519 (Curve25519).
|
||||
// Delegates to the active CryptoBackend (libsodium on desktop, libsodium-rn
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export * from './backend.js';
|
||||
export * from './box.js';
|
||||
export * from './keys.js';
|
||||
export * from './sessionKeys.js';
|
||||
export * from './backend';
|
||||
export * from './box';
|
||||
export * from './keys';
|
||||
export * from './sessionKeys';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getCryptoBackend } from './backend.js';
|
||||
import { getCryptoBackend } from './backend';
|
||||
|
||||
export interface X25519KeyPair {
|
||||
publicKey: Uint8Array; // 32 bytes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getCryptoBackend } from './backend.js';
|
||||
import { decryptFrom, encryptFor, type EncryptedEnvelope } from './box.js';
|
||||
import { getCryptoBackend } from './backend';
|
||||
import { decryptFrom, encryptFor, type EncryptedEnvelope } from './box';
|
||||
|
||||
// Sender-Key (Signal-style) helpers — one symmetric XSalsa20-Poly1305 key per
|
||||
// Sender-Key (Signal-style) helpers — one symmetric XSalsa20-Poly1305 key per
|
||||
// conversation, wrapped with `crypto_box` for each recipient device's pubkey.
|
||||
//
|
||||
// Flow:
|
||||
|
||||
Reference in New Issue
Block a user