M2 (C): storage barrel re-export, App.js imports swapped

- src/storage/index.js: re-exports Firebase SDK
- App.js: imports from ./storage (was firebase/* direct)
- STORAGE=firebase = identical behavior
- dev server compiles clean

Safe refactor proof. Next: per-call-site path-based rewrite for ws adapter.
This commit is contained in:
david raistrick
2026-06-28 17:51:39 -04:00
parent 2ee2bba93b
commit 12b24eb707
4 changed files with 384 additions and 3 deletions
+13
View File
@@ -0,0 +1,13 @@
// src/storage/index.js — barrel re-export of Firebase SDK.
// Phase C: App.js swaps imports from 'firebase/*' to here.
// STORAGE=firebase = identical behavior. Zero risk.
// Later: factory picks impl based on REACT_APP_STORAGE env.
export { initializeApp } from 'firebase/app';
export {
getAuth, signInAnonymously, onAuthStateChanged, signInWithCustomToken,
} from 'firebase/auth';
export {
getFirestore, doc, setDoc, getDoc, getDocs, addDoc, collection,
onSnapshot, updateDoc, deleteDoc, query, orderBy, limit, writeBatch,
} from 'firebase/firestore';