mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-06-26 16:13:57 +00:00
559c3f351b
- Introduced unit tests for the replicateResultProcessor, covering various scenarios including document enqueuing, snapshot handling, and processing of non-document changes. - Refactored replicator to utilize a logging function from the host API instead of a global logger, enhancing log management. - Updated mismatchedTweaksResolver to include logging through the host API, ensuring consistent logging practices across the application. - Adjusted tests to mock the new logging behavior and verify log outputs.
25 lines
1.0 KiB
JavaScript
25 lines
1.0 KiB
JavaScript
import { execSync } from "node:child_process";
|
|
import fs from "node:fs";
|
|
try {
|
|
fs.rmSync("./_types", { recursive: true, force: true });
|
|
fs.mkdirSync("./_types");
|
|
console.log("[Postbuild] Generating type definitions for fallback...");
|
|
execSync("npx tsc -p tsconfig.types.json", { stdio: "inherit" });
|
|
|
|
console.log("[Postbuild] Type definitions generated successfully.");
|
|
} catch (error) {
|
|
// Ignore compiler errors from tsc so that pre-existing type errors in the submodule
|
|
// do not block the build from succeeding.
|
|
console.warn("[Postbuild] Type definitions generated with some compilation warnings.");
|
|
// process.exit(-1);
|
|
}
|
|
|
|
try {
|
|
console.log("[Postbuild] Type definitions generated successfully. Adding ignore comments...");
|
|
execSync("deno run -A ./utilsdeno/types-add-ignore.ts", { stdio: "inherit" });
|
|
console.log("[Postbuild] Ignore comments added successfully.");
|
|
} catch (error) {
|
|
console.warn("[Postbuild] Failed to add ignore comments to type definitions.");
|
|
process.exit(-1);
|
|
}
|