inital commit

This commit is contained in:
Brandon4466
2025-04-08 14:15:57 -07:00
commit 292ae841f6
936 changed files with 361034 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
// @flow
import type {
WriterType,
} from '../types';
const createBlockingWriter = (stream: stream$Writable): WriterType => {
return {
write: (message: string) => {
stream.write(message + '\n');
},
};
};
export default (): WriterType => {
// eslint-disable-next-line no-process-env
const targetStream = (process.env.ROARR_STREAM || 'STDOUT').toUpperCase();
const stream = targetStream.toUpperCase() === 'STDOUT' ? process.stdout : process.stderr;
return createBlockingWriter(stream);
};