mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-11-02 18:19:44 +00:00
Fix EAS local builds and resolve require cycles
- Add dotenv-cli for EAS local builds to load env vars - Break circular dependencies in store/hooks imports - Add env var validation with clear error messages - Remove hardcoded Sentry auth token from sentry.properties - Add .ipa files to .gitignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bb2ce5a6a6
commit
58209b94ef
19 files changed
+458
-114
No files matched your search
@@ -14,6 +14,8 @@ import { useEncryptionKeys } from './useEncryptionKeys';
|
||||
import { getCachedSignedUrl, getStoragePath } from '../lib/imageCache';
|
||||
import { supabase } from '../lib/supabase';
|
||||
import { reencryptPendingMessages } from '../lib/encryption/reencryptPendingMessages';
|
||||
// Import shared cache from mediaCache to avoid circular dependency
|
||||
import { decryptedMediaCache, clearDecryptedMediaCache } from '../lib/mediaCache';
|
||||
|
||||
export type DecryptedMediaErrorCode =
|
||||
| 'E2EE_NOT_SUPPORTED'
|
||||
@@ -22,8 +24,8 @@ export type DecryptedMediaErrorCode =
|
||||
| 'E2EE_PENDING_RECIPIENT_KEY'
|
||||
| 'E2EE_DECRYPT_FAILED';
|
||||
|
||||
// In-memory cache to avoid re-decrypting the same media
|
||||
const decryptedMediaCache = new Map<string, string>();
|
||||
// Re-export clearDecryptedMediaCache for backwards compatibility
|
||||
export { clearDecryptedMediaCache };
|
||||
|
||||
interface DecryptedMediaState {
|
||||
/** Local file URI to the decrypted media (or null if not ready) */
|
||||
@@ -396,13 +398,3 @@ export function useDecryptedMedia({
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the decrypted media cache
|
||||
* Call this when logging out or when memory is low
|
||||
*/
|
||||
export async function clearDecryptedMediaCache(): Promise<void> {
|
||||
for (const uri of decryptedMediaCache.values()) {
|
||||
await cleanupDecryptedMedia(uri);
|
||||
}
|
||||
decryptedMediaCache.clear();
|
||||
}
|
||||
Reference in new issue
Block a user