@azure/core-process package
Klassen
| ProcessError |
Een fout die wordt opgeroepen tijdens het oplossen of uitvoeren van een proces. De vastgelegde output is niet opsombaar, dus gewone logging en serialisatie maken deze niet per ongeluk bloot. |
Interfaces
| ExecFileOptions |
Opties voor execFile. |
| ExecFileOptionsWithBufferEncoding |
Buffer-encodingopties voor execFile. |
| ExecFileOptionsWithStringEncoding |
Opties voor string-encoding voor execFile. |
| ExecFileResult |
Gebufferde output van execFile. |
| ProcessErrorOptions |
Gestructureerde details voor een ProcessError. |
| ProcessOptions |
Opties gedeeld door veilige procesoperaties. |
| ResolveExecutableOptions |
Opties die worden gebruikt bij het oplossen van een uitvoerbaar bestand. |
| SpawnOptions |
Opties voor spawn. |
| SpawnSyncOptions |
Opties voor spawnSync. |
| SpawnSyncOptionsWithBufferEncoding |
Buffer-encoderingsopties voor spawnSync. |
| SpawnSyncOptionsWithStringEncoding |
Opties voor string-encoding voor spawnSync. |
Functies
| exec |
Voert een proces volledig uit en buffert de uitvoer ervan. |
| exec |
Voert een proces volledig uit en buffert de uitvoer ervan. |
| exec |
Voert een proces volledig uit en buffert de uitvoer ervan. |
| exec |
Voert een proces volledig uit en buffert de uitvoer ervan. |
| is |
Controleert of een onbekende waarde een ProcessError is. |
| resolve |
Lost een uitvoerbaar bestand op met behulp van een expliciete werkmap en omgeving. |
| spawn(string, readonly string[], Spawn |
Start een proces zonder gebruik te maken van een ambient besturingssysteem-shell. |
| spawn |
Start een proces synchroon zonder gebruik te maken van een omgevings-besturingssysteemshell. |
| spawn |
Start een proces synchroon zonder gebruik te maken van een omgevings-besturingssysteemshell. |
| spawn |
Start een proces synchroon zonder gebruik te maken van een omgevings-besturingssysteemshell. |
Functiedetails
execFile(string, readonly string[])
Voert een proces volledig uit en buffert de uitvoer ervan.
function execFile(command: string, args?: readonly string[]): Promise<ExecFileResult<string>>
Parameters
- command
-
string
De uitvoerbare naam of het pad.
- args
-
readonly string[]
Argumenten worden doorgegeven aan het uitvoerbare bestand.
Retouren
Promise<ExecFileResult<string>>
Gebufferde standaardoutput en standaardfout.
execFile(string, undefined | (readonly string[]), ExecFileOptionsWithBufferEncoding)
Voert een proces volledig uit en buffert de uitvoer ervan.
function execFile(command: string, args: undefined | (readonly string[]), options: ExecFileOptionsWithBufferEncoding): Promise<ExecFileResult<Buffer>>
Parameters
- command
-
string
De uitvoerbare naam of het pad.
- args
-
undefined | (readonly string[])
Argumenten worden doorgegeven aan het uitvoerbare bestand.
Procesopties.
Retouren
Promise<ExecFileResult<Buffer>>
Gebufferde standaardoutput en standaardfout.
execFile(string, undefined | (readonly string[]), ExecFileOptionsWithStringEncoding)
Voert een proces volledig uit en buffert de uitvoer ervan.
function execFile(command: string, args: undefined | (readonly string[]), options: ExecFileOptionsWithStringEncoding): Promise<ExecFileResult<string>>
Parameters
- command
-
string
De uitvoerbare naam of het pad.
- args
-
undefined | (readonly string[])
Argumenten worden doorgegeven aan het uitvoerbare bestand.
Procesopties.
Retouren
Promise<ExecFileResult<string>>
Gebufferde standaardoutput en standaardfout.
execFile(string, readonly string[], ExecFileOptions)
Voert een proces volledig uit en buffert de uitvoer ervan.
function execFile(command: string, args?: readonly string[], options?: ExecFileOptions): Promise<ExecFileResult<string | Buffer>>
Parameters
- command
-
string
De uitvoerbare naam of het pad.
- args
-
readonly string[]
Argumenten worden doorgegeven aan het uitvoerbare bestand.
- options
- ExecFileOptions
Procesopties.
Retouren
Promise<ExecFileResult<string | Buffer>>
Gebufferde standaardoutput en standaardfout.
isProcessError(unknown)
Controleert of een onbekende waarde een ProcessError is.
function isProcessError(error: unknown): error
Parameters
- error
-
unknown
De waarde die moet worden gecontroleerd.
Retouren
error
Of de waarde een procesfout is.
resolveExecutable(string, ResolveExecutableOptions)
Lost een uitvoerbaar bestand op met behulp van een expliciete werkmap en omgeving.
function resolveExecutable(command: string, options?: ResolveExecutableOptions): string | undefined
Parameters
- command
-
string
De uitvoerbare naam of het pad. Het mag geen argumenten bevatten.
- options
- ResolveExecutableOptions
Oplossingsopties.
Retouren
string | undefined
Het absolute uitvoerbare pad, of undefined wanneer er geen ondersteund bestand wordt gevonden.
spawn(string, readonly string[], SpawnOptions)
Start een proces zonder gebruik te maken van een ambient besturingssysteem-shell.
function spawn(command: string, args?: readonly string[], options?: SpawnOptions): childProcess.ChildProcess
Parameters
- command
-
string
De uitvoerbare naam of het pad.
- args
-
readonly string[]
Argumenten worden doorgegeven aan het uitvoerbare bestand.
- options
- SpawnOptions
Procesopties.
Retouren
Het proces van het gestarte kind.
spawnSync(string, undefined | (readonly string[]), SpawnSyncOptionsWithStringEncoding)
Start een proces synchroon zonder gebruik te maken van een omgevings-besturingssysteemshell.
function spawnSync(command: string, args: undefined | (readonly string[]), options: SpawnSyncOptionsWithStringEncoding): childProcess.SpawnSyncReturns<string>
Parameters
- command
-
string
De uitvoerbare naam of het pad.
- args
-
undefined | (readonly string[])
Argumenten worden doorgegeven aan het uitvoerbare bestand.
Procesopties.
Retouren
childProcess.SpawnSyncReturns<string>
Het synchroonproces resulteert.
spawnSync(string, readonly string[], SpawnSyncOptionsWithBufferEncoding)
Start een proces synchroon zonder gebruik te maken van een omgevings-besturingssysteemshell.
function spawnSync(command: string, args?: readonly string[], options?: SpawnSyncOptionsWithBufferEncoding): childProcess.SpawnSyncReturns<Buffer>
Parameters
- command
-
string
De uitvoerbare naam of het pad.
- args
-
readonly string[]
Argumenten worden doorgegeven aan het uitvoerbare bestand.
Procesopties.
Retouren
childProcess.SpawnSyncReturns<Buffer>
Het synchroonproces resulteert.
spawnSync(string, undefined | (readonly string[]), SpawnSyncOptions)
Start een proces synchroon zonder gebruik te maken van een omgevings-besturingssysteemshell.
function spawnSync(command: string, args: undefined | (readonly string[]), options: SpawnSyncOptions): childProcess.SpawnSyncReturns<string | Buffer>
Parameters
- command
-
string
De uitvoerbare naam of het pad.
- args
-
undefined | (readonly string[])
Argumenten worden doorgegeven aan het uitvoerbare bestand.
- options
- SpawnSyncOptions
Procesopties.
Retouren
childProcess.SpawnSyncReturns<string | Buffer>
Het synchroonproces resulteert.