mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
Update external process shapes from v1 to v2
This commit is contained in:
+17
-3
@@ -1,7 +1,17 @@
|
||||
export interface ExternalProcessRequestType {
|
||||
path: string;
|
||||
arguments: string;
|
||||
listener: LaunchExternalProcessListener;
|
||||
path?: string;
|
||||
alias?: string;
|
||||
arguments?: string;
|
||||
listener?: LaunchExternalProcessListener;
|
||||
lifetime?: string;
|
||||
certificate?: CertificationInfo;
|
||||
}
|
||||
export interface CertificationInfo {
|
||||
serial?: string;
|
||||
subject?: string;
|
||||
publickey?: string;
|
||||
thumbprint?: string;
|
||||
trusted?: boolean;
|
||||
}
|
||||
export interface ExitCode {
|
||||
topic: string;
|
||||
@@ -20,3 +30,7 @@ export interface ExternalConnection {
|
||||
token: string;
|
||||
uuid: string;
|
||||
}
|
||||
export interface ExternalProcessInfo {
|
||||
pid: number;
|
||||
listener?: LaunchExternalProcessListener;
|
||||
}
|
||||
|
||||
+3
-3
@@ -12,7 +12,7 @@ import { RVMInfo } from './rvm';
|
||||
import { RuntimeInfo } from './runtime-info';
|
||||
import { Entity, EntityInfo } from './entity';
|
||||
import { HostSpecs } from './host-specs';
|
||||
import { ExternalProcessRequestType, TerminateExternalRequestType, ExternalConnection } from './external-process';
|
||||
import { ExternalProcessRequestType, TerminateExternalRequestType, ExternalConnection, ExternalProcessInfo } from './external-process';
|
||||
import Transport from '../../transport/transport';
|
||||
import { CookieInfo, CookieOption } from './cookie';
|
||||
import { RegistryInfo } from './registry-info';
|
||||
@@ -454,11 +454,11 @@ export default class System extends EmitterBase<SystemEvents> {
|
||||
launchExternalProcess(options: ExternalProcessRequestType): Promise<Identity>;
|
||||
/**
|
||||
* Monitors a running process.
|
||||
* @param { number } pid See tutorial for more details
|
||||
* @param { ExternalProcessInfo } options See tutorial for more details
|
||||
* @return {Promise.<Identity>}
|
||||
* @tutorial System.monitorExternalProcess
|
||||
*/
|
||||
monitorExternalProcess(pid: number): Promise<Identity>;
|
||||
monitorExternalProcess(options: ExternalProcessInfo): Promise<Identity>;
|
||||
/**
|
||||
* Writes the passed message into both the log file and the console.
|
||||
* @param { string } level The log level for the entry. Can be either "info", "warning" or "error"
|
||||
|
||||
Vendored
+2
-75
@@ -34,6 +34,7 @@ import { CookieInfo, CookieOption } from './_v2/api/system/cookie';
|
||||
import { AppAssetInfo, AppAssetRequest, RuntimeDownloadOptions, RuntimeDownloadProgress } from './_v2/api/system/download-asset';
|
||||
import { DownloadPreloadInfo, DownloadPreloadOption } from './_v2/api/system/download-preload';
|
||||
import { EntityInfo } from './_v2/api/system/entity';
|
||||
import { ExternalProcessRequestType, ExternalProcessInfo } from './_v2/api/system/external-process';
|
||||
import { HostSpecs } from './_v2/api/system/host-specs';
|
||||
import { LogInfo } from './_v2/api/system/log';
|
||||
import { MonitorInfo } from './_v2/api/system/monitor';
|
||||
@@ -584,7 +585,7 @@ declare namespace fin {
|
||||
/**
|
||||
* Runs an executable or batch file.
|
||||
*/
|
||||
launchExternalProcess(options: ExternalProcessLaunchInfo, callback?: (payload: { uuid: string }) => void, errorCallback?: (reason: string) => void): void;
|
||||
launchExternalProcess(options: ExternalProcessRequestType, callback?: (payload: { uuid: string }) => void, errorCallback?: (reason: string) => void): void;
|
||||
/**
|
||||
* Writes the passed message into both the log file and the console.
|
||||
*/
|
||||
@@ -657,80 +658,6 @@ declare namespace fin {
|
||||
updateProxySettings(type: string, address: string, port: number, callback?: () => void, errorCallback?: (reason: string) => void): void;
|
||||
}
|
||||
|
||||
interface ExternalProcessLaunchInfo {
|
||||
path?: string;
|
||||
/**
|
||||
* Additionally note that the executable found in the zip file specified in appAssets
|
||||
* will default to the one mentioned by appAssets.target
|
||||
* If the the path below refers to a specific path it will override this default
|
||||
*/
|
||||
alias?: string;
|
||||
/**
|
||||
* When using alias; if no arguments are passed then the arguments (if any)
|
||||
* are taken from the 'app.json' file, from the 'args' parameter
|
||||
* of the 'appAssets' Object with the relevant 'alias'.
|
||||
* If 'arguments' is passed as a parameter it takes precedence
|
||||
* over any 'args' set in the 'app.json'.
|
||||
*/
|
||||
arguments?: string;
|
||||
listener?(result: {
|
||||
/**
|
||||
* "Exited" Or "released" on a call to releaseExternalProcess
|
||||
*/
|
||||
topic?: string;
|
||||
/**
|
||||
* The mapped UUID which identifies the launched process
|
||||
*/
|
||||
uuid?: string;
|
||||
/*
|
||||
* Process exit code
|
||||
*/
|
||||
exitCode?: number;
|
||||
}): void;
|
||||
certificate?: CertificationInfo;
|
||||
}
|
||||
|
||||
interface CertificationInfo {
|
||||
/**
|
||||
* A hex string with or without spaces
|
||||
*/
|
||||
serial?: string;
|
||||
/**
|
||||
* An internally tokenized and comma delimited string allowing partial or full checks of the subject fields
|
||||
*/
|
||||
subject?: string;
|
||||
/**
|
||||
* A hex string with or without spaces
|
||||
*/
|
||||
publickey?: string;
|
||||
/**
|
||||
* A hex string with or without spaces
|
||||
*/
|
||||
thumbprint?: string;
|
||||
/**
|
||||
* A boolean indicating that the certificate is trusted and not revoked
|
||||
*/
|
||||
trusted?: boolean;
|
||||
}
|
||||
|
||||
interface ExternalProcessInfo {
|
||||
pid?: number;
|
||||
listener?(result: {
|
||||
/**
|
||||
* "Exited" Or "released" on a call to releaseExternalProcess
|
||||
*/
|
||||
topic?: string;
|
||||
/**
|
||||
* The mapped UUID which identifies the launched process
|
||||
*/
|
||||
uuid?: string;
|
||||
/*
|
||||
* Process exit code
|
||||
*/
|
||||
exitCode?: number;
|
||||
}): void;
|
||||
}
|
||||
|
||||
interface OpenFinWindowStatic {
|
||||
/**
|
||||
* Class: Window
|
||||
|
||||
Reference in New Issue
Block a user