@doubling/compound-sync 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/sync.js +7 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doubling/compound-sync",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Bidirectional sync between Compound and local markdown files",
5
5
  "type": "module",
6
6
  "bin": "./sync.js",
package/sync.js CHANGED
@@ -244,6 +244,13 @@ async function setupConfig() {
244
244
  const authResult = await browserAuth(fbConfig);
245
245
  const app = initializeApp(fbConfig, 'setup');
246
246
  const auth = getAuth(app);
247
+
248
+ // Initialize App Check before re-authenticating in Node.js
249
+ const appCheckUrl = appCheckEndpoints[projectId];
250
+ if (appCheckUrl && authResult.firebaseIdToken) {
251
+ await initAppCheckWithIdToken(app, appCheckUrl, authResult.firebaseIdToken);
252
+ }
253
+
247
254
  const db = getFirestore(app);
248
255
 
249
256
  let userCredential;