Releasing 0.25.77 (#968)

Squash commits
This commit is contained in:
vorotamoroz
2026-06-19 17:45:37 +09:00
committed by GitHub
parent c6c4044f3c
commit 62f44e38c0
453 changed files with 29917 additions and 727 deletions
+1 -1
View File
@@ -1101,7 +1101,7 @@ export class ConfigSync extends LiveSyncCommands {
this._log(`Config ${data.displayName || data.name} has been applied`, LOG_LEVEL_NOTICE);
if (data.category == "PLUGIN_DATA" || data.category == "PLUGIN_MAIN") {
//@ts-ignore
const manifests = Object.values(this.app.plugins.manifests) as any as PluginManifest[];
const manifests = Object.values(this.app.plugins.manifests) as unknown as PluginManifest[];
//@ts-ignore
const enabledPlugins = this.app.plugins.enabledPlugins as Set<string>;
const pluginManifest = manifests.find(
@@ -1225,7 +1225,7 @@ Offline Changed files: ${files.length}`;
this.queuedNotificationFiles.clear();
try {
//@ts-ignore
const manifests = Object.values(this.app.plugins.manifests) as any as PluginManifest[];
const manifests = Object.values(this.app.plugins.manifests) as unknown as PluginManifest[];
//@ts-ignore
const enabledPlugins = this.app.plugins.enabledPlugins as Set<string>;
const enabledPluginManifests = manifests.filter((e) => enabledPlugins.has(e.id));
+8 -8
View File
@@ -11,7 +11,7 @@ import {
import type ObsidianLiveSyncPlugin from "@/main.ts";
import { MARK_DONE } from "@/modules/features/ModuleLog.ts";
import type { LiveSyncCore } from "@/main.ts";
import { __$checkInstanceBinding } from "@lib/dev/checks.ts";
// import { __$checkInstanceBinding } from "@lib/dev/checks.ts";
import { createInstanceLogFunction } from "@lib/services/lib/logUtils.ts";
let noticeIndex = 0;
@@ -50,7 +50,7 @@ export abstract class LiveSyncCommands {
this.core = core;
this.onBindFunction(this.core, this.core.services);
this._log = createInstanceLogFunction(this.constructor.name, this.services.API);
__$checkInstanceBinding(this);
// __$checkInstanceBinding(this);
}
abstract onunload(): void;
abstract onload(): void | Promise<void>;
@@ -67,24 +67,24 @@ export abstract class LiveSyncCommands {
_log: ReturnType<typeof createInstanceLogFunction>;
_verbose = (msg: any, key?: string) => {
_verbose = (msg: unknown, key?: string) => {
this._log(msg, LOG_LEVEL_VERBOSE, key);
};
_info = (msg: any, key?: string) => {
_info = (msg: unknown, key?: string) => {
this._log(msg, LOG_LEVEL_INFO, key);
};
_notice = (msg: any, key?: string) => {
_notice = (msg: unknown, key?: string) => {
this._log(msg, LOG_LEVEL_NOTICE, key);
};
_progress = (prefix: string = "", level: LOG_LEVEL = LOG_LEVEL_NOTICE) => {
const key = `keepalive-progress-${noticeIndex++}`;
return {
log: (msg: any) => {
log: (msg: string) => {
this._log(prefix + msg, level, key);
},
once: (msg: any) => {
once: (msg: string) => {
this._log(prefix + msg, level);
},
done: (msg: string = "Done") => {
@@ -93,7 +93,7 @@ export abstract class LiveSyncCommands {
};
};
_debug = (msg: any, key?: string) => {
_debug = (msg: unknown, key?: string) => {
this._log(msg, LOG_LEVEL_VERBOSE, key);
};
@@ -17,6 +17,7 @@ import { arrayToChunkedArray } from "octagonal-wheels/collection";
import { EVENT_ANALYSE_DB_USAGE, EVENT_REQUEST_PERFORM_GC_V3, eventHub } from "@/common/events";
import type { LiveSyncCouchDBReplicator } from "@lib/replication/couchdb/LiveSyncReplicator";
import { delay } from "@lib/common/utils";
import { isNotFoundError } from "@lib/common/utils.doc";
// import { _requestToCouchDB } from "@/common/utils";
const DB_KEY_SEQ = "gc-seq";
const DB_KEY_CHUNK_SET = "chunk-set";
@@ -394,7 +395,7 @@ Note: **Make sure to synchronise all devices before deletion.**
}
}
} catch (ex) {
if ((ex as any)?.status == 404) {
if (isNotFoundError(ex)) {
this._log(`No revisions found for ${doc._id}`, LOG_LEVEL_VERBOSE);
} else {
this._log(`Error finding revisions for ${doc._id}`);
@@ -474,14 +475,14 @@ Are you ready to delete unused chunks?`;
include_docs: true,
});
for (const chunk of deleteChunks.rows) {
if ((chunk as any)?.value?.deleted) {
if ((chunk as { value?: { deleted?: boolean } })?.value?.deleted) {
chunkSet.delete(chunk.key as DocumentID);
}
}
const deleteDocs = deleteChunks.rows
.filter((e) => "doc" in e)
.map((e) => ({
...(e as any).doc!,
...(e as { doc?: EntryLeaf }).doc!,
_deleted: true,
}));
@@ -490,7 +491,7 @@ Are you ready to delete unused chunks?`;
let successCount = 0;
let errored = 0;
for (const batch of deleteChunkBatch) {
const results = await this.database.bulkDocs(batch as EntryLeaf[]);
const results = await this.database.bulkDocs(batch);
for (const result of results) {
if ("ok" in result) {
chunkSet.delete(result.id as DocumentID);
@@ -698,7 +699,7 @@ Success: ${successCount}, Errored: ${errored}`;
sharedChunkCount: 0,
uniqueChunkSize: orphanChunkSize,
sharedChunkSize: 0,
} as any);
} as const);
const csvSrc = result.map((e) => {
return [
@@ -737,7 +738,7 @@ Success: ${successCount}, Errored: ${errored}`;
});
// Probably no need to wait, but just in case.
let timeout = 2 * 60 * 1000; // 2 minutes
do {
for (;;) {
const status = await remote.db.info();
if ("compact_running" in status && status?.compact_running) {
this._notice("Compaction in progress on remote database...", "gc-compact");
@@ -750,7 +751,7 @@ Success: ${successCount}, Errored: ${errored}`;
} else {
break;
}
} while (true);
}
if (compactResult && "ok" in compactResult) {
this._notice("Compaction on remote database completed successfully.", "gc-compact");
} else {