Skip to content

Commit dcfe099

Browse files
committed
sync with ignore and reset
1 parent e75ae12 commit dcfe099

File tree

5 files changed

+8
-17
lines changed

5 files changed

+8
-17
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "mdfriday",
33
"name": "Friday",
4-
"version": "26.1.4",
4+
"version": "26.1.5",
55
"minAppVersion": "0.15.0",
66
"description": "Notes to Website. Friday helps you turn Markdown documents into websites in minutes.",
77
"author": "sunwei",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obsidian-friday-plugin",
3-
"version": "26.1.4",
3+
"version": "26.1.5",
44
"description": "Friday is an Obsidian plugin that empowers users to focus on content creation by writing Markdown files, while we handle the distribution. From creating websites to content deployment, Friday serves as a creative output assistant, helping users turn their work into publishable sites with ease.",
55
"main": "main.js",
66
"type": "module",

src/main.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export default class FridayPlugin extends Plugin {
226226
try {
227227
this.registerView(FRIDAY_SERVER_VIEW_TYPE, leaf => new ServerView(leaf, this));
228228
} catch (e) {
229-
console.log('[Friday] View already registered, skipping');
229+
console.error('[Friday] View already registered, skipping');
230230
}
231231
this.app.workspace.onLayoutReady(() => this.initLeaf());
232232

@@ -308,15 +308,12 @@ export default class FridayPlugin extends Plugin {
308308
}
309309
})
310310
);
311-
312-
console.log('[Friday] Desktop features loaded successfully');
313311
}
314312

315313
/**
316314
* Initialize mobile-only features
317315
*/
318316
private async initMobileFeatures(): Promise<void> {
319-
console.log('[Friday] Mobile mode: Sync-only features enabled');
320317
// Mobile currently only needs sync functionality
321318
// which is already handled by initializeSyncService()
322319
// Additional mobile-specific UI can be added here in the future
@@ -819,7 +816,6 @@ export default class FridayPlugin extends Plugin {
819816
async refreshLicenseUsage() {
820817
// Check if dependencies are initialized
821818
if (!this.user || !this.hugoverse) {
822-
console.log('[Friday] Skipping usage refresh: dependencies not initialized yet');
823819
return;
824820
}
825821

@@ -852,7 +848,7 @@ export default class FridayPlugin extends Plugin {
852848
}
853849
} catch (error) {
854850
// If failed, try to re-login with license key (token might be expired)
855-
console.log('[Friday] Failed to fetch usage, attempting to refresh token...');
851+
console.error('[Friday] Failed to fetch usage, attempting to refresh token...');
856852

857853
try {
858854
// Re-login with license key
@@ -861,7 +857,6 @@ export default class FridayPlugin extends Plugin {
861857
const newToken = await this.user.loginWithCredentials(email, password);
862858

863859
if (newToken) {
864-
console.log('[Friday] Token refreshed successfully, retrying usage fetch...');
865860
// Retry with new token
866861
const usageResponse = await hugoverse.getLicenseUsage(newToken, license.key);
867862
if (usageResponse && usageResponse.disks) {
@@ -993,8 +988,6 @@ export default class FridayPlugin extends Plugin {
993988
// Example: "_pouch_ob-d12-livesync-v2"
994989
const SuffixDatabaseName = "-livesync-v2";
995990
const indexedDBName = `_pouch_${vaultName}${SuffixDatabaseName}`;
996-
997-
console.log(`[Friday] Clearing IndexedDB: ${indexedDBName}`);
998991

999992
// Step 1: Clear localStorage items with "friday-kv-" prefix
1000993
// These contain sync-related data like PBKDF2 salt cache
@@ -1005,7 +998,6 @@ export default class FridayPlugin extends Plugin {
1005998
const deleteRequest = indexedDB.deleteDatabase(indexedDBName);
1006999

10071000
deleteRequest.onsuccess = () => {
1008-
console.log(`[Friday] Successfully deleted IndexedDB: ${indexedDBName}`);
10091001
resolve();
10101002
};
10111003

@@ -1045,10 +1037,8 @@ export default class FridayPlugin extends Plugin {
10451037
// Remove found keys
10461038
keysToRemove.forEach(key => {
10471039
localStorage.removeItem(key);
1048-
console.log(`[Friday] Removed localStorage: ${key}`);
10491040
});
10501041

1051-
console.log(`[Friday] Cleared ${keysToRemove.length} sync-related localStorage items`);
10521042
} catch (error) {
10531043
console.warn('[Friday] Error clearing sync localStorage:', error);
10541044
}

src/sync/FridaySyncCore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,15 +647,15 @@ export class FridaySyncCore implements LiveSyncLocalDBEnv, LiveSyncCouchDBReplic
647647
try {
648648
await this._replicator.tryResetRemoteDatabase(this._settings);
649649
} catch (error) {
650-
console.log("Reset remote database error (may be expected if DB doesn't exist):", error);
650+
console.error("Reset remote database error (may be expected if DB doesn't exist):", error);
651651
}
652652

653653
// Step 3: Create remote database (in case it was destroyed)
654654
Logger("Step 3: Creating remote database...", LOG_LEVEL_INFO);
655655
try {
656656
await this._replicator.tryCreateRemoteDatabase(this._settings);
657657
} catch (error) {
658-
console.log("Create remote database error:", error);
658+
console.error("Create remote database error:", error);
659659
}
660660

661661
// Small delay to ensure database is ready

versions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
"26.1.1": "0.15.0",
1313
"26.1.2": "0.15.0",
1414
"26.1.3": "0.15.0",
15-
"26.1.4": "0.15.0"
15+
"26.1.4": "0.15.0",
16+
"26.1.5": "0.15.0"
1617
}

0 commit comments

Comments
 (0)