@node-red/editor-client 2.0.4 → 2.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/locales/en-US/editor.json +37 -7
  2. package/locales/ko/editor.json +1 -1
  3. package/package.json +2 -2
  4. package/public/red/about +109 -0
  5. package/public/red/images/node-red-256.svg +1 -0
  6. package/public/red/keymap.json +13 -2
  7. package/public/red/red.js +6122 -3663
  8. package/public/red/red.min.js +1 -1
  9. package/public/red/style.min.css +2 -2
  10. package/public/red/tours/first-flow.js +80 -0
  11. package/public/red/tours/welcome.js +135 -0
  12. package/public/tours/first-flow.js +82 -0
  13. package/public/types/node/assert.d.ts +127 -0
  14. package/public/types/node/async_hooks.d.ts +229 -0
  15. package/public/types/node/buffer.d.ts +25 -1
  16. package/public/types/node/child_process.d.ts +514 -6
  17. package/public/types/node/cluster.d.ts +265 -0
  18. package/public/types/node/console.d.ts +136 -1
  19. package/public/types/node/crypto.d.ts +1189 -1
  20. package/public/types/node/dgram.d.ts +144 -1
  21. package/public/types/node/dns.d.ts +383 -10
  22. package/public/types/node/domain.d.ts +27 -1
  23. package/public/types/node/events.d.ts +81 -1
  24. package/public/types/node/fs.d.ts +2273 -1
  25. package/public/types/node/globals.d.ts +616 -1
  26. package/public/types/node/http.d.ts +489 -1
  27. package/public/types/node/http2.d.ts +961 -0
  28. package/public/types/node/https.d.ts +142 -0
  29. package/public/types/node/module.d.ts +55 -0
  30. package/public/types/node/net.d.ts +296 -1
  31. package/public/types/node/os.d.ts +242 -1
  32. package/public/types/node/path.d.ts +156 -1
  33. package/public/types/node/perf_hooks.d.ts +274 -0
  34. package/public/types/node/process.d.ts +412 -1
  35. package/public/types/node/querystring.d.ts +31 -1
  36. package/public/types/node/readline.d.ts +173 -0
  37. package/public/types/node/stream.d.ts +358 -0
  38. package/public/types/node/string_decoder.d.ts +10 -0
  39. package/public/types/node/timers.d.ts +19 -0
  40. package/public/types/node/tls.d.ts +783 -0
  41. package/public/types/node/trace_events.d.ts +64 -0
  42. package/public/types/node/tty.d.ts +69 -0
  43. package/public/types/node/url.d.ts +119 -1
  44. package/public/types/node/util.d.ts +210 -0
  45. package/public/types/node/v8.d.ts +190 -0
  46. package/public/types/node/vm.d.ts +155 -0
  47. package/public/types/node/wasi.d.ts +89 -0
  48. package/public/types/node/worker_threads.d.ts +241 -0
  49. package/public/types/node/zlib.d.ts +364 -0
  50. package/public/types/node-red/func.d.ts +1 -1
  51. package/public/types/node-red/util.d.ts +1 -1
  52. package/public/vendor/ace/worker-jsonata.js +1 -1
  53. package/public/vendor/monaco/dist/ThirdPartyNotices.txt +192 -192
  54. package/public/vendor/monaco/dist/css.worker.js +1 -1
  55. package/public/vendor/monaco/dist/editor.js +2 -2
  56. package/public/vendor/monaco/dist/editor.worker.js +1 -1
  57. package/public/vendor/monaco/dist/html.worker.js +1 -1
  58. package/public/vendor/monaco/dist/json.worker.js +1 -1
  59. package/public/vendor/monaco/dist/locale/cs.js +44 -10
  60. package/public/vendor/monaco/dist/locale/de.js +46 -12
  61. package/public/vendor/monaco/dist/locale/es.js +46 -12
  62. package/public/vendor/monaco/dist/locale/fr.js +43 -9
  63. package/public/vendor/monaco/dist/locale/it.js +45 -11
  64. package/public/vendor/monaco/dist/locale/ja.js +45 -11
  65. package/public/vendor/monaco/dist/locale/ko.js +44 -10
  66. package/public/vendor/monaco/dist/locale/pl.js +42 -8
  67. package/public/vendor/monaco/dist/locale/pt-br.js +49 -15
  68. package/public/vendor/monaco/dist/locale/qps-ploc.js +1445 -0
  69. package/public/vendor/monaco/dist/locale/ru.js +48 -14
  70. package/public/vendor/monaco/dist/locale/tr.js +49 -15
  71. package/public/vendor/monaco/dist/locale/zh-hans.js +48 -14
  72. package/public/vendor/monaco/dist/locale/zh-hant.js +45 -11
  73. package/public/vendor/monaco/dist/theme/monoindustrial.json +228 -0
  74. package/public/vendor/monaco/dist/theme/solarized-dark.json +1082 -0
  75. package/public/vendor/monaco/dist/ts.worker.js +2 -2
  76. package/public/vendor/vendor.js +4 -4
  77. package/templates/index.mst +5 -1
