Skip to content

Commit

Permalink
refactor: rename ShellPipeReader to ShellPipeReaderKind to align …
Browse files Browse the repository at this point in the history
…with `ShellPipeWriterKind`.
  • Loading branch information
dsherret committed Jan 25, 2024
1 parent f799ad0 commit f52e207
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export { FsFileWrapper, PathRef } from "./src/path.ts";
export type { ExpandGlobOptions, PathSymlinkOptions, SymlinkOptions, WalkEntry, WalkOptions } from "./src/path.ts";
export { CommandBuilder, CommandChild, CommandResult, KillSignal, KillSignalController } from "./src/command.ts";
export type { CommandContext, CommandHandler, CommandPipeReader, CommandPipeWriter } from "./src/command_handler.ts";
export type { Closer, Reader, ShellPipeReader, ShellPipeWriterKind, WriterSync } from "./src/pipes.ts";
export type { Closer, Reader, ShellPipeReaderKind, ShellPipeWriterKind, WriterSync } from "./src/pipes.ts";
export type {
ConfirmOptions,
MultiSelectOption,
Expand Down
4 changes: 2 additions & 2 deletions src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
NullPipeWriter,
PipedBuffer,
Reader,
ShellPipeReader,
ShellPipeReaderKind,
ShellPipeWriter,
ShellPipeWriterKind,
WriterSync,
Expand Down Expand Up @@ -269,7 +269,7 @@ export class CommandBuilder implements PromiseLike<CommandResult> {
* For this reason, if you are setting stdin to something other than "inherit" or
* "null", then it's recommended to set this each time you spawn a command.
*/
stdin(reader: ShellPipeReader): CommandBuilder {
stdin(reader: ShellPipeReaderKind): CommandBuilder {
return this.#newWithState((state) => {
if (reader === "inherit" || reader === "null") {
state.stdin = reader;
Expand Down
2 changes: 1 addition & 1 deletion src/pipes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface Closer {
close(): void;
}

export type ShellPipeReader =
export type ShellPipeReaderKind =
| "inherit"
| "null"
| Reader
Expand Down
4 changes: 2 additions & 2 deletions src/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CommandContext, CommandHandler } from "./command_handler.ts";
import { getExecutableShebangFromPath, ShebangInfo } from "./common.ts";
import { DenoWhichRealEnvironment, fs, path, which } from "./deps.ts";
import { wasmInstance } from "./lib/mod.ts";
import { Reader, ShellPipeReader, ShellPipeWriter, ShellPipeWriterKind, WriterSync } from "./pipes.ts";
import { Reader, ShellPipeReaderKind, ShellPipeWriter, ShellPipeWriterKind, WriterSync } from "./pipes.ts";
import { EnvChange, ExecuteResult, getAbortedResult, resultFromCode } from "./result.ts";

export interface SequentialList {
Expand Down Expand Up @@ -722,7 +722,7 @@ async function executeCommandArgs(commandArgs: string[], context: Context): Prom
}
}

function getStdioStringValue(value: ShellPipeReader | ShellPipeWriterKind) {
function getStdioStringValue(value: ShellPipeReaderKind | ShellPipeWriterKind) {
if (value === "inheritPiped") {
return "piped";
} else if (value === "inherit" || value === "null" || value === "piped") {
Expand Down

0 comments on commit f52e207

Please sign in to comment.