feat(youtube): add YouTube browser window and Whisper subtitle source (#273)

This commit is contained in:
2026-09-28 20:35:47 -07:00
committed by GitHub
parent c68b73c8c1
commit 07b32626a6
101 changed files with 2269 additions and 726 deletions
+11 -1
View File
@@ -1,7 +1,8 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import path from 'node:path';
import { resolveDefaultLogFilePath, setLogRotation } from './logger';
import { EventEmitter } from 'node:events';
import { ignoreClosedPipeErrors, resolveDefaultLogFilePath, setLogRotation } from './logger';
import { localDateKey } from './shared/log-files';
test('resolveDefaultLogFilePath uses APPDATA on windows', () => {
@@ -56,3 +57,12 @@ test('setLogRotation accepts numeric retention days', () => {
}
}
});
test('ignoreClosedPipeErrors swallows broken-pipe errors but rethrows others', () => {
const stream = new EventEmitter();
ignoreClosedPipeErrors(stream);
const closedPipe = Object.assign(new Error('write EPIPE'), { code: 'EPIPE' });
assert.doesNotThrow(() => stream.emit('error', closedPipe));
const other = Object.assign(new Error('boom'), { code: 'EACCES' });
assert.throws(() => stream.emit('error', other), /boom/);
});