@@ -1 +1,25 @@
1
- declare module'node:buffer'{export*from'buffer';}declare module'buffer'{export const INSPECT_MAX_BYTES:number;export const kMaxLength:number;export const kStringMaxLength:number;export const constants:{MAX_LENGTH:number;MAX_STRING_LENGTH:number;};const BuffType:typeof Buffer;export type TranscodeEncoding="ascii"|"utf8"|"utf16le"|"ucs2"|"latin1"|"binary";export function transcode(source:Uint8Array,fromEnc:TranscodeEncoding,toEnc:TranscodeEncoding):Buffer;export const SlowBuffer:{new(size:number):Buffer;prototype:Buffer;};export{BuffType as Buffer};}
1
+
2
+ /* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
3
+
4
+ declare module 'buffer' {
5
+ export const INSPECT_MAX_BYTES: number;
6
+ export const kMaxLength: number;
7
+ export const kStringMaxLength: number;
8
+ export const constants: {
9
+ MAX_LENGTH: number;
10
+ MAX_STRING_LENGTH: number;
11
+ };
12
+ const BuffType: typeof Buffer;
13
+
14
+ export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
15
+
16
+ export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
17
+
18
+ export const SlowBuffer: {
19
+ /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
20
+ new(size: number): Buffer;
21
+ prototype: Buffer;
22
+ };
23
+
24
+ export { BuffType as Buffer };
25
+ }
@@ -1,6 +1,514 @@
1
- declare module'node:child_process'{export*from'child_process';}declare module'child_process'{import{BaseEncodingOptions}from'node:fs';import*as events from'node:events';import*as net from'node:net';import{Writable,Readable,Stream,Pipe}from'node:stream';type Serializable=string|object|number|boolean;type SendHandle=net.Socket|net.Server;interface ChildProcess extends events.EventEmitter{stdin:Writable|null;stdout:Readable|null;stderr:Readable|null;readonly channel?:Pipe|null;readonly stdio:[
2
- Writable|null,Readable|null,Readable|null,Readable|Writable|null|undefined,Readable|Writable|null|undefined];readonly killed:boolean;readonly pid:number;readonly connected:boolean;readonly exitCode:number|null;readonly signalCode:NodeJS.Signals|null;readonly spawnargs:string[];readonly spawnfile:string;kill(signal?:NodeJS.Signals|number):boolean;send(message:Serializable,callback?:(error:Error|null)=>void):boolean;send(message:Serializable,sendHandle?:SendHandle,callback?:(error:Error|null)=>void):boolean;send(message:Serializable,sendHandle?:SendHandle,options?:MessageOptions,callback?:(error:Error|null)=>void):boolean;disconnect():void;unref():void;ref():void;addListener(event:string,listener:(...args:any[])=>void):this;addListener(event:"close",listener:(code:number|null,signal:NodeJS.Signals|null)=>void):this;addListener(event:"disconnect",listener:()=>void):this;addListener(event:"error",listener:(err:Error)=>void):this;addListener(event:"exit",listener:(code:number|null,signal:NodeJS.Signals|null)=>void):this;addListener(event:"message",listener:(message:Serializable,sendHandle:SendHandle)=>void):this;emit(event:string|symbol,...args:any[]):boolean;emit(event:"close",code:number|null,signal:NodeJS.Signals|null):boolean;emit(event:"disconnect"):boolean;emit(event:"error",err:Error):boolean;emit(event:"exit",code:number|null,signal:NodeJS.Signals|null):boolean;emit(event:"message",message:Serializable,sendHandle:SendHandle):boolean;on(event:string,listener:(...args:any[])=>void):this;on(event:"close",listener:(code:number|null,signal:NodeJS.Signals|null)=>void):this;on(event:"disconnect",listener:()=>void):this;on(event:"error",listener:(err:Error)=>void):this;on(event:"exit",listener:(code:number|null,signal:NodeJS.Signals|null)=>void):this;on(event:"message",listener:(message:Serializable,sendHandle:SendHandle)=>void):this;once(event:string,listener:(...args:any[])=>void):this;once(event:"close",listener:(code:number|null,signal:NodeJS.Signals|null)=>void):this;once(event:"disconnect",listener:()=>void):this;once(event:"error",listener:(err:Error)=>void):this;once(event:"exit",listener:(code:number|null,signal:NodeJS.Signals|null)=>void):this;once(event:"message",listener:(message:Serializable,sendHandle:SendHandle)=>void):this;prependListener(event:string,listener:(...args:any[])=>void):this;prependListener(event:"close",listener:(code:number|null,signal:NodeJS.Signals|null)=>void):this;prependListener(event:"disconnect",listener:()=>void):this;prependListener(event:"error",listener:(err:Error)=>void):this;prependListener(event:"exit",listener:(code:number|null,signal:NodeJS.Signals|null)=>void):this;prependListener(event:"message",listener:(message:Serializable,sendHandle:SendHandle)=>void):this;prependOnceListener(event:string,listener:(...args:any[])=>void):this;prependOnceListener(event:"close",listener:(code:number|null,signal:NodeJS.Signals|null)=>void):this;prependOnceListener(event:"disconnect",listener:()=>void):this;prependOnceListener(event:"error",listener:(err:Error)=>void):this;prependOnceListener(event:"exit",listener:(code:number|null,signal:NodeJS.Signals|null)=>void):this;prependOnceListener(event:"message",listener:(message:Serializable,sendHandle:SendHandle)=>void):this;}interface ChildProcessWithoutNullStreams extends ChildProcess{stdin:Writable;stdout:Readable;stderr:Readable;readonly stdio:[
3
- Writable,Readable,Readable,Readable|Writable|null|undefined,Readable|Writable|null|undefined];}interface ChildProcessByStdio<
4
- I extends null|Writable,O extends null|Readable,E extends null|Readable,>extends ChildProcess{stdin:I;stdout:O;stderr:E;readonly stdio:[
5
- I,O,E,Readable|Writable|null|undefined,Readable|Writable|null|undefined];}interface MessageOptions{keepOpen?:boolean;}type StdioOptions="pipe"|"ignore"|"inherit"|Array<("pipe"|"ipc"|"ignore"|"inherit"|Stream|number|null|undefined)>;type SerializationType='json'|'advanced';interface MessagingOptions{serialization?:SerializationType;}interface ProcessEnvOptions{uid?:number;gid?:number;cwd?:string;env?:NodeJS.ProcessEnv;}interface CommonOptions extends ProcessEnvOptions{windowsHide?:boolean;timeout?:number;}interface CommonSpawnOptions extends CommonOptions,MessagingOptions{argv0?:string;stdio?:StdioOptions;shell?:boolean|string;windowsVerbatimArguments?:boolean;}interface SpawnOptions extends CommonSpawnOptions{detached?:boolean;}interface SpawnOptionsWithoutStdio extends SpawnOptions{stdio?:'pipe'|Array<null|undefined|'pipe'>;}type StdioNull='inherit'|'ignore'|Stream;type StdioPipe=undefined|null|'pipe';interface SpawnOptionsWithStdioTuple<
6
- Stdin extends StdioNull|StdioPipe,Stdout extends StdioNull|StdioPipe,Stderr extends StdioNull|StdioPipe,>extends SpawnOptions{stdio:[Stdin,Stdout,Stderr];}function spawn(command:string,options?:SpawnOptionsWithoutStdio):ChildProcessWithoutNullStreams;function spawn(command:string,options:SpawnOptionsWithStdioTuple<StdioPipe,StdioPipe,StdioPipe>,):ChildProcessByStdio<Writable,Readable,Readable>;function spawn(command:string,options:SpawnOptionsWithStdioTuple<StdioPipe,StdioPipe,StdioNull>,):ChildProcessByStdio<Writable,Readable,null>;function spawn(command:string,options:SpawnOptionsWithStdioTuple<StdioPipe,StdioNull,StdioPipe>,):ChildProcessByStdio<Writable,null,Readable>;function spawn(command:string,options:SpawnOptionsWithStdioTuple<StdioNull,StdioPipe,StdioPipe>,):ChildProcessByStdio<null,Readable,Readable>;function spawn(command:string,options:SpawnOptionsWithStdioTuple<StdioPipe,StdioNull,StdioNull>,):ChildProcessByStdio<Writable,null,null>;function spawn(command:string,options:SpawnOptionsWithStdioTuple<StdioNull,StdioPipe,StdioNull>,):ChildProcessByStdio<null,Readable,null>;function spawn(command:string,options:SpawnOptionsWithStdioTuple<StdioNull,StdioNull,StdioPipe>,):ChildProcessByStdio<null,null,Readable>;function spawn(command:string,options:SpawnOptionsWithStdioTuple<StdioNull,StdioNull,StdioNull>,):ChildProcessByStdio<null,null,null>;function spawn(command:string,options:SpawnOptions):ChildProcess;function spawn(command:string,args?:ReadonlyArray<string>,options?:SpawnOptionsWithoutStdio):ChildProcessWithoutNullStreams;function spawn(command:string,args:ReadonlyArray<string>,options:SpawnOptionsWithStdioTuple<StdioPipe,StdioPipe,StdioPipe>,):ChildProcessByStdio<Writable,Readable,Readable>;function spawn(command:string,args:ReadonlyArray<string>,options:SpawnOptionsWithStdioTuple<StdioPipe,StdioPipe,StdioNull>,):ChildProcessByStdio<Writable,Readable,null>;function spawn(command:string,args:ReadonlyArray<string>,options:SpawnOptionsWithStdioTuple<StdioPipe,StdioNull,StdioPipe>,):ChildProcessByStdio<Writable,null,Readable>;function spawn(command:string,args:ReadonlyArray<string>,options:SpawnOptionsWithStdioTuple<StdioNull,StdioPipe,StdioPipe>,):ChildProcessByStdio<null,Readable,Readable>;function spawn(command:string,args:ReadonlyArray<string>,options:SpawnOptionsWithStdioTuple<StdioPipe,StdioNull,StdioNull>,):ChildProcessByStdio<Writable,null,null>;function spawn(command:string,args:ReadonlyArray<string>,options:SpawnOptionsWithStdioTuple<StdioNull,StdioPipe,StdioNull>,):ChildProcessByStdio<null,Readable,null>;function spawn(command:string,args:ReadonlyArray<string>,options:SpawnOptionsWithStdioTuple<StdioNull,StdioNull,StdioPipe>,):ChildProcessByStdio<null,null,Readable>;function spawn(command:string,args:ReadonlyArray<string>,options:SpawnOptionsWithStdioTuple<StdioNull,StdioNull,StdioNull>,):ChildProcessByStdio<null,null,null>;function spawn(command:string,args:ReadonlyArray<string>,options:SpawnOptions):ChildProcess;interface ExecOptions extends CommonOptions{shell?:string;maxBuffer?:number;killSignal?:NodeJS.Signals|number;}interface ExecOptionsWithStringEncoding extends ExecOptions{encoding:BufferEncoding;}interface ExecOptionsWithBufferEncoding extends ExecOptions{encoding:BufferEncoding|null;}interface ExecException extends Error{cmd?:string;killed?:boolean;code?:number;signal?:NodeJS.Signals;}function exec(command:string,callback?:(error:ExecException|null,stdout:string,stderr:string)=>void):ChildProcess;function exec(command:string,options:{encoding:"buffer"|null}&ExecOptions,callback?:(error:ExecException|null,stdout:Buffer,stderr:Buffer)=>void):ChildProcess;function exec(command:string,options:{encoding:BufferEncoding}&ExecOptions,callback?:(error:ExecException|null,stdout:string,stderr:string)=>void):ChildProcess;function exec(command:string,options:{encoding:BufferEncoding}&ExecOptions,callback?:(error:ExecException|null,stdout:string|Buffer,stderr:string|Buffer)=>void,):ChildProcess;function exec(command:string,options:ExecOptions,callback?:(error:ExecException|null,stdout:string,stderr:string)=>void):ChildProcess;function exec(command:string,options:(BaseEncodingOptions&ExecOptions)|undefined|null,callback?:(error:ExecException|null,stdout:string|Buffer,stderr:string|Buffer)=>void,):ChildProcess;interface PromiseWithChild<T>extends Promise<T>{child:ChildProcess;}namespace exec{function __promisify__(command:string):PromiseWithChild<{stdout:string,stderr:string}>;function __promisify__(command:string,options:{encoding:"buffer"|null}&ExecOptions):PromiseWithChild<{stdout:Buffer,stderr:Buffer}>;function __promisify__(command:string,options:{encoding:BufferEncoding}&ExecOptions):PromiseWithChild<{stdout:string,stderr:string}>;function __promisify__(command:string,options:ExecOptions):PromiseWithChild<{stdout:string,stderr:string}>;function __promisify__(command:string,options?:(BaseEncodingOptions&ExecOptions)|null):PromiseWithChild<{stdout:string|Buffer,stderr:string|Buffer}>;}interface ExecFileOptions extends CommonOptions{maxBuffer?:number;killSignal?:NodeJS.Signals|number;windowsVerbatimArguments?:boolean;shell?:boolean|string;}interface ExecFileOptionsWithStringEncoding extends ExecFileOptions{encoding:BufferEncoding;}interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions{encoding:'buffer'|null;}interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions{encoding:BufferEncoding;}type ExecFileException=ExecException&NodeJS.ErrnoException;function execFile(file:string):ChildProcess;function execFile(file:string,options:(BaseEncodingOptions&ExecFileOptions)|undefined|null):ChildProcess;function execFile(file:string,args?:ReadonlyArray<string>|null):ChildProcess;function execFile(file:string,args:ReadonlyArray<string>|undefined|null,options:(BaseEncodingOptions&ExecFileOptions)|undefined|null):ChildProcess;function execFile(file:string,callback:(error:ExecFileException|null,stdout:string,stderr:string)=>void):ChildProcess;function execFile(file:string,args:ReadonlyArray<string>|undefined|null,callback:(error:ExecFileException|null,stdout:string,stderr:string)=>void):ChildProcess;function execFile(file:string,options:ExecFileOptionsWithBufferEncoding,callback:(error:ExecFileException|null,stdout:Buffer,stderr:Buffer)=>void):ChildProcess;function execFile(file:string,args:ReadonlyArray<string>|undefined|null,options:ExecFileOptionsWithBufferEncoding,callback:(error:ExecFileException|null,stdout:Buffer,stderr:Buffer)=>void,):ChildProcess;function execFile(file:string,options:ExecFileOptionsWithStringEncoding,callback:(error:ExecFileException|null,stdout:string,stderr:string)=>void):ChildProcess;function execFile(file:string,args:ReadonlyArray<string>|undefined|null,options:ExecFileOptionsWithStringEncoding,callback:(error:ExecFileException|null,stdout:string,stderr:string)=>void,):ChildProcess;function execFile(file:string,options:ExecFileOptionsWithOtherEncoding,callback:(error:ExecFileException|null,stdout:string|Buffer,stderr:string|Buffer)=>void,):ChildProcess;function execFile(file:string,args:ReadonlyArray<string>|undefined|null,options:ExecFileOptionsWithOtherEncoding,callback:(error:ExecFileException|null,stdout:string|Buffer,stderr:string|Buffer)=>void,):ChildProcess;function execFile(file:string,options:ExecFileOptions,callback:(error:ExecFileException|null,stdout:string,stderr:string)=>void):ChildProcess;function execFile(file:string,args:ReadonlyArray<string>|undefined|null,options:ExecFileOptions,callback:(error:ExecFileException|null,stdout:string,stderr:string)=>void):ChildProcess;function execFile(file:string,options:(BaseEncodingOptions&ExecFileOptions)|undefined|null,callback:((error:ExecFileException|null,stdout:string|Buffer,stderr:string|Buffer)=>void)|undefined|null,):ChildProcess;function execFile(file:string,args:ReadonlyArray<string>|undefined|null,options:(BaseEncodingOptions&ExecFileOptions)|undefined|null,callback:((error:ExecFileException|null,stdout:string|Buffer,stderr:string|Buffer)=>void)|undefined|null,):ChildProcess;namespace execFile{function __promisify__(file:string):PromiseWithChild<{stdout:string,stderr:string}>;function __promisify__(file:string,args:ReadonlyArray<string>|undefined|null):PromiseWithChild<{stdout:string,stderr:string}>;function __promisify__(file:string,options:ExecFileOptionsWithBufferEncoding):PromiseWithChild<{stdout:Buffer,stderr:Buffer}>;function __promisify__(file:string,args:ReadonlyArray<string>|undefined|null,options:ExecFileOptionsWithBufferEncoding):PromiseWithChild<{stdout:Buffer,stderr:Buffer}>;function __promisify__(file:string,options:ExecFileOptionsWithStringEncoding):PromiseWithChild<{stdout:string,stderr:string}>;function __promisify__(file:string,args:ReadonlyArray<string>|undefined|null,options:ExecFileOptionsWithStringEncoding):PromiseWithChild<{stdout:string,stderr:string}>;function __promisify__(file:string,options:ExecFileOptionsWithOtherEncoding):PromiseWithChild<{stdout:string|Buffer,stderr:string|Buffer}>;function __promisify__(file:string,args:ReadonlyArray<string>|undefined|null,options:ExecFileOptionsWithOtherEncoding,):PromiseWithChild<{stdout:string|Buffer,stderr:string|Buffer}>;function __promisify__(file:string,options:ExecFileOptions):PromiseWithChild<{stdout:string,stderr:string}>;function __promisify__(file:string,args:ReadonlyArray<string>|undefined|null,options:ExecFileOptions):PromiseWithChild<{stdout:string,stderr:string}>;function __promisify__(file:string,options:(BaseEncodingOptions&ExecFileOptions)|undefined|null):PromiseWithChild<{stdout:string|Buffer,stderr:string|Buffer}>;function __promisify__(file:string,args:ReadonlyArray<string>|undefined|null,options:(BaseEncodingOptions&ExecFileOptions)|undefined|null,):PromiseWithChild<{stdout:string|Buffer,stderr:string|Buffer}>;}interface ForkOptions extends ProcessEnvOptions,MessagingOptions{execPath?:string;execArgv?:string[];silent?:boolean;stdio?:StdioOptions;detached?:boolean;windowsVerbatimArguments?:boolean;}function fork(modulePath:string,options?:ForkOptions):ChildProcess;function fork(modulePath:string,args?:ReadonlyArray<string>,options?:ForkOptions):ChildProcess;interface SpawnSyncOptions extends CommonSpawnOptions{input?:string|NodeJS.ArrayBufferView;killSignal?:NodeJS.Signals|number;maxBuffer?:number;encoding?:BufferEncoding|'buffer'|null;}interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions{encoding:BufferEncoding;}interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions{encoding?:'buffer'|null;}interface SpawnSyncReturns<T>{pid:number;output:string[];stdout:T;stderr:T;status:number|null;signal:NodeJS.Signals|null;error?:Error;}function spawnSync(command:string):SpawnSyncReturns<Buffer>;function spawnSync(command:string,options?:SpawnSyncOptionsWithStringEncoding):SpawnSyncReturns<string>;function spawnSync(command:string,options?:SpawnSyncOptionsWithBufferEncoding):SpawnSyncReturns<Buffer>;function spawnSync(command:string,options?:SpawnSyncOptions):SpawnSyncReturns<Buffer>;function spawnSync(command:string,args?:ReadonlyArray<string>,options?:SpawnSyncOptionsWithStringEncoding):SpawnSyncReturns<string>;function spawnSync(command:string,args?:ReadonlyArray<string>,options?:SpawnSyncOptionsWithBufferEncoding):SpawnSyncReturns<Buffer>;function spawnSync(command:string,args?:ReadonlyArray<string>,options?:SpawnSyncOptions):SpawnSyncReturns<Buffer>;interface ExecSyncOptions extends CommonOptions{input?:string|Uint8Array;stdio?:StdioOptions;shell?:string;killSignal?:NodeJS.Signals|number;maxBuffer?:number;encoding?:BufferEncoding|'buffer'|null;}interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions{encoding:BufferEncoding;}interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions{encoding?:'buffer'|null;}function execSync(command:string):Buffer;function execSync(command:string,options?:ExecSyncOptionsWithStringEncoding):string;function execSync(command:string,options?:ExecSyncOptionsWithBufferEncoding):Buffer;function execSync(command:string,options?:ExecSyncOptions):Buffer;interface ExecFileSyncOptions extends CommonOptions{input?:string|NodeJS.ArrayBufferView;stdio?:StdioOptions;killSignal?:NodeJS.Signals|number;maxBuffer?:number;encoding?:BufferEncoding;shell?:boolean|string;}interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions{encoding:BufferEncoding;}interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions{encoding:BufferEncoding;}function execFileSync(command:string):Buffer;function execFileSync(command:string,options?:ExecFileSyncOptionsWithStringEncoding):string;function execFileSync(command:string,options?:ExecFileSyncOptionsWithBufferEncoding):Buffer;function execFileSync(command:string,options?:ExecFileSyncOptions):Buffer;function execFileSync(command:string,args?:ReadonlyArray<string>,options?:ExecFileSyncOptionsWithStringEncoding):string;function execFileSync(command:string,args?:ReadonlyArray<string>,options?:ExecFileSyncOptionsWithBufferEncoding):Buffer;function execFileSync(command:string,args?:ReadonlyArray<string>,options?:ExecFileSyncOptions):Buffer;}
1
+
2
+ /* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
3
+
4
+ declare module 'child_process' {
5
+ import { BaseEncodingOptions } from 'fs';
6
+ import * as events from 'events';
7
+ import * as net from 'net';
8
+ import { Writable, Readable, Stream, Pipe } from 'stream';
9
+
10
+ type Serializable = string | object | number | boolean;
11
+ type SendHandle = net.Socket | net.Server;
12
+
13
+ interface ChildProcess extends events.EventEmitter {
14
+ stdin: Writable | null;
15
+ stdout: Readable | null;
16
+ stderr: Readable | null;
17
+ readonly channel?: Pipe | null | undefined;
18
+ readonly stdio: [
19
+ Writable | null, // stdin
20
+ Readable | null, // stdout
21
+ Readable | null, // stderr
22
+ Readable | Writable | null | undefined, // extra
23
+ Readable | Writable | null | undefined // extra
24
+ ];
25
+ readonly killed: boolean;
26
+ readonly pid: number;
27
+ readonly connected: boolean;
28
+ readonly exitCode: number | null;
29
+ readonly signalCode: NodeJS.Signals | null;
30
+ readonly spawnargs: string[];
31
+ readonly spawnfile: string;
32
+ kill(signal?: NodeJS.Signals | number): boolean;
33
+ send(message: Serializable, callback?: (error: Error | null) => void): boolean;
34
+ send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
35
+ send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
36
+ disconnect(): void;
37
+ unref(): void;
38
+ ref(): void;
39
+
40
+ /**
41
+ * events.EventEmitter
42
+ * 1. close
43
+ * 2. disconnect
44
+ * 3. error
45
+ * 4. exit
46
+ * 5. message
47
+ */
48
+
49
+ addListener(event: string, listener: (...args: any[]) => void): this;
50
+ addListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
51
+ addListener(event: "disconnect", listener: () => void): this;
52
+ addListener(event: "error", listener: (err: Error) => void): this;
53
+ addListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
54
+ addListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
55
+
56
+ emit(event: string | symbol, ...args: any[]): boolean;
57
+ emit(event: "close", code: number | null, signal: NodeJS.Signals | null): boolean;
58
+ emit(event: "disconnect"): boolean;
59
+ emit(event: "error", err: Error): boolean;
60
+ emit(event: "exit", code: number | null, signal: NodeJS.Signals | null): boolean;
61
+ emit(event: "message", message: Serializable, sendHandle: SendHandle): boolean;
62
+
63
+ on(event: string, listener: (...args: any[]) => void): this;
64
+ on(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
65
+ on(event: "disconnect", listener: () => void): this;
66
+ on(event: "error", listener: (err: Error) => void): this;
67
+ on(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
68
+ on(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
69
+
70
+ once(event: string, listener: (...args: any[]) => void): this;
71
+ once(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
72
+ once(event: "disconnect", listener: () => void): this;
73
+ once(event: "error", listener: (err: Error) => void): this;
74
+ once(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
75
+ once(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
76
+
77
+ prependListener(event: string, listener: (...args: any[]) => void): this;
78
+ prependListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
79
+ prependListener(event: "disconnect", listener: () => void): this;
80
+ prependListener(event: "error", listener: (err: Error) => void): this;
81
+ prependListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
82
+ prependListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
83
+
84
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
85
+ prependOnceListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
86
+ prependOnceListener(event: "disconnect", listener: () => void): this;
87
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
88
+ prependOnceListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
89
+ prependOnceListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
90
+ }
91
+
92
+ // return this object when stdio option is undefined or not specified
93
+ interface ChildProcessWithoutNullStreams extends ChildProcess {
94
+ stdin: Writable;
95
+ stdout: Readable;
96
+ stderr: Readable;
97
+ readonly stdio: [
98
+ Writable, // stdin
99
+ Readable, // stdout
100
+ Readable, // stderr
101
+ Readable | Writable | null | undefined, // extra, no modification
102
+ Readable | Writable | null | undefined // extra, no modification
103
+ ];
104
+ }
105
+
106
+ // return this object when stdio option is a tuple of 3
107
+ interface ChildProcessByStdio<
108
+ I extends null | Writable,
109
+ O extends null | Readable,
110
+ E extends null | Readable,
111
+ > extends ChildProcess {
112
+ stdin: I;
113
+ stdout: O;
114
+ stderr: E;
115
+ readonly stdio: [
116
+ I,
117
+ O,
118
+ E,
119
+ Readable | Writable | null | undefined, // extra, no modification
120
+ Readable | Writable | null | undefined // extra, no modification
121
+ ];
122
+ }
123
+
124
+ interface MessageOptions {
125
+ keepOpen?: boolean | undefined;
126
+ }
127
+
128
+ type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>;
129
+
130
+ type SerializationType = 'json' | 'advanced';
131
+
132
+ interface MessagingOptions {
133
+ /**
134
+ * Specify the kind of serialization used for sending messages between processes.
135
+ * @default 'json'
136
+ */
137
+ serialization?: SerializationType | undefined;
138
+ }
139
+
140
+ interface ProcessEnvOptions {
141
+ uid?: number | undefined;
142
+ gid?: number | undefined;
143
+ cwd?: string | undefined;
144
+ env?: NodeJS.ProcessEnv | undefined;
145
+ }
146
+
147
+ interface CommonOptions extends ProcessEnvOptions {
148
+ /**
149
+ * @default true
150
+ */
151
+ windowsHide?: boolean | undefined;
152
+ /**
153
+ * @default 0
154
+ */
155
+ timeout?: number | undefined;
156
+ }
157
+
158
+ interface CommonSpawnOptions extends CommonOptions, MessagingOptions {
159
+ argv0?: string | undefined;
160
+ stdio?: StdioOptions | undefined;
161
+ shell?: boolean | string | undefined;
162
+ windowsVerbatimArguments?: boolean | undefined;
163
+ }
164
+
165
+ interface SpawnOptions extends CommonSpawnOptions {
166
+ detached?: boolean | undefined;
167
+ }
168
+
169
+ interface SpawnOptionsWithoutStdio extends SpawnOptions {
170
+ stdio?: 'pipe' | Array<null | undefined | 'pipe'> | undefined;
171
+ }
172
+
173
+ type StdioNull = 'inherit' | 'ignore' | Stream;
174
+ type StdioPipe = undefined | null | 'pipe';
175
+
176
+ interface SpawnOptionsWithStdioTuple<
177
+ Stdin extends StdioNull | StdioPipe,
178
+ Stdout extends StdioNull | StdioPipe,
179
+ Stderr extends StdioNull | StdioPipe,
180
+ > extends SpawnOptions {
181
+ stdio: [Stdin, Stdout, Stderr];
182
+ }
183
+
184
+ // overloads of spawn without 'args'
185
+ function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
186
+
187
+ function spawn(
188
+ command: string,
189
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
190
+ ): ChildProcessByStdio<Writable, Readable, Readable>;
191
+ function spawn(
192
+ command: string,
193
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
194
+ ): ChildProcessByStdio<Writable, Readable, null>;
195
+ function spawn(
196
+ command: string,
197
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
198
+ ): ChildProcessByStdio<Writable, null, Readable>;
199
+ function spawn(
200
+ command: string,
201
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
202
+ ): ChildProcessByStdio<null, Readable, Readable>;
203
+ function spawn(
204
+ command: string,
205
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
206
+ ): ChildProcessByStdio<Writable, null, null>;
207
+ function spawn(
208
+ command: string,
209
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
210
+ ): ChildProcessByStdio<null, Readable, null>;
211
+ function spawn(
212
+ command: string,
213
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
214
+ ): ChildProcessByStdio<null, null, Readable>;
215
+ function spawn(
216
+ command: string,
217
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
218
+ ): ChildProcessByStdio<null, null, null>;
219
+
220
+ function spawn(command: string, options: SpawnOptions): ChildProcess;
221
+
222
+ // overloads of spawn with 'args'
223
+ function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
224
+
225
+ function spawn(
226
+ command: string,
227
+ args: ReadonlyArray<string>,
228
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
229
+ ): ChildProcessByStdio<Writable, Readable, Readable>;
230
+ function spawn(
231
+ command: string,
232
+ args: ReadonlyArray<string>,
233
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
234
+ ): ChildProcessByStdio<Writable, Readable, null>;
235
+ function spawn(
236
+ command: string,
237
+ args: ReadonlyArray<string>,
238
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
239
+ ): ChildProcessByStdio<Writable, null, Readable>;
240
+ function spawn(
241
+ command: string,
242
+ args: ReadonlyArray<string>,
243
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
244
+ ): ChildProcessByStdio<null, Readable, Readable>;
245
+ function spawn(
246
+ command: string,
247
+ args: ReadonlyArray<string>,
248
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
249
+ ): ChildProcessByStdio<Writable, null, null>;
250
+ function spawn(
251
+ command: string,
252
+ args: ReadonlyArray<string>,
253
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
254
+ ): ChildProcessByStdio<null, Readable, null>;
255
+ function spawn(
256
+ command: string,
257
+ args: ReadonlyArray<string>,
258
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
259
+ ): ChildProcessByStdio<null, null, Readable>;
260
+ function spawn(
261
+ command: string,
262
+ args: ReadonlyArray<string>,
263
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
264
+ ): ChildProcessByStdio<null, null, null>;
265
+
266
+ function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
267
+
268
+ interface ExecOptions extends CommonOptions {
269
+ shell?: string | undefined;
270
+ maxBuffer?: number | undefined;
271
+ killSignal?: NodeJS.Signals | number | undefined;
272
+ }
273
+
274
+ interface ExecOptionsWithStringEncoding extends ExecOptions {
275
+ encoding: BufferEncoding;
276
+ }
277
+
278
+ interface ExecOptionsWithBufferEncoding extends ExecOptions {
279
+ encoding: BufferEncoding | null; // specify `null`.
280
+ }
281
+
282
+ interface ExecException extends Error {
283
+ cmd?: string | undefined;
284
+ killed?: boolean | undefined;
285
+ code?: number | undefined;
286
+ signal?: NodeJS.Signals | undefined;
287
+ }
288
+
289
+ // no `options` definitely means stdout/stderr are `string`.
290
+ function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
291
+
292
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
293
+ function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
294
+
295
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
296
+ function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
297
+
298
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
299
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
300
+ function exec(
301
+ command: string,
302
+ options: { encoding: BufferEncoding } & ExecOptions,
303
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
304
+ ): ChildProcess;
305
+
306
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
307
+ function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
308
+
309
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
310
+ function exec(
311
+ command: string,
312
+ options: (BaseEncodingOptions & ExecOptions) | undefined | null,
313
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
314
+ ): ChildProcess;
315
+
316
+ interface PromiseWithChild<T> extends Promise<T> {
317
+ child: ChildProcess;
318
+ }
319
+
320
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
321
+ namespace exec {
322
+ function __promisify__(command: string): PromiseWithChild<{ stdout: string, stderr: string }>;
323
+ function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
324
+ function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
325
+ function __promisify__(command: string, options: ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
326
+ function __promisify__(command: string, options?: (BaseEncodingOptions & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
327
+ }
328
+
329
+ interface ExecFileOptions extends CommonOptions {
330
+ maxBuffer?: number | undefined;
331
+ killSignal?: NodeJS.Signals | number | undefined;
332
+ windowsVerbatimArguments?: boolean | undefined;
333
+ shell?: boolean | string | undefined;
334
+ }
335
+ interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
336
+ encoding: BufferEncoding;
337
+ }
338
+ interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
339
+ encoding: 'buffer' | null;
340
+ }
341
+ interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
342
+ encoding: BufferEncoding;
343
+ }
344
+ type ExecFileException = ExecException & NodeJS.ErrnoException;
345
+
346
+ function execFile(file: string): ChildProcess;
347
+ function execFile(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
348
+ function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
349
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
350
+
351
+ // no `options` definitely means stdout/stderr are `string`.
352
+ function execFile(file: string, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
353
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
354
+
355
+ // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
356
+ function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
357
+ function execFile(
358
+ file: string,
359
+ args: ReadonlyArray<string> | undefined | null,
360
+ options: ExecFileOptionsWithBufferEncoding,
361
+ callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void,
362
+ ): ChildProcess;
363
+
364
+ // `options` with well known `encoding` means stdout/stderr are definitely `string`.
365
+ function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
366
+ function execFile(
367
+ file: string,
368
+ args: ReadonlyArray<string> | undefined | null,
369
+ options: ExecFileOptionsWithStringEncoding,
370
+ callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
371
+ ): ChildProcess;
372
+
373
+ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
374
+ // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
375
+ function execFile(
376
+ file: string,
377
+ options: ExecFileOptionsWithOtherEncoding,
378
+ callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
379
+ ): ChildProcess;
380
+ function execFile(
381
+ file: string,
382
+ args: ReadonlyArray<string> | undefined | null,
383
+ options: ExecFileOptionsWithOtherEncoding,
384
+ callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
385
+ ): ChildProcess;
386
+
387
+ // `options` without an `encoding` means stdout/stderr are definitely `string`.
388
+ function execFile(file: string, options: ExecFileOptions, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
389
+ function execFile(
390
+ file: string,
391
+ args: ReadonlyArray<string> | undefined | null,
392
+ options: ExecFileOptions,
393
+ callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
394
+ ): ChildProcess;
395
+
396
+ // fallback if nothing else matches. Worst case is always `string | Buffer`.
397
+ function execFile(
398
+ file: string,
399
+ options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
400
+ callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
401
+ ): ChildProcess;
402
+ function execFile(
403
+ file: string,
404
+ args: ReadonlyArray<string> | undefined | null,
405
+ options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
406
+ callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
407
+ ): ChildProcess;
408
+
409
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
410
+ namespace execFile {
411
+ function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>;
412
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
413
+ function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
414
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
415
+ function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
416
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
417
+ function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
418
+ function __promisify__(
419
+ file: string,
420
+ args: ReadonlyArray<string> | undefined | null,
421
+ options: ExecFileOptionsWithOtherEncoding,
422
+ ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
423
+ function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
424
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
425
+ function __promisify__(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
426
+ function __promisify__(
427
+ file: string,
428
+ args: ReadonlyArray<string> | undefined | null,
429
+ options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
430
+ ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
431
+ }
432
+
433
+ interface ForkOptions extends ProcessEnvOptions, MessagingOptions {
434
+ execPath?: string | undefined;
435
+ execArgv?: string[] | undefined;
436
+ silent?: boolean | undefined;
437
+ stdio?: StdioOptions | undefined;
438
+ detached?: boolean | undefined;
439
+ windowsVerbatimArguments?: boolean | undefined;
440
+ }
441
+ function fork(modulePath: string, options?: ForkOptions): ChildProcess;
442
+ function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
443
+
444
+ interface SpawnSyncOptions extends CommonSpawnOptions {
445
+ input?: string | NodeJS.ArrayBufferView | undefined;
446
+ killSignal?: NodeJS.Signals | number | undefined;
447
+ maxBuffer?: number | undefined;
448
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
449
+ }
450
+ interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
451
+ encoding: BufferEncoding;
452
+ }
453
+ interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
454
+ encoding?: 'buffer' | null | undefined;
455
+ }
456
+ interface SpawnSyncReturns<T> {
457
+ pid: number;
458
+ output: Array<T | null>;
459
+ stdout: T;
460
+ stderr: T;
461
+ status: number | null;
462
+ signal: NodeJS.Signals | null;
463
+ error?: Error | undefined;
464
+ }
465
+ function spawnSync(command: string): SpawnSyncReturns<Buffer>;
466
+ function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
467
+ function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
468
+ function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
469
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
470
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
471
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
472
+
473
+ interface ExecSyncOptions extends CommonOptions {
474
+ input?: string | Uint8Array | undefined;
475
+ stdio?: StdioOptions | undefined;
476
+ shell?: string | undefined;
477
+ killSignal?: NodeJS.Signals | number | undefined;
478
+ maxBuffer?: number | undefined;
479
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
480
+ }
481
+ interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
482
+ encoding: BufferEncoding;
483
+ }
484
+ interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
485
+ encoding?: 'buffer' | null | undefined;
486
+ }
487
+ function execSync(command: string): Buffer;
488
+ function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
489
+ function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer;
490
+ function execSync(command: string, options?: ExecSyncOptions): string | Buffer;
491
+
492
+ interface ExecFileSyncOptions extends CommonOptions {
493
+ input?: string | NodeJS.ArrayBufferView | undefined;
494
+ stdio?: StdioOptions | undefined;
495
+ killSignal?: NodeJS.Signals | number | undefined;
496
+ maxBuffer?: number | undefined;
497
+ encoding?: BufferEncoding | undefined;
498
+ shell?: boolean | string | undefined;
499
+ }
500
+ interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
501
+ encoding: BufferEncoding;
502
+ }
503
+ interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
504
+ encoding: BufferEncoding; // specify `null`.
505
+ }
506
+ function execFileSync(command: string): Buffer;
507
+ function execFileSync(command: string, options: ExecFileSyncOptionsWithStringEncoding): string;
508
+ function execFileSync(command: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
509
+ function execFileSync(command: string, options?: ExecFileSyncOptions): string | Buffer;
510
+ function execFileSync(command: string, args: ReadonlyArray<string>): Buffer;
511
+ function execFileSync(command: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithStringEncoding): string;
512
+ function execFileSync(command: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
513
+ function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): string | Buffer;
514
+ }