Skip to content
Myr

Split `input`/`inputFile` options to their own file (#629)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by ehmicky · committed by GitHub · parent 1afeb81 · Browse files · 5 files+61 added−67 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

5 files+61 added−67 removed

  • other:+61 added−67 removed

5 files+61 added−67 removed

modified:lib/stdio/async.js+1 added-1 removed
added:lib/stdio/handle.js+55 added
modified:lib/stdio/input.js+2 added-64 removed
modified:lib/stdio/sync.js+1 added-1 removed
modified:lib/stdio/type.js+2 added-1 removed
27 unmodified lines
28export const isRegularUrl = stdioOption => isUrlInstance(stdioOption) && !hasFileProtocol(stdioOption);2930const stringIsFilePath = stdioOption => stdioOption.startsWith('.') || isAbsolute(stdioOption);31const isFilePath = stdioOption => typeof stdioOption === 'string' && stringIsFilePath(stdioOption);32export const isUnknownStdioString = stdioOption => typeof stdioOption === 'string' && !stringIsFilePath(stdioOption) && !KNOWN_STDIO_STRINGS.has(stdioOption);3233export const isUnknownStdioString = (type, stdioOption) => type === 'native' && typeof stdioOption === 'string' && !KNOWN_STDIO_STRINGS.has(stdioOption);34const KNOWN_STDIO_STRINGS = new Set(['ipc', 'ignore', 'inherit', 'overlapped', 'pipe']);3536const isReadableStream = stdioOption => Object.prototype.toString.call(stdioOption) === '[object ReadableStream]';37const isWritableStream = stdioOption => Object.prototype.toString.call(stdioOption) === '[object WritableStream]';
15 unmodified lines