@azure/core-process package

クラス

ProcessError

プロセスの解決や実行中にエラーが発生しました。

キャプチャされた出力は列挙不可能であるため、通常のログやシリアライズで誤って露出することはありません。

インターフェイス

ExecFileOptions

execFileのオプション。

ExecFileOptionsWithBufferEncoding

execFileのバッファエンコーディングオプション。

ExecFileOptionsWithStringEncoding

execFileの文字列エンコーディングオプション。

ExecFileResult

execFileからのバッファリング出力。

ProcessErrorOptions

ProcessErrorの構造化された詳細。

ProcessOptions

安全なプロセス運用が共有する選択肢。

ResolveExecutableOptions

実行ファイルを解決する際に使われるオプション。

SpawnOptions

スポーンの選択肢。

SpawnSyncOptions

spawnSyncのオプション。

SpawnSyncOptionsWithBufferEncoding

spawnSyncのバッファエンコーディングオプション。

SpawnSyncOptionsWithStringEncoding

spawnSyncの文字列エンコーディングオプション。

関数

execFile(string, readonly string[])

プロセスを完了まで実行し、その出力をバッファリングします。

execFile(string, (readonly string[]) | undefined, ExecFileOptionsWithBufferEncoding)

プロセスを完了まで実行し、その出力をバッファリングします。

execFile(string, (readonly string[]) | undefined, ExecFileOptionsWithStringEncoding)

プロセスを完了まで実行し、その出力をバッファリングします。

execFile(string, readonly string[], ExecFileOptions)

プロセスを完了まで実行し、その出力をバッファリングします。

isProcessError(unknown)

未知の値が ProcessErrorかどうかをチェックします。

resolveExecutable(string, ResolveExecutableOptions)

明示的な作業ディレクトリと環境を使って実行ファイルを解決します。

spawn(string, readonly string[], SpawnOptions)

環境のオペレーティングシステムシェルを使わずにプロセスを開始します。

spawnSync(string, (readonly string[]) | undefined, SpawnSyncOptionsWithStringEncoding)

周囲のオペレーティングシステムシェルを使わずに同期的にプロセスを開始します。

spawnSync(string, readonly string[], SpawnSyncOptionsWithBufferEncoding)

周囲のオペレーティングシステムシェルを使わずに同期的にプロセスを開始します。

spawnSync(string, (readonly string[]) | undefined, SpawnSyncOptions)

周囲のオペレーティングシステムシェルを使わずに同期的にプロセスを開始します。

関数の詳細

execFile(string, readonly string[])

プロセスを完了まで実行し、その出力をバッファリングします。

function execFile(command: string, args?: readonly string[]): Promise<ExecFileResult<string>>

パラメーター

command

string

実行ファイル名またはパス。

args

readonly string[]

実行ファイルに引数が渡されます。

返品

Promise<ExecFileResult<string>>

バッファされた標準出力と標準誤差。

execFile(string, (readonly string[]) | undefined, ExecFileOptionsWithBufferEncoding)

プロセスを完了まで実行し、その出力をバッファリングします。

function execFile(command: string, args: (readonly string[]) | undefined, options: ExecFileOptionsWithBufferEncoding): Promise<ExecFileResult<Buffer>>

パラメーター

command

string

実行ファイル名またはパス。

args

(readonly string[]) | undefined

実行ファイルに引数が渡されます。

options
ExecFileOptionsWithBufferEncoding

プロセスの選択肢。

返品

Promise<ExecFileResult<Buffer>>

バッファされた標準出力と標準誤差。

execFile(string, (readonly string[]) | undefined, ExecFileOptionsWithStringEncoding)

プロセスを完了まで実行し、その出力をバッファリングします。

function execFile(command: string, args: (readonly string[]) | undefined, options: ExecFileOptionsWithStringEncoding): Promise<ExecFileResult<string>>

パラメーター

command

string

実行ファイル名またはパス。

args

(readonly string[]) | undefined

実行ファイルに引数が渡されます。

options
ExecFileOptionsWithStringEncoding

プロセスの選択肢。

返品

Promise<ExecFileResult<string>>

バッファされた標準出力と標準誤差。

execFile(string, readonly string[], ExecFileOptions)

プロセスを完了まで実行し、その出力をバッファリングします。

function execFile(command: string, args?: readonly string[], options?: ExecFileOptions): Promise<ExecFileResult<string | Buffer>>

パラメーター

command

string

実行ファイル名またはパス。

args

readonly string[]

実行ファイルに引数が渡されます。

options
ExecFileOptions

プロセスの選択肢。

返品

Promise<ExecFileResult<string | Buffer>>

バッファされた標準出力と標準誤差。

isProcessError(unknown)

未知の値が ProcessErrorかどうかをチェックします。

function isProcessError(error: unknown): error is ProcessError

パラメーター

error

unknown

チェックする値。

返品

error is ProcessError

値がプロセスエラーかどうか。

resolveExecutable(string, ResolveExecutableOptions)

明示的な作業ディレクトリと環境を使って実行ファイルを解決します。

function resolveExecutable(command: string, options?: ResolveExecutableOptions): string | undefined

パラメーター

command

string

実行ファイル名またはパス。 議論を含んではいけません。

options
ResolveExecutableOptions

解決方法の選択肢。

返品

string | undefined

絶対実行可能パス、またはサポートファイルが見つからない場合は undefined 。

spawn(string, readonly string[], SpawnOptions)

環境のオペレーティングシステムシェルを使わずにプロセスを開始します。

function spawn(command: string, args?: readonly string[], options?: SpawnOptions): ChildProcess

パラメーター

command

string

実行ファイル名またはパス。

args

readonly string[]

実行ファイルに引数が渡されます。

options
SpawnOptions

プロセスの選択肢。

返品

ChildProcess

子どもが始まったプロセス。

spawnSync(string, (readonly string[]) | undefined, SpawnSyncOptionsWithStringEncoding)

周囲のオペレーティングシステムシェルを使わずに同期的にプロセスを開始します。

function spawnSync(command: string, args: (readonly string[]) | undefined, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>

パラメーター

command

string

実行ファイル名またはパス。

args

(readonly string[]) | undefined

実行ファイルに引数が渡されます。

options
SpawnSyncOptionsWithStringEncoding

プロセスの選択肢。

返品

SpawnSyncReturns<string>

同期プロセスの結果です。

spawnSync(string, readonly string[], SpawnSyncOptionsWithBufferEncoding)

周囲のオペレーティングシステムシェルを使わずに同期的にプロセスを開始します。

function spawnSync(command: string, args?: readonly string[], options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>

パラメーター

command

string

実行ファイル名またはパス。

args

readonly string[]

実行ファイルに引数が渡されます。

options
SpawnSyncOptionsWithBufferEncoding

プロセスの選択肢。

返品

SpawnSyncReturns<Buffer>

同期プロセスの結果です。

spawnSync(string, (readonly string[]) | undefined, SpawnSyncOptions)

周囲のオペレーティングシステムシェルを使わずに同期的にプロセスを開始します。

function spawnSync(command: string, args: (readonly string[]) | undefined, options: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>

パラメーター

command

string

実行ファイル名またはパス。

args

(readonly string[]) | undefined

実行ファイルに引数が渡されます。

options
SpawnSyncOptions

プロセスの選択肢。

返品

SpawnSyncReturns<string | Buffer>

同期プロセスの結果です。