@jadejr/kysely-pglite
Version:
Kysely dialect for @electric-sql/pglite (temporary fork https://github.com/dnlsandiego/kysely-pglite)
20 lines • 682 B
JavaScript
const originalLog = console.log;
const originalWarn = console.warn;
// Patching console.log and console.warn because of noisy logs from @electic/pglite
// https://github.com/electric-sql/pglite/issues/256
export function applyLogsPatch() {
console.log = function (args) {
if (typeof args === 'string' &&
args.includes('Running in main thread, faking onCustomMessage')) {
return;
}
originalLog(args);
};
console.warn = function (args) {
if (typeof args === 'string' && args.includes('prerun(C-node)')) {
return;
}
originalWarn(args);
};
}
//# sourceMappingURL=apply-logs-patch.js.map