From 1f7884dc709c9fb32e0dd26a33037de5f462305a Mon Sep 17 00:00:00 2001 From: Steve-Mcl Date: Thu, 29 Apr 2021 16:54:29 +0100 Subject: [PATCH] add typings for basic intellisense --- .../editor-client/src/types/README.md | 39 ++++ .../src/types/node-red/func.d.ts | 101 +++++++++ .../src/types/node-red/util.d.ts | 208 ++++++++++++++++++ .../editor-client/src/types/node/buffer.d.ts | 1 + .../src/types/node/child_process.d.ts | 6 + .../editor-client/src/types/node/console.d.ts | 1 + .../editor-client/src/types/node/crypto.d.ts | 1 + .../editor-client/src/types/node/dgram.d.ts | 1 + .../editor-client/src/types/node/dns.d.ts | 10 + .../editor-client/src/types/node/domain.d.ts | 1 + .../editor-client/src/types/node/events.d.ts | 1 + .../editor-client/src/types/node/fs.d.ts | 1 + .../editor-client/src/types/node/globals.d.ts | 1 + .../editor-client/src/types/node/http.d.ts | 1 + .../editor-client/src/types/node/net.d.ts | 1 + .../editor-client/src/types/node/os.d.ts | 1 + .../editor-client/src/types/node/path.d.ts | 1 + .../editor-client/src/types/node/process.d.ts | 1 + .../src/types/node/querystring.d.ts | 1 + .../editor-client/src/types/node/url.d.ts | 1 + 20 files changed, 379 insertions(+) create mode 100644 packages/node_modules/@node-red/editor-client/src/types/README.md create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node-red/func.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node-red/util.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/buffer.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/child_process.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/console.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/crypto.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/dgram.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/dns.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/domain.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/events.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/fs.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/globals.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/http.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/net.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/os.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/path.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/process.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/querystring.d.ts create mode 100644 packages/node_modules/@node-red/editor-client/src/types/node/url.d.ts diff --git a/packages/node_modules/@node-red/editor-client/src/types/README.md b/packages/node_modules/@node-red/editor-client/src/types/README.md new file mode 100644 index 000000000..c73da8374 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/README.md @@ -0,0 +1,39 @@ +node and node-red types for intellisense for monaco +--------------------------------------------------- + +node-js and node-red types are included in node-red for monaco and any other editor to provide intellisense in the code editor + +as node-js v14 is the default recommended target as of writing, the most popular node-js types (see below) have been taken from most up-to-date types from `@types/node` and minified using `dts-minify` + +* buffer.d.ts +* console.d.ts +* crypto.d.ts +* fs.d.ts +* globals.d.ts +* http.d.ts +* net.d.ts +* os.d.ts +* process.d.ts +* querystring.d.ts +* string_decoder.d.ts +* url.d.ts +* zlib.d.ts + +These are placed in `node_modules/@node-red/editor-client/src/` + +The grunt task will place this default set of typings in `node_modules/@node-red/editor-client/public/types/` for consumption by the code editor. + +# Instructions + +See packages/node_modules/@node-red/editor-client/src/vendor/monaco/README.md + + +# Alternative / Manual Installation + +* `npm install --save @types/node@14.14.43` +* (optional) minify using `dts-minify` +* copy files from `node_modules/@node-red/editor-client/src/` to `(node-red-src)/packages/node_modules/@node-red/editor-client/src/types/node` +* update types for node-red in files to match src definitions... + * (node-red-src)/packages/node_modules/@node-red/editor-client/src/types/node-red/func.d.ts + * (node-red-src)/packages/node_modules/@node-red/editor-client/src/types/node-red/util.d.ts + diff --git a/packages/node_modules/@node-red/editor-client/src/types/node-red/func.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node-red/func.d.ts new file mode 100644 index 000000000..95060b8ff --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node-red/func.d.ts @@ -0,0 +1,101 @@ + +interface NodeMessage { + topic?: string; + payload?: any; + _msgid?: string; + [other: any]: any; //permit other properties +} + +/** @type {NodeMessage} the `msg` object */ +var msg: NodeMessage; +/** @type {string} the id of the incoming `msg` (alias of msg._msgid) */ +const __msgid__:string; + +/** + * @typedef NodeStatus + * @type {object} + * @property {string} [fill] The fill property can be: red, green, yellow, blue or grey. + * @property {string} [shape] The shape property can be: ring or dot. + * @property {string} [text] The text to display + */ +interface NodeStatus { + /** The fill property can be: red, green, yellow, blue or grey */ + fill?: string, + /** The shape property can be: ring or dot */ + shape?: string, + /** The text to display */ + text?: string +} + +declare class node { + /** + * Send 1 or more messages asynchronously + * @param {object | object[]} msg The msg object + * @param {Boolean} [clone=true] Flag to indicate the `msg` should be cloned. Default = `true` + * @example Send 1 msg to output 1 + * ```javascript + * node.send({ payload: "a" }); + * ``` + * @example Send 2 msg to 2 outputs + * ```javascript + * node.send([{ payload: "output1" }, { payload: "output2" }]); + * ``` + * @example Send 3 msg to output 1 + * ```javascript + * node.send([[{ payload: 1 }, { payload: 2 }, { payload: 3 }]]); + * ``` + * @see node-red documentation [writing-functions: sending messages asynchronously](https://nodered.org/docs/user-guide/writing-functions#sending-messages-asynchronously) + */ + static send(msg:object, clone:Boolean=true); + /** Inform runtime this instance has completed its operation */ + static done(); + /** Send an error to the console and debug side bar. Include `msg` in the 2nd parameter to trigger the catch node. */ + static error(err:string|Error, msg:object=null); + /** Log a warn message to the console and debug sidebar */ + static warn(warning:string|Object); + /** Log an info message to the console (not sent to sidebar)' */ + static log(info:string|Object); + /** Set the status icon and text underneath the node. + * @param {NodeStatus} status - The status object `{fill, shape, text}` + * @example clear node status + * ```javascript + * node.status({}); + * ``` + * @example set node status to red ring with text + * ```javascript + * node.status({fill:"red",shape:"ring",text:"error"}) + * ``` + * @see node-red documentation [writing-functions: adding-status](https://nodered.org/docs/user-guide/writing-functions#adding-status) + */ + static status(status:NodeStatus); + /** the id of this node */ + public static readonly id:string; + /** the name of this node */ + public static readonly name:string; + /** the number of outputs of this node */ + public static readonly outputCount:Number; +} +declare class context { + /** Get a value from context */ + static get(name:string, store:string="default"); + /** Store a value in context */ + static set(name:string, value:Any, store:string="default"); + /** Get an array of the keys in the context store */ + static keys(store:string="default"):Array ; +} +declare class flow { + /** Get a value from flow context */ + static get(name:string, store:string="default"); + /** Store a value in flow context */ + static set(name:string, value:Any, store:string="default"); + /** Get an array of the keys in the flow context store */ + static keys(store:string="default"):Array ; +} +declare class global { + /** Get a value from global context */ + static get(name:string, store:string="default"); + /** Store a value in global context */ + static set(name:string, value:Any, store:string="default"); + /** Get an array of the keys in the global context store */ + static keys(store:string="default"):Array ; +} diff --git a/packages/node_modules/@node-red/editor-client/src/types/node-red/util.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node-red/util.d.ts new file mode 100644 index 000000000..406fa160f --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node-red/util.d.ts @@ -0,0 +1,208 @@ + +/* +How to generate... +1. Generate from packages\node_modules\@node-red\util\lib\util.js using `npx typescript` and a tsconfig.json of... +{ + "files": ["packages/node_modules/@node-red/util/lib/util.js"], + "compilerOptions": { + "allowJs": true, + "declaration": true, + "emitDeclarationOnly": true, + "outDir": "types", + "strict": false, + "moduleResolution": "node" + } +} +2. remove all the `export ` statements +3. Wrap the remaining code in declare namespace RED { declare namespace util { ... } } +4. check . adjust types like String --> string, Object --> object etc (where appropriate) +*/ + +declare namespace RED { + /** + * Utility functions for the node-red function sandbox + */ + declare namespace util { + + /** + * Encode an object to JSON without losing information about non-JSON types + * such as Buffer and Function. + * + * *This function is closely tied to its reverse within the editor* + * + * @param {Object} msg + * @param {Object} opts + * @return {Object} the encoded object + * @memberof @node-red/util_util + */ + function encodeObject(msg: any, opts: any): any; + /** + * Converts the provided argument to a String, using type-dependent + * methods. + * + * @param {any} o - the property to convert to a String + * @return {string} the stringified version + * @memberof @node-red/util_util + */ + function ensureString(o: any): string; + /** + * Converts the provided argument to a Buffer, using type-dependent + * methods. + * + * @param {any} o - the property to convert to a Buffer + * @return {string} the Buffer version + * @memberof @node-red/util_util + */ + function ensureBuffer(o: any): string; + /** + * Safely clones a message object. This handles msg.req/msg.res objects that must + * not be cloned. + * + * @param {object} msg - the message object to clone + * @return {object} the cloned message + * @memberof @node-red/util_util + */ + function cloneMessage(msg: object): object; + /** + * Compares two objects, handling various JavaScript types. + * + * @param {any} obj1 + * @param {any} obj2 + * @return {boolean} whether the two objects are the same + * @memberof @node-red/util_util + */ + function compareObjects(obj1: any, obj2: any): boolean; + /** + * Generates a psuedo-unique-random id. + * @return {string} a random-ish id + * @memberof @node-red/util_util + */ + function generateId(): string; + /** + * Gets a property of a message object. + * + * Unlike {@link @node-red/util-util.getObjectProperty}, this function will strip `msg.` from the + * front of the property expression if present. + * + * @param {object} msg - the message object + * @param {string} expr - the property expression + * @return {any} the message property, or undefined if it does not exist + * @throws Will throw an error if the *parent* of the property does not exist + * @memberof @node-red/util_util + */ + function getMessageProperty(msg: object, expr: string): any; + /** + * Sets a property of a message object. + * + * Unlike {@link @node-red/util-util.setObjectProperty}, this function will strip `msg.` from the + * front of the property expression if present. + * + * @param {object} msg - the message object + * @param {string} prop - the property expression + * @param {any} [value] - the value to set + * @param {boolean} [createMissing] - whether to create missing parent properties + * @memberof @node-red/util_util + */ + function setMessageProperty(msg: object, prop: string, value?: any, createMissing?: boolean): boolean; + /** + * Gets a property of an object. + * + * Given the object: + * + * { + * "pet": { + * "type": "cat" + * } + * } + * + * - `pet.type` will return `"cat"`. + * - `pet.name` will return `undefined` + * - `car` will return `undefined` + * - `car.type` will throw an Error (as `car` does not exist) + * + * @param {object} msg - the object + * @param {string} expr - the property expression + * @return {any} the object property, or undefined if it does not exist + * @throws Will throw an error if the *parent* of the property does not exist + * @memberof @node-red/util_util + */ + function getObjectProperty(msg: object, expr: string): any; + /** + * Sets a property of an object. + * + * @param {object} msg - the object + * @param {string} prop - the property expression + * @param {any} [value] - the value to set + * @param {boolean} [createMissing] - whether to create missing parent properties + * @memberof @node-red/util_util + */ + function setObjectProperty(msg: object, prop: string, value?: any, createMissing?: boolean): boolean; + /** + * Evaluates a property value according to its type. + * + * @param {string} value - the raw value + * @param {string} type - the type of the value + * @param {Node} node - the node evaluating the property + * @param {Object} msg - the message object to evaluate against + * @param {Function} callback - (optional) called when the property is evaluated + * @return {any} The evaluated property, if no `callback` is provided + * @memberof @node-red/util_util + */ + function evaluateNodeProperty(value: string, type: string, node: Node, msg: any, callback: Function): any; + /** + * Parses a property expression, such as `msg.foo.bar[3]` to validate it + * and convert it to a canonical version expressed as an Array of property + * names. + * + * For example, `a["b"].c` returns `['a','b','c']` + * + * @param {string} str - the property expression + * @return {any[]} the normalised expression + * @memberof @node-red/util_util + */ + function normalisePropertyExpression(str: string): any[]; + /** + * Normalise a node type name to camel case. + * + * For example: `a-random node type` will normalise to `aRandomNodeType` + * + * @param {string} name - the node type + * @return {string} The normalised name + * @memberof @node-red/util_util + */ + function normaliseNodeTypeName(name: string): string; + /** + * Prepares a JSONata expression for evaluation. + * This attaches Node-RED specific functions to the expression. + * + * @param {string} value - the JSONata expression + * @param {Node} node - the node evaluating the property + * @return {any} The JSONata expression that can be evaluated + * @memberof @node-red/util_util + */ + function prepareJSONataExpression(value: string, node: Node): any; + /** + * Evaluates a JSONata expression. + * The expression must have been prepared with {@link @node-red/util-util.prepareJSONataExpression} + * before passing to this function. + * + * @param {Object} expr - the prepared JSONata expression + * @param {Object} msg - the message object to evaluate against + * @param {Function} callback - (optional) called when the expression is evaluated + * @return {any} If no callback was provided, the result of the expression + * @memberof @node-red/util_util + */ + function evaluateJSONataExpression(expr: any, msg: any, callback: Function): any; + /** + * Parses a context property string, as generated by the TypedInput, to extract + * the store name if present. + * + * For example, `#:(file)::foo` results in ` { store: "file", key: "foo" }`. + * + * @param {string} key - the context property string to parse + * @return {any} The parsed property + * @memberof @node-red/util_util + */ + function parseContextStore(key: string): any; + } +} diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/buffer.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/buffer.d.ts new file mode 100644 index 000000000..334193f8b --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/buffer.d.ts @@ -0,0 +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};} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/child_process.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/child_process.d.ts new file mode 100644 index 000000000..9acb22d55 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/child_process.d.ts @@ -0,0 +1,6 @@ +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:[ +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:[ +Writable,Readable,Readable,Readable|Writable|null|undefined,Readable|Writable|null|undefined];}interface ChildProcessByStdio< +I extends null|Writable,O extends null|Readable,E extends null|Readable,>extends ChildProcess{stdin:I;stdout:O;stderr:E;readonly stdio:[ +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;}type StdioNull='inherit'|'ignore'|Stream;type StdioPipe=undefined|null|'pipe';interface SpawnOptionsWithStdioTuple< +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,):ChildProcessByStdio;function spawn(command:string,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,options:SpawnOptions):ChildProcess;function spawn(command:string,args?:ReadonlyArray,options?:SpawnOptionsWithoutStdio):ChildProcessWithoutNullStreams;function spawn(command:string,args:ReadonlyArray,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,args:ReadonlyArray,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,args:ReadonlyArray,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,args:ReadonlyArray,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,args:ReadonlyArray,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,args:ReadonlyArray,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,args:ReadonlyArray,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,args:ReadonlyArray,options:SpawnOptionsWithStdioTuple,):ChildProcessByStdio;function spawn(command:string,args:ReadonlyArray,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 PromiseWithChildextends Promise{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|null):ChildProcess;function execFile(file:string,args:ReadonlyArray|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|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|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|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|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|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|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|undefined|null):PromiseWithChild<{stdout:string,stderr:string}>;function __promisify__(file:string,options:ExecFileOptionsWithBufferEncoding):PromiseWithChild<{stdout:Buffer,stderr:Buffer}>;function __promisify__(file:string,args:ReadonlyArray|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|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|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|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|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,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{pid:number;output:string[];stdout:T;stderr:T;status:number|null;signal:NodeJS.Signals|null;error?:Error;}function spawnSync(command:string):SpawnSyncReturns;function spawnSync(command:string,options?:SpawnSyncOptionsWithStringEncoding):SpawnSyncReturns;function spawnSync(command:string,options?:SpawnSyncOptionsWithBufferEncoding):SpawnSyncReturns;function spawnSync(command:string,options?:SpawnSyncOptions):SpawnSyncReturns;function spawnSync(command:string,args?:ReadonlyArray,options?:SpawnSyncOptionsWithStringEncoding):SpawnSyncReturns;function spawnSync(command:string,args?:ReadonlyArray,options?:SpawnSyncOptionsWithBufferEncoding):SpawnSyncReturns;function spawnSync(command:string,args?:ReadonlyArray,options?:SpawnSyncOptions):SpawnSyncReturns;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,options?:ExecFileSyncOptionsWithStringEncoding):string;function execFileSync(command:string,args?:ReadonlyArray,options?:ExecFileSyncOptionsWithBufferEncoding):Buffer;function execFileSync(command:string,args?:ReadonlyArray,options?:ExecFileSyncOptions):Buffer;} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/console.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/console.d.ts new file mode 100644 index 000000000..424f402f4 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/console.d.ts @@ -0,0 +1 @@ +declare module'node:console'{export=console;}declare module'console'{import{InspectOptions}from'node:util';global{interface Console{Console:NodeJS.ConsoleConstructor;assert(value:any,message?:string,...optionalParams:any[]):void;clear():void;count(label?:string):void;countReset(label?:string):void;debug(message?:any,...optionalParams:any[]):void;dir(obj:any,options?:InspectOptions):void;dirxml(...data:any[]):void;error(message?:any,...optionalParams:any[]):void;group(...label:any[]):void;groupCollapsed(...label:any[]):void;groupEnd():void;info(message?:any,...optionalParams:any[]):void;log(message?:any,...optionalParams:any[]):void;table(tabularData:any,properties?:ReadonlyArray):void;time(label?:string):void;timeEnd(label?:string):void;timeLog(label?:string,...data:any[]):void;trace(message?:any,...optionalParams:any[]):void;warn(message?:any,...optionalParams:any[]):void;profile(label?:string):void;profileEnd(label?:string):void;timeStamp(label?:string):void;}var console:Console;namespace NodeJS{interface ConsoleConstructorOptions{stdout:WritableStream;stderr?:WritableStream;ignoreErrors?:boolean;colorMode?:boolean|'auto';inspectOptions?:InspectOptions;}interface ConsoleConstructor{prototype:Console;new(stdout:WritableStream,stderr?:WritableStream,ignoreErrors?:boolean):Console;new(options:ConsoleConstructorOptions):Console;}interface Global{console:typeof console;}}}export=console;} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/crypto.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/crypto.d.ts new file mode 100644 index 000000000..edad38bee --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/crypto.d.ts @@ -0,0 +1 @@ +declare module'node:crypto'{export*from'crypto';}declare module'crypto'{import*as stream from'node:stream';interface Certificate{exportChallenge(spkac:BinaryLike):Buffer;exportPublicKey(spkac:BinaryLike,encoding?:string):Buffer;verifySpkac(spkac:NodeJS.ArrayBufferView):boolean;}const Certificate:Certificate&{new():Certificate;():Certificate;};namespace constants{const OPENSSL_VERSION_NUMBER:number;const SSL_OP_ALL:number;const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:number;const SSL_OP_CIPHER_SERVER_PREFERENCE:number;const SSL_OP_CISCO_ANYCONNECT:number;const SSL_OP_COOKIE_EXCHANGE:number;const SSL_OP_CRYPTOPRO_TLSEXT_BUG:number;const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:number;const SSL_OP_EPHEMERAL_RSA:number;const SSL_OP_LEGACY_SERVER_CONNECT:number;const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:number;const SSL_OP_MICROSOFT_SESS_ID_BUG:number;const SSL_OP_MSIE_SSLV2_RSA_PADDING:number;const SSL_OP_NETSCAPE_CA_DN_BUG:number;const SSL_OP_NETSCAPE_CHALLENGE_BUG:number;const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:number;const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:number;const SSL_OP_NO_COMPRESSION:number;const SSL_OP_NO_QUERY_MTU:number;const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:number;const SSL_OP_NO_SSLv2:number;const SSL_OP_NO_SSLv3:number;const SSL_OP_NO_TICKET:number;const SSL_OP_NO_TLSv1:number;const SSL_OP_NO_TLSv1_1:number;const SSL_OP_NO_TLSv1_2:number;const SSL_OP_PKCS1_CHECK_1:number;const SSL_OP_PKCS1_CHECK_2:number;const SSL_OP_SINGLE_DH_USE:number;const SSL_OP_SINGLE_ECDH_USE:number;const SSL_OP_SSLEAY_080_CLIENT_DH_BUG:number;const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:number;const SSL_OP_TLS_BLOCK_PADDING_BUG:number;const SSL_OP_TLS_D5_BUG:number;const SSL_OP_TLS_ROLLBACK_BUG:number;const ENGINE_METHOD_RSA:number;const ENGINE_METHOD_DSA:number;const ENGINE_METHOD_DH:number;const ENGINE_METHOD_RAND:number;const ENGINE_METHOD_EC:number;const ENGINE_METHOD_CIPHERS:number;const ENGINE_METHOD_DIGESTS:number;const ENGINE_METHOD_PKEY_METHS:number;const ENGINE_METHOD_PKEY_ASN1_METHS:number;const ENGINE_METHOD_ALL:number;const ENGINE_METHOD_NONE:number;const DH_CHECK_P_NOT_SAFE_PRIME:number;const DH_CHECK_P_NOT_PRIME:number;const DH_UNABLE_TO_CHECK_GENERATOR:number;const DH_NOT_SUITABLE_GENERATOR:number;const ALPN_ENABLED:number;const RSA_PKCS1_PADDING:number;const RSA_SSLV23_PADDING:number;const RSA_NO_PADDING:number;const RSA_PKCS1_OAEP_PADDING:number;const RSA_X931_PADDING:number;const RSA_PKCS1_PSS_PADDING:number;const RSA_PSS_SALTLEN_DIGEST:number;const RSA_PSS_SALTLEN_MAX_SIGN:number;const RSA_PSS_SALTLEN_AUTO:number;const POINT_CONVERSION_COMPRESSED:number;const POINT_CONVERSION_UNCOMPRESSED:number;const POINT_CONVERSION_HYBRID:number;const defaultCoreCipherList:string;const defaultCipherList:string;}interface HashOptions extends stream.TransformOptions{outputLength?:number;}const fips:boolean;function createHash(algorithm:string,options?:HashOptions):Hash;function createHmac(algorithm:string,key:BinaryLike|KeyObject,options?:stream.TransformOptions):Hmac;type BinaryToTextEncoding='base64'|'hex';type CharacterEncoding='utf8'|'utf-8'|'utf16le'|'latin1';type LegacyCharacterEncoding='ascii'|'binary'|'ucs2'|'ucs-2';type Encoding=BinaryToTextEncoding|CharacterEncoding|LegacyCharacterEncoding;type ECDHKeyFormat='compressed'|'uncompressed'|'hybrid';class Hash extends stream.Transform{private constructor();copy():Hash;update(data:BinaryLike):Hash;update(data:string,input_encoding:Encoding):Hash;digest():Buffer;digest(encoding:BinaryToTextEncoding):string;}class Hmac extends stream.Transform{private constructor();update(data:BinaryLike):Hmac;update(data:string,input_encoding:Encoding):Hmac;digest():Buffer;digest(encoding:BinaryToTextEncoding):string;}type KeyObjectType='secret'|'public'|'private';interface KeyExportOptions{type:'pkcs1'|'spki'|'pkcs8'|'sec1';format:T;cipher?:string;passphrase?:string|Buffer;}class KeyObject{private constructor();asymmetricKeyType?:KeyType;asymmetricKeySize?:number;export(options:KeyExportOptions<'pem'>):string|Buffer;export(options?:KeyExportOptions<'der'>):Buffer;symmetricKeySize?:number;type:KeyObjectType;}type CipherCCMTypes='aes-128-ccm'|'aes-192-ccm'|'aes-256-ccm'|'chacha20-poly1305';type CipherGCMTypes='aes-128-gcm'|'aes-192-gcm'|'aes-256-gcm';type BinaryLike=string|NodeJS.ArrayBufferView;type CipherKey=BinaryLike|KeyObject;interface CipherCCMOptions extends stream.TransformOptions{authTagLength:number;}interface CipherGCMOptions extends stream.TransformOptions{authTagLength?:number;}function createCipher(algorithm:CipherCCMTypes,password:BinaryLike,options:CipherCCMOptions):CipherCCM;function createCipher(algorithm:CipherGCMTypes,password:BinaryLike,options?:CipherGCMOptions):CipherGCM;function createCipher(algorithm:string,password:BinaryLike,options?:stream.TransformOptions):Cipher;function createCipheriv(algorithm:CipherCCMTypes,key:CipherKey,iv:BinaryLike|null,options:CipherCCMOptions,):CipherCCM;function createCipheriv(algorithm:CipherGCMTypes,key:CipherKey,iv:BinaryLike|null,options?:CipherGCMOptions,):CipherGCM;function createCipheriv(algorithm:string,key:CipherKey,iv:BinaryLike|null,options?:stream.TransformOptions,):Cipher;class Cipher extends stream.Transform{private constructor();update(data:BinaryLike):Buffer;update(data:string,input_encoding:Encoding):Buffer;update(data:NodeJS.ArrayBufferView,input_encoding:undefined,output_encoding:Encoding):string;update(data:string,input_encoding:Encoding|undefined,output_encoding:Encoding):string;final():Buffer;final(output_encoding:BufferEncoding):string;setAutoPadding(auto_padding?:boolean):this;}interface CipherCCM extends Cipher{setAAD(buffer:NodeJS.ArrayBufferView,options:{plaintextLength:number}):this;getAuthTag():Buffer;}interface CipherGCM extends Cipher{setAAD(buffer:NodeJS.ArrayBufferView,options?:{plaintextLength:number}):this;getAuthTag():Buffer;}function createDecipher(algorithm:CipherCCMTypes,password:BinaryLike,options:CipherCCMOptions):DecipherCCM;function createDecipher(algorithm:CipherGCMTypes,password:BinaryLike,options?:CipherGCMOptions):DecipherGCM;function createDecipher(algorithm:string,password:BinaryLike,options?:stream.TransformOptions):Decipher;function createDecipheriv(algorithm:CipherCCMTypes,key:CipherKey,iv:BinaryLike|null,options:CipherCCMOptions,):DecipherCCM;function createDecipheriv(algorithm:CipherGCMTypes,key:CipherKey,iv:BinaryLike|null,options?:CipherGCMOptions,):DecipherGCM;function createDecipheriv(algorithm:string,key:CipherKey,iv:BinaryLike|null,options?:stream.TransformOptions,):Decipher;class Decipher extends stream.Transform{private constructor();update(data:NodeJS.ArrayBufferView):Buffer;update(data:string,input_encoding:Encoding):Buffer;update(data:NodeJS.ArrayBufferView,input_encoding:undefined,output_encoding:Encoding):string;update(data:string,input_encoding:Encoding|undefined,output_encoding:Encoding):string;final():Buffer;final(output_encoding:BufferEncoding):string;setAutoPadding(auto_padding?:boolean):this;}interface DecipherCCM extends Decipher{setAuthTag(buffer:NodeJS.ArrayBufferView):this;setAAD(buffer:NodeJS.ArrayBufferView,options:{plaintextLength:number}):this;}interface DecipherGCM extends Decipher{setAuthTag(buffer:NodeJS.ArrayBufferView):this;setAAD(buffer:NodeJS.ArrayBufferView,options?:{plaintextLength:number}):this;}interface PrivateKeyInput{key:string|Buffer;format?:KeyFormat;type?:'pkcs1'|'pkcs8'|'sec1';passphrase?:string|Buffer;}interface PublicKeyInput{key:string|Buffer;format?:KeyFormat;type?:'pkcs1'|'spki';}function createPrivateKey(key:PrivateKeyInput|string|Buffer):KeyObject;function createPublicKey(key:PublicKeyInput|string|Buffer|KeyObject):KeyObject;function createSecretKey(key:NodeJS.ArrayBufferView):KeyObject;function createSign(algorithm:string,options?:stream.WritableOptions):Signer;type DSAEncoding='der'|'ieee-p1363';interface SigningOptions{padding?:number;saltLength?:number;dsaEncoding?:DSAEncoding;}interface SignPrivateKeyInput extends PrivateKeyInput,SigningOptions{}interface SignKeyObjectInput extends SigningOptions{key:KeyObject;}interface VerifyPublicKeyInput extends PublicKeyInput,SigningOptions{}interface VerifyKeyObjectInput extends SigningOptions{key:KeyObject;}type KeyLike=string|Buffer|KeyObject;class Signer extends stream.Writable{private constructor();update(data:BinaryLike):Signer;update(data:string,input_encoding:Encoding):Signer;sign(private_key:KeyLike|SignKeyObjectInput|SignPrivateKeyInput):Buffer;sign(private_key:KeyLike|SignKeyObjectInput|SignPrivateKeyInput,output_format:BinaryToTextEncoding,):string;}function createVerify(algorithm:string,options?:stream.WritableOptions):Verify;class Verify extends stream.Writable{private constructor();update(data:BinaryLike):Verify;update(data:string,input_encoding:Encoding):Verify;verify(object:KeyLike|VerifyKeyObjectInput|VerifyPublicKeyInput,signature:NodeJS.ArrayBufferView,):boolean;verify(object:KeyLike|VerifyKeyObjectInput|VerifyPublicKeyInput,signature:string,signature_format?:BinaryToTextEncoding,):boolean;}function createDiffieHellman(prime_length:number,generator?:number|NodeJS.ArrayBufferView):DiffieHellman;function createDiffieHellman(prime:NodeJS.ArrayBufferView):DiffieHellman;function createDiffieHellman(prime:string,prime_encoding:BinaryToTextEncoding):DiffieHellman;function createDiffieHellman(prime:string,prime_encoding:BinaryToTextEncoding,generator:number|NodeJS.ArrayBufferView,):DiffieHellman;function createDiffieHellman(prime:string,prime_encoding:BinaryToTextEncoding,generator:string,generator_encoding:BinaryToTextEncoding,):DiffieHellman;class DiffieHellman{private constructor();generateKeys():Buffer;generateKeys(encoding:BinaryToTextEncoding):string;computeSecret(other_public_key:NodeJS.ArrayBufferView):Buffer;computeSecret(other_public_key:string,input_encoding:BinaryToTextEncoding):Buffer;computeSecret(other_public_key:NodeJS.ArrayBufferView,output_encoding:BinaryToTextEncoding):string;computeSecret(other_public_key:string,input_encoding:BinaryToTextEncoding,output_encoding:BinaryToTextEncoding,):string;getPrime():Buffer;getPrime(encoding:BinaryToTextEncoding):string;getGenerator():Buffer;getGenerator(encoding:BinaryToTextEncoding):string;getPublicKey():Buffer;getPublicKey(encoding:BinaryToTextEncoding):string;getPrivateKey():Buffer;getPrivateKey(encoding:BinaryToTextEncoding):string;setPublicKey(public_key:NodeJS.ArrayBufferView):void;setPublicKey(public_key:string,encoding:BufferEncoding):void;setPrivateKey(private_key:NodeJS.ArrayBufferView):void;setPrivateKey(private_key:string,encoding:BufferEncoding):void;verifyError:number;}function getDiffieHellman(group_name:string):DiffieHellman;function pbkdf2(password:BinaryLike,salt:BinaryLike,iterations:number,keylen:number,digest:string,callback:(err:Error|null,derivedKey:Buffer)=>any,):void;function pbkdf2Sync(password:BinaryLike,salt:BinaryLike,iterations:number,keylen:number,digest:string,):Buffer;function randomBytes(size:number):Buffer;function randomBytes(size:number,callback:(err:Error|null,buf:Buffer)=>void):void;function pseudoRandomBytes(size:number):Buffer;function pseudoRandomBytes(size:number,callback:(err:Error|null,buf:Buffer)=>void):void;function randomInt(max:number):number;function randomInt(min:number,max:number):number;function randomInt(max:number,callback:(err:Error|null,value:number)=>void):void;function randomInt(min:number,max:number,callback:(err:Error|null,value:number)=>void):void;function randomFillSync(buffer:T,offset?:number,size?:number):T;function randomFill(buffer:T,callback:(err:Error|null,buf:T)=>void,):void;function randomFill(buffer:T,offset:number,callback:(err:Error|null,buf:T)=>void,):void;function randomFill(buffer:T,offset:number,size:number,callback:(err:Error|null,buf:T)=>void,):void;interface ScryptOptions{cost?:number;blockSize?:number;parallelization?:number;N?:number;r?:number;p?:number;maxmem?:number;}function scrypt(password:BinaryLike,salt:BinaryLike,keylen:number,callback:(err:Error|null,derivedKey:Buffer)=>void,):void;function scrypt(password:BinaryLike,salt:BinaryLike,keylen:number,options:ScryptOptions,callback:(err:Error|null,derivedKey:Buffer)=>void,):void;function scryptSync(password:BinaryLike,salt:BinaryLike,keylen:number,options?:ScryptOptions):Buffer;interface RsaPublicKey{key:KeyLike;padding?:number;}interface RsaPrivateKey{key:KeyLike;passphrase?:string;oaepHash?:string;oaepLabel?:NodeJS.TypedArray;padding?:number;}function publicEncrypt(key:RsaPublicKey|RsaPrivateKey|KeyLike,buffer:NodeJS.ArrayBufferView):Buffer;function publicDecrypt(key:RsaPublicKey|RsaPrivateKey|KeyLike,buffer:NodeJS.ArrayBufferView):Buffer;function privateDecrypt(private_key:RsaPrivateKey|KeyLike,buffer:NodeJS.ArrayBufferView):Buffer;function privateEncrypt(private_key:RsaPrivateKey|KeyLike,buffer:NodeJS.ArrayBufferView):Buffer;function getCiphers():string[];function getCurves():string[];function getFips():1|0;function getHashes():string[];class ECDH{private constructor();static convertKey(key:BinaryLike,curve:string,inputEncoding?:BinaryToTextEncoding,outputEncoding?:'latin1'|'hex'|'base64',format?:'uncompressed'|'compressed'|'hybrid',):Buffer|string;generateKeys():Buffer;generateKeys(encoding:BinaryToTextEncoding,format?:ECDHKeyFormat):string;computeSecret(other_public_key:NodeJS.ArrayBufferView):Buffer;computeSecret(other_public_key:string,input_encoding:BinaryToTextEncoding):Buffer;computeSecret(other_public_key:NodeJS.ArrayBufferView,output_encoding:BinaryToTextEncoding):string;computeSecret(other_public_key:string,input_encoding:BinaryToTextEncoding,output_encoding:BinaryToTextEncoding,):string;getPrivateKey():Buffer;getPrivateKey(encoding:BinaryToTextEncoding):string;getPublicKey():Buffer;getPublicKey(encoding:BinaryToTextEncoding,format?:ECDHKeyFormat):string;setPrivateKey(private_key:NodeJS.ArrayBufferView):void;setPrivateKey(private_key:string,encoding:BinaryToTextEncoding):void;}function createECDH(curve_name:string):ECDH;function timingSafeEqual(a:NodeJS.ArrayBufferView,b:NodeJS.ArrayBufferView):boolean;const DEFAULT_ENCODING:BufferEncoding;type KeyType='rsa'|'dsa'|'ec'|'ed25519'|'ed448'|'x25519'|'x448';type KeyFormat='pem'|'der';interface BasePrivateKeyEncodingOptions{format:T;cipher?:string;passphrase?:string;}interface KeyPairKeyObjectResult{publicKey:KeyObject;privateKey:KeyObject;}interface ED25519KeyPairKeyObjectOptions{}interface ED448KeyPairKeyObjectOptions{}interface X25519KeyPairKeyObjectOptions{}interface X448KeyPairKeyObjectOptions{}interface ECKeyPairKeyObjectOptions{namedCurve:string;}interface RSAKeyPairKeyObjectOptions{modulusLength:number;publicExponent?:number;}interface DSAKeyPairKeyObjectOptions{modulusLength:number;divisorLength:number;}interface RSAKeyPairOptions{modulusLength:number;publicExponent?:number;publicKeyEncoding:{type:'pkcs1'|'spki';format:PubF;};privateKeyEncoding:BasePrivateKeyEncodingOptions&{type:'pkcs1'|'pkcs8';};}interface DSAKeyPairOptions{modulusLength:number;divisorLength:number;publicKeyEncoding:{type:'spki';format:PubF;};privateKeyEncoding:BasePrivateKeyEncodingOptions&{type:'pkcs8';};}interface ECKeyPairOptions{namedCurve:string;publicKeyEncoding:{type:'pkcs1'|'spki';format:PubF;};privateKeyEncoding:BasePrivateKeyEncodingOptions&{type:'sec1'|'pkcs8';};}interface ED25519KeyPairOptions{publicKeyEncoding:{type:'spki';format:PubF;};privateKeyEncoding:BasePrivateKeyEncodingOptions&{type:'pkcs8';};}interface ED448KeyPairOptions{publicKeyEncoding:{type:'spki';format:PubF;};privateKeyEncoding:BasePrivateKeyEncodingOptions&{type:'pkcs8';};}interface X25519KeyPairOptions{publicKeyEncoding:{type:'spki';format:PubF;};privateKeyEncoding:BasePrivateKeyEncodingOptions&{type:'pkcs8';};}interface X448KeyPairOptions{publicKeyEncoding:{type:'spki';format:PubF;};privateKeyEncoding:BasePrivateKeyEncodingOptions&{type:'pkcs8';};}interface KeyPairSyncResult{publicKey:T1;privateKey:T2;}function generateKeyPairSync(type:'rsa',options:RSAKeyPairOptions<'pem','pem'>,):KeyPairSyncResult;function generateKeyPairSync(type:'rsa',options:RSAKeyPairOptions<'pem','der'>,):KeyPairSyncResult;function generateKeyPairSync(type:'rsa',options:RSAKeyPairOptions<'der','pem'>,):KeyPairSyncResult;function generateKeyPairSync(type:'rsa',options:RSAKeyPairOptions<'der','der'>,):KeyPairSyncResult;function generateKeyPairSync(type:'rsa',options:RSAKeyPairKeyObjectOptions):KeyPairKeyObjectResult;function generateKeyPairSync(type:'dsa',options:DSAKeyPairOptions<'pem','pem'>,):KeyPairSyncResult;function generateKeyPairSync(type:'dsa',options:DSAKeyPairOptions<'pem','der'>,):KeyPairSyncResult;function generateKeyPairSync(type:'dsa',options:DSAKeyPairOptions<'der','pem'>,):KeyPairSyncResult;function generateKeyPairSync(type:'dsa',options:DSAKeyPairOptions<'der','der'>,):KeyPairSyncResult;function generateKeyPairSync(type:'dsa',options:DSAKeyPairKeyObjectOptions):KeyPairKeyObjectResult;function generateKeyPairSync(type:'ec',options:ECKeyPairOptions<'pem','pem'>,):KeyPairSyncResult;function generateKeyPairSync(type:'ec',options:ECKeyPairOptions<'pem','der'>,):KeyPairSyncResult;function generateKeyPairSync(type:'ec',options:ECKeyPairOptions<'der','pem'>,):KeyPairSyncResult;function generateKeyPairSync(type:'ec',options:ECKeyPairOptions<'der','der'>,):KeyPairSyncResult;function generateKeyPairSync(type:'ec',options:ECKeyPairKeyObjectOptions):KeyPairKeyObjectResult;function generateKeyPairSync(type:'ed25519',options:ED25519KeyPairOptions<'pem','pem'>,):KeyPairSyncResult;function generateKeyPairSync(type:'ed25519',options:ED25519KeyPairOptions<'pem','der'>,):KeyPairSyncResult;function generateKeyPairSync(type:'ed25519',options:ED25519KeyPairOptions<'der','pem'>,):KeyPairSyncResult;function generateKeyPairSync(type:'ed25519',options:ED25519KeyPairOptions<'der','der'>,):KeyPairSyncResult;function generateKeyPairSync(type:'ed25519',options?:ED25519KeyPairKeyObjectOptions):KeyPairKeyObjectResult;function generateKeyPairSync(type:'ed448',options:ED448KeyPairOptions<'pem','pem'>,):KeyPairSyncResult;function generateKeyPairSync(type:'ed448',options:ED448KeyPairOptions<'pem','der'>,):KeyPairSyncResult;function generateKeyPairSync(type:'ed448',options:ED448KeyPairOptions<'der','pem'>,):KeyPairSyncResult;function generateKeyPairSync(type:'ed448',options:ED448KeyPairOptions<'der','der'>,):KeyPairSyncResult;function generateKeyPairSync(type:'ed448',options?:ED448KeyPairKeyObjectOptions):KeyPairKeyObjectResult;function generateKeyPairSync(type:'x25519',options:X25519KeyPairOptions<'pem','pem'>,):KeyPairSyncResult;function generateKeyPairSync(type:'x25519',options:X25519KeyPairOptions<'pem','der'>,):KeyPairSyncResult;function generateKeyPairSync(type:'x25519',options:X25519KeyPairOptions<'der','pem'>,):KeyPairSyncResult;function generateKeyPairSync(type:'x25519',options:X25519KeyPairOptions<'der','der'>,):KeyPairSyncResult;function generateKeyPairSync(type:'x25519',options?:X25519KeyPairKeyObjectOptions):KeyPairKeyObjectResult;function generateKeyPairSync(type:'x448',options:X448KeyPairOptions<'pem','pem'>,):KeyPairSyncResult;function generateKeyPairSync(type:'x448',options:X448KeyPairOptions<'pem','der'>,):KeyPairSyncResult;function generateKeyPairSync(type:'x448',options:X448KeyPairOptions<'der','pem'>,):KeyPairSyncResult;function generateKeyPairSync(type:'x448',options:X448KeyPairOptions<'der','der'>,):KeyPairSyncResult;function generateKeyPairSync(type:'x448',options?:X448KeyPairKeyObjectOptions):KeyPairKeyObjectResult;function generateKeyPair(type:'rsa',options:RSAKeyPairOptions<'pem','pem'>,callback:(err:Error|null,publicKey:string,privateKey:string)=>void,):void;function generateKeyPair(type:'rsa',options:RSAKeyPairOptions<'pem','der'>,callback:(err:Error|null,publicKey:string,privateKey:Buffer)=>void,):void;function generateKeyPair(type:'rsa',options:RSAKeyPairOptions<'der','pem'>,callback:(err:Error|null,publicKey:Buffer,privateKey:string)=>void,):void;function generateKeyPair(type:'rsa',options:RSAKeyPairOptions<'der','der'>,callback:(err:Error|null,publicKey:Buffer,privateKey:Buffer)=>void,):void;function generateKeyPair(type:'rsa',options:RSAKeyPairKeyObjectOptions,callback:(err:Error|null,publicKey:KeyObject,privateKey:KeyObject)=>void,):void;function generateKeyPair(type:'dsa',options:DSAKeyPairOptions<'pem','pem'>,callback:(err:Error|null,publicKey:string,privateKey:string)=>void,):void;function generateKeyPair(type:'dsa',options:DSAKeyPairOptions<'pem','der'>,callback:(err:Error|null,publicKey:string,privateKey:Buffer)=>void,):void;function generateKeyPair(type:'dsa',options:DSAKeyPairOptions<'der','pem'>,callback:(err:Error|null,publicKey:Buffer,privateKey:string)=>void,):void;function generateKeyPair(type:'dsa',options:DSAKeyPairOptions<'der','der'>,callback:(err:Error|null,publicKey:Buffer,privateKey:Buffer)=>void,):void;function generateKeyPair(type:'dsa',options:DSAKeyPairKeyObjectOptions,callback:(err:Error|null,publicKey:KeyObject,privateKey:KeyObject)=>void,):void;function generateKeyPair(type:'ec',options:ECKeyPairOptions<'pem','pem'>,callback:(err:Error|null,publicKey:string,privateKey:string)=>void,):void;function generateKeyPair(type:'ec',options:ECKeyPairOptions<'pem','der'>,callback:(err:Error|null,publicKey:string,privateKey:Buffer)=>void,):void;function generateKeyPair(type:'ec',options:ECKeyPairOptions<'der','pem'>,callback:(err:Error|null,publicKey:Buffer,privateKey:string)=>void,):void;function generateKeyPair(type:'ec',options:ECKeyPairOptions<'der','der'>,callback:(err:Error|null,publicKey:Buffer,privateKey:Buffer)=>void,):void;function generateKeyPair(type:'ec',options:ECKeyPairKeyObjectOptions,callback:(err:Error|null,publicKey:KeyObject,privateKey:KeyObject)=>void,):void;function generateKeyPair(type:'ed25519',options:ED25519KeyPairOptions<'pem','pem'>,callback:(err:Error|null,publicKey:string,privateKey:string)=>void,):void;function generateKeyPair(type:'ed25519',options:ED25519KeyPairOptions<'pem','der'>,callback:(err:Error|null,publicKey:string,privateKey:Buffer)=>void,):void;function generateKeyPair(type:'ed25519',options:ED25519KeyPairOptions<'der','pem'>,callback:(err:Error|null,publicKey:Buffer,privateKey:string)=>void,):void;function generateKeyPair(type:'ed25519',options:ED25519KeyPairOptions<'der','der'>,callback:(err:Error|null,publicKey:Buffer,privateKey:Buffer)=>void,):void;function generateKeyPair(type:'ed25519',options:ED25519KeyPairKeyObjectOptions|undefined,callback:(err:Error|null,publicKey:KeyObject,privateKey:KeyObject)=>void,):void;function generateKeyPair(type:'ed448',options:ED448KeyPairOptions<'pem','pem'>,callback:(err:Error|null,publicKey:string,privateKey:string)=>void,):void;function generateKeyPair(type:'ed448',options:ED448KeyPairOptions<'pem','der'>,callback:(err:Error|null,publicKey:string,privateKey:Buffer)=>void,):void;function generateKeyPair(type:'ed448',options:ED448KeyPairOptions<'der','pem'>,callback:(err:Error|null,publicKey:Buffer,privateKey:string)=>void,):void;function generateKeyPair(type:'ed448',options:ED448KeyPairOptions<'der','der'>,callback:(err:Error|null,publicKey:Buffer,privateKey:Buffer)=>void,):void;function generateKeyPair(type:'ed448',options:ED448KeyPairKeyObjectOptions|undefined,callback:(err:Error|null,publicKey:KeyObject,privateKey:KeyObject)=>void,):void;function generateKeyPair(type:'x25519',options:X25519KeyPairOptions<'pem','pem'>,callback:(err:Error|null,publicKey:string,privateKey:string)=>void,):void;function generateKeyPair(type:'x25519',options:X25519KeyPairOptions<'pem','der'>,callback:(err:Error|null,publicKey:string,privateKey:Buffer)=>void,):void;function generateKeyPair(type:'x25519',options:X25519KeyPairOptions<'der','pem'>,callback:(err:Error|null,publicKey:Buffer,privateKey:string)=>void,):void;function generateKeyPair(type:'x25519',options:X25519KeyPairOptions<'der','der'>,callback:(err:Error|null,publicKey:Buffer,privateKey:Buffer)=>void,):void;function generateKeyPair(type:'x25519',options:X25519KeyPairKeyObjectOptions|undefined,callback:(err:Error|null,publicKey:KeyObject,privateKey:KeyObject)=>void,):void;function generateKeyPair(type:'x448',options:X448KeyPairOptions<'pem','pem'>,callback:(err:Error|null,publicKey:string,privateKey:string)=>void,):void;function generateKeyPair(type:'x448',options:X448KeyPairOptions<'pem','der'>,callback:(err:Error|null,publicKey:string,privateKey:Buffer)=>void,):void;function generateKeyPair(type:'x448',options:X448KeyPairOptions<'der','pem'>,callback:(err:Error|null,publicKey:Buffer,privateKey:string)=>void,):void;function generateKeyPair(type:'x448',options:X448KeyPairOptions<'der','der'>,callback:(err:Error|null,publicKey:Buffer,privateKey:Buffer)=>void,):void;function generateKeyPair(type:'x448',options:X448KeyPairKeyObjectOptions|undefined,callback:(err:Error|null,publicKey:KeyObject,privateKey:KeyObject)=>void,):void;namespace generateKeyPair{function __promisify__(type:'rsa',options:RSAKeyPairOptions<'pem','pem'>,):Promise<{publicKey:string;privateKey:string}>;function __promisify__(type:'rsa',options:RSAKeyPairOptions<'pem','der'>,):Promise<{publicKey:string;privateKey:Buffer}>;function __promisify__(type:'rsa',options:RSAKeyPairOptions<'der','pem'>,):Promise<{publicKey:Buffer;privateKey:string}>;function __promisify__(type:'rsa',options:RSAKeyPairOptions<'der','der'>,):Promise<{publicKey:Buffer;privateKey:Buffer}>;function __promisify__(type:'rsa',options:RSAKeyPairKeyObjectOptions):Promise;function __promisify__(type:'dsa',options:DSAKeyPairOptions<'pem','pem'>,):Promise<{publicKey:string;privateKey:string}>;function __promisify__(type:'dsa',options:DSAKeyPairOptions<'pem','der'>,):Promise<{publicKey:string;privateKey:Buffer}>;function __promisify__(type:'dsa',options:DSAKeyPairOptions<'der','pem'>,):Promise<{publicKey:Buffer;privateKey:string}>;function __promisify__(type:'dsa',options:DSAKeyPairOptions<'der','der'>,):Promise<{publicKey:Buffer;privateKey:Buffer}>;function __promisify__(type:'dsa',options:DSAKeyPairKeyObjectOptions):Promise;function __promisify__(type:'ec',options:ECKeyPairOptions<'pem','pem'>,):Promise<{publicKey:string;privateKey:string}>;function __promisify__(type:'ec',options:ECKeyPairOptions<'pem','der'>,):Promise<{publicKey:string;privateKey:Buffer}>;function __promisify__(type:'ec',options:ECKeyPairOptions<'der','pem'>,):Promise<{publicKey:Buffer;privateKey:string}>;function __promisify__(type:'ec',options:ECKeyPairOptions<'der','der'>,):Promise<{publicKey:Buffer;privateKey:Buffer}>;function __promisify__(type:'ec',options:ECKeyPairKeyObjectOptions):Promise;function __promisify__(type:'ed25519',options:ED25519KeyPairOptions<'pem','pem'>,):Promise<{publicKey:string;privateKey:string}>;function __promisify__(type:'ed25519',options:ED25519KeyPairOptions<'pem','der'>,):Promise<{publicKey:string;privateKey:Buffer}>;function __promisify__(type:'ed25519',options:ED25519KeyPairOptions<'der','pem'>,):Promise<{publicKey:Buffer;privateKey:string}>;function __promisify__(type:'ed25519',options:ED25519KeyPairOptions<'der','der'>,):Promise<{publicKey:Buffer;privateKey:Buffer}>;function __promisify__(type:'ed25519',options?:ED25519KeyPairKeyObjectOptions,):Promise;function __promisify__(type:'ed448',options:ED448KeyPairOptions<'pem','pem'>,):Promise<{publicKey:string;privateKey:string}>;function __promisify__(type:'ed448',options:ED448KeyPairOptions<'pem','der'>,):Promise<{publicKey:string;privateKey:Buffer}>;function __promisify__(type:'ed448',options:ED448KeyPairOptions<'der','pem'>,):Promise<{publicKey:Buffer;privateKey:string}>;function __promisify__(type:'ed448',options:ED448KeyPairOptions<'der','der'>,):Promise<{publicKey:Buffer;privateKey:Buffer}>;function __promisify__(type:'ed448',options?:ED448KeyPairKeyObjectOptions):Promise;function __promisify__(type:'x25519',options:X25519KeyPairOptions<'pem','pem'>,):Promise<{publicKey:string;privateKey:string}>;function __promisify__(type:'x25519',options:X25519KeyPairOptions<'pem','der'>,):Promise<{publicKey:string;privateKey:Buffer}>;function __promisify__(type:'x25519',options:X25519KeyPairOptions<'der','pem'>,):Promise<{publicKey:Buffer;privateKey:string}>;function __promisify__(type:'x25519',options:X25519KeyPairOptions<'der','der'>,):Promise<{publicKey:Buffer;privateKey:Buffer}>;function __promisify__(type:'x25519',options?:X25519KeyPairKeyObjectOptions,):Promise;function __promisify__(type:'x448',options:X448KeyPairOptions<'pem','pem'>,):Promise<{publicKey:string;privateKey:string}>;function __promisify__(type:'x448',options:X448KeyPairOptions<'pem','der'>,):Promise<{publicKey:string;privateKey:Buffer}>;function __promisify__(type:'x448',options:X448KeyPairOptions<'der','pem'>,):Promise<{publicKey:Buffer;privateKey:string}>;function __promisify__(type:'x448',options:X448KeyPairOptions<'der','der'>,):Promise<{publicKey:Buffer;privateKey:Buffer}>;function __promisify__(type:'x448',options?:X448KeyPairKeyObjectOptions):Promise;}function sign(algorithm:string|null|undefined,data:NodeJS.ArrayBufferView,key:KeyLike|SignKeyObjectInput|SignPrivateKeyInput,):Buffer;function verify(algorithm:string|null|undefined,data:NodeJS.ArrayBufferView,key:KeyLike|VerifyKeyObjectInput|VerifyPublicKeyInput,signature:NodeJS.ArrayBufferView,):boolean;function diffieHellman(options:{privateKey:KeyObject;publicKey:KeyObject}):Buffer;} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/dgram.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/dgram.d.ts new file mode 100644 index 000000000..5143b443b --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/dgram.d.ts @@ -0,0 +1 @@ +declare module'node:dgram'{export*from'dgram';}declare module'dgram'{import{AddressInfo}from'node:net';import*as dns from'node:dns';import EventEmitter=require('node:events');interface RemoteInfo{address:string;family:'IPv4'|'IPv6';port:number;size:number;}interface BindOptions{port?:number;address?:string;exclusive?:boolean;fd?:number;}type SocketType="udp4"|"udp6";interface SocketOptions{type:SocketType;reuseAddr?:boolean;ipv6Only?:boolean;recvBufferSize?:number;sendBufferSize?:number;lookup?:(hostname:string,options:dns.LookupOneOptions,callback:(err:NodeJS.ErrnoException|null,address:string,family:number)=>void)=>void;}function createSocket(type:SocketType,callback?:(msg:Buffer,rinfo:RemoteInfo)=>void):Socket;function createSocket(options:SocketOptions,callback?:(msg:Buffer,rinfo:RemoteInfo)=>void):Socket;class Socket extends EventEmitter{addMembership(multicastAddress:string,multicastInterface?:string):void;address():AddressInfo;bind(port?:number,address?:string,callback?:()=>void):void;bind(port?:number,callback?:()=>void):void;bind(callback?:()=>void):void;bind(options:BindOptions,callback?:()=>void):void;close(callback?:()=>void):void;connect(port:number,address?:string,callback?:()=>void):void;connect(port:number,callback:()=>void):void;disconnect():void;dropMembership(multicastAddress:string,multicastInterface?:string):void;getRecvBufferSize():number;getSendBufferSize():number;ref():this;remoteAddress():AddressInfo;send(msg:string|Uint8Array|ReadonlyArray,port?:number,address?:string,callback?:(error:Error|null,bytes:number)=>void):void;send(msg:string|Uint8Array|ReadonlyArray,port?:number,callback?:(error:Error|null,bytes:number)=>void):void;send(msg:string|Uint8Array|ReadonlyArray,callback?:(error:Error|null,bytes:number)=>void):void;send(msg:string|Uint8Array,offset:number,length:number,port?:number,address?:string,callback?:(error:Error|null,bytes:number)=>void):void;send(msg:string|Uint8Array,offset:number,length:number,port?:number,callback?:(error:Error|null,bytes:number)=>void):void;send(msg:string|Uint8Array,offset:number,length:number,callback?:(error:Error|null,bytes:number)=>void):void;setBroadcast(flag:boolean):void;setMulticastInterface(multicastInterface:string):void;setMulticastLoopback(flag:boolean):void;setMulticastTTL(ttl:number):void;setRecvBufferSize(size:number):void;setSendBufferSize(size:number):void;setTTL(ttl:number):void;unref():this;addSourceSpecificMembership(sourceAddress:string,groupAddress:string,multicastInterface?:string):void;dropSourceSpecificMembership(sourceAddress:string,groupAddress:string,multicastInterface?:string):void;addListener(event:string,listener:(...args:any[])=>void):this;addListener(event:"close",listener:()=>void):this;addListener(event:"connect",listener:()=>void):this;addListener(event:"error",listener:(err:Error)=>void):this;addListener(event:"listening",listener:()=>void):this;addListener(event:"message",listener:(msg:Buffer,rinfo:RemoteInfo)=>void):this;emit(event:string|symbol,...args:any[]):boolean;emit(event:"close"):boolean;emit(event:"connect"):boolean;emit(event:"error",err:Error):boolean;emit(event:"listening"):boolean;emit(event:"message",msg:Buffer,rinfo:RemoteInfo):boolean;on(event:string,listener:(...args:any[])=>void):this;on(event:"close",listener:()=>void):this;on(event:"connect",listener:()=>void):this;on(event:"error",listener:(err:Error)=>void):this;on(event:"listening",listener:()=>void):this;on(event:"message",listener:(msg:Buffer,rinfo:RemoteInfo)=>void):this;once(event:string,listener:(...args:any[])=>void):this;once(event:"close",listener:()=>void):this;once(event:"connect",listener:()=>void):this;once(event:"error",listener:(err:Error)=>void):this;once(event:"listening",listener:()=>void):this;once(event:"message",listener:(msg:Buffer,rinfo:RemoteInfo)=>void):this;prependListener(event:string,listener:(...args:any[])=>void):this;prependListener(event:"close",listener:()=>void):this;prependListener(event:"connect",listener:()=>void):this;prependListener(event:"error",listener:(err:Error)=>void):this;prependListener(event:"listening",listener:()=>void):this;prependListener(event:"message",listener:(msg:Buffer,rinfo:RemoteInfo)=>void):this;prependOnceListener(event:string,listener:(...args:any[])=>void):this;prependOnceListener(event:"close",listener:()=>void):this;prependOnceListener(event:"connect",listener:()=>void):this;prependOnceListener(event:"error",listener:(err:Error)=>void):this;prependOnceListener(event:"listening",listener:()=>void):this;prependOnceListener(event:"message",listener:(msg:Buffer,rinfo:RemoteInfo)=>void):this;}} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/dns.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/dns.d.ts new file mode 100644 index 000000000..7ad1449c8 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/dns.d.ts @@ -0,0 +1,10 @@ +declare module'node:dns'{export*from'dns';}declare module'dns'{const ADDRCONFIG:number;const V4MAPPED:number;const ALL:number;interface LookupOptions{family?:number;hints?:number;all?:boolean;verbatim?:boolean;}interface LookupOneOptions extends LookupOptions{all?:false;}interface LookupAllOptions extends LookupOptions{all:true;}interface LookupAddress{address:string;family:number;}function lookup(hostname:string,family:number,callback:(err:NodeJS.ErrnoException|null,address:string,family:number)=>void):void;function lookup(hostname:string,options:LookupOneOptions,callback:(err:NodeJS.ErrnoException|null,address:string,family:number)=>void):void;function lookup(hostname:string,options:LookupAllOptions,callback:(err:NodeJS.ErrnoException|null,addresses:LookupAddress[])=>void):void;function lookup(hostname:string,options:LookupOptions,callback:(err:NodeJS.ErrnoException|null,address:string|LookupAddress[],family:number)=>void):void;function lookup(hostname:string,callback:(err:NodeJS.ErrnoException|null,address:string,family:number)=>void):void;namespace lookup{function __promisify__(hostname:string,options:LookupAllOptions):Promise;function __promisify__(hostname:string,options?:LookupOneOptions|number):Promise;function __promisify__(hostname:string,options:LookupOptions):Promise;}function lookupService(address:string,port:number,callback:(err:NodeJS.ErrnoException|null,hostname:string,service:string)=>void):void;namespace lookupService{function __promisify__(address:string,port:number):Promise<{hostname:string,service:string}>;}interface ResolveOptions{ttl:boolean;}interface ResolveWithTtlOptions extends ResolveOptions{ttl:true;}interface RecordWithTtl{address:string;ttl:number;}type AnyRecordWithTtl=AnyARecord|AnyAaaaRecord;interface AnyARecord extends RecordWithTtl{type:"A";}interface AnyAaaaRecord extends RecordWithTtl{type:"AAAA";}interface MxRecord{priority:number;exchange:string;}interface AnyMxRecord extends MxRecord{type:"MX";}interface NaptrRecord{flags:string;service:string;regexp:string;replacement:string;order:number;preference:number;}interface AnyNaptrRecord extends NaptrRecord{type:"NAPTR";}interface SoaRecord{nsname:string;hostmaster:string;serial:number;refresh:number;retry:number;expire:number;minttl:number;}interface AnySoaRecord extends SoaRecord{type:"SOA";}interface SrvRecord{priority:number;weight:number;port:number;name:string;}interface AnySrvRecord extends SrvRecord{type:"SRV";}interface AnyTxtRecord{type:"TXT";entries:string[];}interface AnyNsRecord{type:"NS";value:string;}interface AnyPtrRecord{type:"PTR";value:string;}interface AnyCnameRecord{type:"CNAME";value:string;}type AnyRecord=AnyARecord| +AnyAaaaRecord| +AnyCnameRecord| +AnyMxRecord| +AnyNaptrRecord| +AnyNsRecord| +AnyPtrRecord| +AnySoaRecord| +AnySrvRecord| +AnyTxtRecord;function resolve(hostname:string,callback:(err:NodeJS.ErrnoException|null,addresses:string[])=>void):void;function resolve(hostname:string,rrtype:"A",callback:(err:NodeJS.ErrnoException|null,addresses:string[])=>void):void;function resolve(hostname:string,rrtype:"AAAA",callback:(err:NodeJS.ErrnoException|null,addresses:string[])=>void):void;function resolve(hostname:string,rrtype:"ANY",callback:(err:NodeJS.ErrnoException|null,addresses:AnyRecord[])=>void):void;function resolve(hostname:string,rrtype:"CNAME",callback:(err:NodeJS.ErrnoException|null,addresses:string[])=>void):void;function resolve(hostname:string,rrtype:"MX",callback:(err:NodeJS.ErrnoException|null,addresses:MxRecord[])=>void):void;function resolve(hostname:string,rrtype:"NAPTR",callback:(err:NodeJS.ErrnoException|null,addresses:NaptrRecord[])=>void):void;function resolve(hostname:string,rrtype:"NS",callback:(err:NodeJS.ErrnoException|null,addresses:string[])=>void):void;function resolve(hostname:string,rrtype:"PTR",callback:(err:NodeJS.ErrnoException|null,addresses:string[])=>void):void;function resolve(hostname:string,rrtype:"SOA",callback:(err:NodeJS.ErrnoException|null,addresses:SoaRecord)=>void):void;function resolve(hostname:string,rrtype:"SRV",callback:(err:NodeJS.ErrnoException|null,addresses:SrvRecord[])=>void):void;function resolve(hostname:string,rrtype:"TXT",callback:(err:NodeJS.ErrnoException|null,addresses:string[][])=>void):void;function resolve(hostname:string,rrtype:string,callback:(err:NodeJS.ErrnoException|null,addresses:string[]|MxRecord[]|NaptrRecord[]|SoaRecord|SrvRecord[]|string[][]|AnyRecord[])=>void,):void;namespace resolve{function __promisify__(hostname:string,rrtype?:"A"|"AAAA"|"CNAME"|"NS"|"PTR"):Promise;function __promisify__(hostname:string,rrtype:"ANY"):Promise;function __promisify__(hostname:string,rrtype:"MX"):Promise;function __promisify__(hostname:string,rrtype:"NAPTR"):Promise;function __promisify__(hostname:string,rrtype:"SOA"):Promise;function __promisify__(hostname:string,rrtype:"SRV"):Promise;function __promisify__(hostname:string,rrtype:"TXT"):Promise;function __promisify__(hostname:string,rrtype:string):Promise;}function resolve4(hostname:string,callback:(err:NodeJS.ErrnoException|null,addresses:string[])=>void):void;function resolve4(hostname:string,options:ResolveWithTtlOptions,callback:(err:NodeJS.ErrnoException|null,addresses:RecordWithTtl[])=>void):void;function resolve4(hostname:string,options:ResolveOptions,callback:(err:NodeJS.ErrnoException|null,addresses:string[]|RecordWithTtl[])=>void):void;namespace resolve4{function __promisify__(hostname:string):Promise;function __promisify__(hostname:string,options:ResolveWithTtlOptions):Promise;function __promisify__(hostname:string,options?:ResolveOptions):Promise;}function resolve6(hostname:string,callback:(err:NodeJS.ErrnoException|null,addresses:string[])=>void):void;function resolve6(hostname:string,options:ResolveWithTtlOptions,callback:(err:NodeJS.ErrnoException|null,addresses:RecordWithTtl[])=>void):void;function resolve6(hostname:string,options:ResolveOptions,callback:(err:NodeJS.ErrnoException|null,addresses:string[]|RecordWithTtl[])=>void):void;namespace resolve6{function __promisify__(hostname:string):Promise;function __promisify__(hostname:string,options:ResolveWithTtlOptions):Promise;function __promisify__(hostname:string,options?:ResolveOptions):Promise;}function resolveCname(hostname:string,callback:(err:NodeJS.ErrnoException|null,addresses:string[])=>void):void;namespace resolveCname{function __promisify__(hostname:string):Promise;}function resolveMx(hostname:string,callback:(err:NodeJS.ErrnoException|null,addresses:MxRecord[])=>void):void;namespace resolveMx{function __promisify__(hostname:string):Promise;}function resolveNaptr(hostname:string,callback:(err:NodeJS.ErrnoException|null,addresses:NaptrRecord[])=>void):void;namespace resolveNaptr{function __promisify__(hostname:string):Promise;}function resolveNs(hostname:string,callback:(err:NodeJS.ErrnoException|null,addresses:string[])=>void):void;namespace resolveNs{function __promisify__(hostname:string):Promise;}function resolvePtr(hostname:string,callback:(err:NodeJS.ErrnoException|null,addresses:string[])=>void):void;namespace resolvePtr{function __promisify__(hostname:string):Promise;}function resolveSoa(hostname:string,callback:(err:NodeJS.ErrnoException|null,address:SoaRecord)=>void):void;namespace resolveSoa{function __promisify__(hostname:string):Promise;}function resolveSrv(hostname:string,callback:(err:NodeJS.ErrnoException|null,addresses:SrvRecord[])=>void):void;namespace resolveSrv{function __promisify__(hostname:string):Promise;}function resolveTxt(hostname:string,callback:(err:NodeJS.ErrnoException|null,addresses:string[][])=>void):void;namespace resolveTxt{function __promisify__(hostname:string):Promise;}function resolveAny(hostname:string,callback:(err:NodeJS.ErrnoException|null,addresses:AnyRecord[])=>void):void;namespace resolveAny{function __promisify__(hostname:string):Promise;}function reverse(ip:string,callback:(err:NodeJS.ErrnoException|null,hostnames:string[])=>void):void;function setServers(servers:ReadonlyArray):void;function getServers():string[];const NODATA:string;const FORMERR:string;const SERVFAIL:string;const NOTFOUND:string;const NOTIMP:string;const REFUSED:string;const BADQUERY:string;const BADNAME:string;const BADFAMILY:string;const BADRESP:string;const CONNREFUSED:string;const TIMEOUT:string;const EOF:string;const FILE:string;const NOMEM:string;const DESTRUCTION:string;const BADSTR:string;const BADFLAGS:string;const NONAME:string;const BADHINTS:string;const NOTINITIALIZED:string;const LOADIPHLPAPI:string;const ADDRGETNETWORKPARAMS:string;const CANCELLED:string;interface ResolverOptions{timeout?:number;}class Resolver{constructor(options?:ResolverOptions);cancel():void;getServers:typeof getServers;resolve:typeof resolve;resolve4:typeof resolve4;resolve6:typeof resolve6;resolveAny:typeof resolveAny;resolveCname:typeof resolveCname;resolveMx:typeof resolveMx;resolveNaptr:typeof resolveNaptr;resolveNs:typeof resolveNs;resolvePtr:typeof resolvePtr;resolveSoa:typeof resolveSoa;resolveSrv:typeof resolveSrv;resolveTxt:typeof resolveTxt;reverse:typeof reverse;setLocalAddress(ipv4?:string,ipv6?:string):void;setServers:typeof setServers;}namespace promises{function getServers():string[];function lookup(hostname:string,family:number):Promise;function lookup(hostname:string,options:LookupOneOptions):Promise;function lookup(hostname:string,options:LookupAllOptions):Promise;function lookup(hostname:string,options:LookupOptions):Promise;function lookup(hostname:string):Promise;function lookupService(address:string,port:number):Promise<{hostname:string,service:string}>;function resolve(hostname:string):Promise;function resolve(hostname:string,rrtype:"A"):Promise;function resolve(hostname:string,rrtype:"AAAA"):Promise;function resolve(hostname:string,rrtype:"ANY"):Promise;function resolve(hostname:string,rrtype:"CNAME"):Promise;function resolve(hostname:string,rrtype:"MX"):Promise;function resolve(hostname:string,rrtype:"NAPTR"):Promise;function resolve(hostname:string,rrtype:"NS"):Promise;function resolve(hostname:string,rrtype:"PTR"):Promise;function resolve(hostname:string,rrtype:"SOA"):Promise;function resolve(hostname:string,rrtype:"SRV"):Promise;function resolve(hostname:string,rrtype:"TXT"):Promise;function resolve(hostname:string,rrtype:string):Promise;function resolve4(hostname:string):Promise;function resolve4(hostname:string,options:ResolveWithTtlOptions):Promise;function resolve4(hostname:string,options:ResolveOptions):Promise;function resolve6(hostname:string):Promise;function resolve6(hostname:string,options:ResolveWithTtlOptions):Promise;function resolve6(hostname:string,options:ResolveOptions):Promise;function resolveAny(hostname:string):Promise;function resolveCname(hostname:string):Promise;function resolveMx(hostname:string):Promise;function resolveNaptr(hostname:string):Promise;function resolveNs(hostname:string):Promise;function resolvePtr(hostname:string):Promise;function resolveSoa(hostname:string):Promise;function resolveSrv(hostname:string):Promise;function resolveTxt(hostname:string):Promise;function reverse(ip:string):Promise;function setServers(servers:ReadonlyArray):void;class Resolver{constructor(options?:ResolverOptions);cancel():void;getServers:typeof getServers;resolve:typeof resolve;resolve4:typeof resolve4;resolve6:typeof resolve6;resolveAny:typeof resolveAny;resolveCname:typeof resolveCname;resolveMx:typeof resolveMx;resolveNaptr:typeof resolveNaptr;resolveNs:typeof resolveNs;resolvePtr:typeof resolvePtr;resolveSoa:typeof resolveSoa;resolveSrv:typeof resolveSrv;resolveTxt:typeof resolveTxt;reverse:typeof reverse;setLocalAddress(ipv4?:string,ipv6?:string):void;setServers:typeof setServers;}}} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/domain.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/domain.d.ts new file mode 100644 index 000000000..7afc5c05b --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/domain.d.ts @@ -0,0 +1 @@ +declare module'node:domain'{export*from'domain';}declare module'domain'{import EventEmitter=require('node:events');global{namespace NodeJS{interface Domain extends EventEmitter{run(fn:(...args:any[])=>T,...args:any[]):T;add(emitter:EventEmitter|Timer):void;remove(emitter:EventEmitter|Timer):void;bind(cb:T):T;intercept(cb:T):T;}}}interface Domain extends NodeJS.Domain{}class Domain extends EventEmitter{members:Array;enter():void;exit():void;}function create():Domain;} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/events.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/events.d.ts new file mode 100644 index 000000000..bd044da2a --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/events.d.ts @@ -0,0 +1 @@ +declare module'node:events'{import EventEmitter=require('events');export=EventEmitter;}declare module'events'{interface EventEmitterOptions{captureRejections?:boolean;}interface NodeEventTarget{once(event:string|symbol,listener:(...args:any[])=>void):this;}interface DOMEventTarget{addEventListener(event:string,listener:(...args:any[])=>void,opts?:{once:boolean}):any;}interface EventEmitter extends NodeJS.EventEmitter{}class EventEmitter{constructor(options?:EventEmitterOptions);static once(emitter:NodeEventTarget,event:string|symbol):Promise;static once(emitter:DOMEventTarget,event:string):Promise;static on(emitter:NodeJS.EventEmitter,event:string):AsyncIterableIterator;static listenerCount(emitter:NodeJS.EventEmitter,event:string|symbol):number;static readonly errorMonitor:unique symbol;static readonly captureRejectionSymbol:unique symbol;static captureRejections:boolean;static defaultMaxListeners:number;}import internal=require('events');namespace EventEmitter{export{internal as EventEmitter};}global{namespace NodeJS{interface EventEmitter{addListener(event:string|symbol,listener:(...args:any[])=>void):this;on(event:string|symbol,listener:(...args:any[])=>void):this;once(event:string|symbol,listener:(...args:any[])=>void):this;removeListener(event:string|symbol,listener:(...args:any[])=>void):this;off(event:string|symbol,listener:(...args:any[])=>void):this;removeAllListeners(event?:string|symbol):this;setMaxListeners(n:number):this;getMaxListeners():number;listeners(event:string|symbol):Function[];rawListeners(event:string|symbol):Function[];emit(event:string|symbol,...args:any[]):boolean;listenerCount(event:string|symbol):number;prependListener(event:string|symbol,listener:(...args:any[])=>void):this;prependOnceListener(event:string|symbol,listener:(...args:any[])=>void):this;eventNames():Array;}}}export=EventEmitter;} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/fs.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/fs.d.ts new file mode 100644 index 000000000..bea6556ad --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/fs.d.ts @@ -0,0 +1 @@ +declare module'node:fs'{export*from'fs';}declare module'fs'{import*as stream from'node:stream';import EventEmitter=require('node:events');import{URL}from'node:url';import*as promises from'node:fs/promises';export{promises};export type PathLike=string|Buffer|URL;export type NoParamCallback=(err:NodeJS.ErrnoException|null)=>void;export type BufferEncodingOption='buffer'|{encoding:'buffer'};export interface BaseEncodingOptions{encoding?:BufferEncoding|null;}export type OpenMode=number|string;export type Mode=number|string;export interface StatsBase{isFile():boolean;isDirectory():boolean;isBlockDevice():boolean;isCharacterDevice():boolean;isSymbolicLink():boolean;isFIFO():boolean;isSocket():boolean;dev:T;ino:T;mode:T;nlink:T;uid:T;gid:T;rdev:T;size:T;blksize:T;blocks:T;atimeMs:T;mtimeMs:T;ctimeMs:T;birthtimeMs:T;atime:Date;mtime:Date;ctime:Date;birthtime:Date;}export interface Stats extends StatsBase{}export class Stats{}export class Dirent{isFile():boolean;isDirectory():boolean;isBlockDevice():boolean;isCharacterDevice():boolean;isSymbolicLink():boolean;isFIFO():boolean;isSocket():boolean;name:string;}export class Dir{readonly path:string;[Symbol.asyncIterator]():AsyncIterableIterator;close():Promise;close(cb:NoParamCallback):void;closeSync():void;read():Promise;read(cb:(err:NodeJS.ErrnoException|null,dirEnt:Dirent|null)=>void):void;readSync():Dirent|null;}export interface FSWatcher extends EventEmitter{close():void;addListener(event:string,listener:(...args:any[])=>void):this;addListener(event:"change",listener:(eventType:string,filename:string|Buffer)=>void):this;addListener(event:"error",listener:(error:Error)=>void):this;addListener(event:"close",listener:()=>void):this;on(event:string,listener:(...args:any[])=>void):this;on(event:"change",listener:(eventType:string,filename:string|Buffer)=>void):this;on(event:"error",listener:(error:Error)=>void):this;on(event:"close",listener:()=>void):this;once(event:string,listener:(...args:any[])=>void):this;once(event:"change",listener:(eventType:string,filename:string|Buffer)=>void):this;once(event:"error",listener:(error:Error)=>void):this;once(event:"close",listener:()=>void):this;prependListener(event:string,listener:(...args:any[])=>void):this;prependListener(event:"change",listener:(eventType:string,filename:string|Buffer)=>void):this;prependListener(event:"error",listener:(error:Error)=>void):this;prependListener(event:"close",listener:()=>void):this;prependOnceListener(event:string,listener:(...args:any[])=>void):this;prependOnceListener(event:"change",listener:(eventType:string,filename:string|Buffer)=>void):this;prependOnceListener(event:"error",listener:(error:Error)=>void):this;prependOnceListener(event:"close",listener:()=>void):this;}export class ReadStream extends stream.Readable{close():void;bytesRead:number;path:string|Buffer;pending:boolean;addListener(event:"close",listener:()=>void):this;addListener(event:"data",listener:(chunk:Buffer|string)=>void):this;addListener(event:"end",listener:()=>void):this;addListener(event:"error",listener:(err:Error)=>void):this;addListener(event:"open",listener:(fd:number)=>void):this;addListener(event:"pause",listener:()=>void):this;addListener(event:"readable",listener:()=>void):this;addListener(event:"ready",listener:()=>void):this;addListener(event:"resume",listener:()=>void):this;addListener(event:string|symbol,listener:(...args:any[])=>void):this;on(event:"close",listener:()=>void):this;on(event:"data",listener:(chunk:Buffer|string)=>void):this;on(event:"end",listener:()=>void):this;on(event:"error",listener:(err:Error)=>void):this;on(event:"open",listener:(fd:number)=>void):this;on(event:"pause",listener:()=>void):this;on(event:"readable",listener:()=>void):this;on(event:"ready",listener:()=>void):this;on(event:"resume",listener:()=>void):this;on(event:string|symbol,listener:(...args:any[])=>void):this;once(event:"close",listener:()=>void):this;once(event:"data",listener:(chunk:Buffer|string)=>void):this;once(event:"end",listener:()=>void):this;once(event:"error",listener:(err:Error)=>void):this;once(event:"open",listener:(fd:number)=>void):this;once(event:"pause",listener:()=>void):this;once(event:"readable",listener:()=>void):this;once(event:"ready",listener:()=>void):this;once(event:"resume",listener:()=>void):this;once(event:string|symbol,listener:(...args:any[])=>void):this;prependListener(event:"close",listener:()=>void):this;prependListener(event:"data",listener:(chunk:Buffer|string)=>void):this;prependListener(event:"end",listener:()=>void):this;prependListener(event:"error",listener:(err:Error)=>void):this;prependListener(event:"open",listener:(fd:number)=>void):this;prependListener(event:"pause",listener:()=>void):this;prependListener(event:"readable",listener:()=>void):this;prependListener(event:"ready",listener:()=>void):this;prependListener(event:"resume",listener:()=>void):this;prependListener(event:string|symbol,listener:(...args:any[])=>void):this;prependOnceListener(event:"close",listener:()=>void):this;prependOnceListener(event:"data",listener:(chunk:Buffer|string)=>void):this;prependOnceListener(event:"end",listener:()=>void):this;prependOnceListener(event:"error",listener:(err:Error)=>void):this;prependOnceListener(event:"open",listener:(fd:number)=>void):this;prependOnceListener(event:"pause",listener:()=>void):this;prependOnceListener(event:"readable",listener:()=>void):this;prependOnceListener(event:"ready",listener:()=>void):this;prependOnceListener(event:"resume",listener:()=>void):this;prependOnceListener(event:string|symbol,listener:(...args:any[])=>void):this;}export class WriteStream extends stream.Writable{close():void;bytesWritten:number;path:string|Buffer;pending:boolean;addListener(event:"close",listener:()=>void):this;addListener(event:"drain",listener:()=>void):this;addListener(event:"error",listener:(err:Error)=>void):this;addListener(event:"finish",listener:()=>void):this;addListener(event:"open",listener:(fd:number)=>void):this;addListener(event:"pipe",listener:(src:stream.Readable)=>void):this;addListener(event:"ready",listener:()=>void):this;addListener(event:"unpipe",listener:(src:stream.Readable)=>void):this;addListener(event:string|symbol,listener:(...args:any[])=>void):this;on(event:"close",listener:()=>void):this;on(event:"drain",listener:()=>void):this;on(event:"error",listener:(err:Error)=>void):this;on(event:"finish",listener:()=>void):this;on(event:"open",listener:(fd:number)=>void):this;on(event:"pipe",listener:(src:stream.Readable)=>void):this;on(event:"ready",listener:()=>void):this;on(event:"unpipe",listener:(src:stream.Readable)=>void):this;on(event:string|symbol,listener:(...args:any[])=>void):this;once(event:"close",listener:()=>void):this;once(event:"drain",listener:()=>void):this;once(event:"error",listener:(err:Error)=>void):this;once(event:"finish",listener:()=>void):this;once(event:"open",listener:(fd:number)=>void):this;once(event:"pipe",listener:(src:stream.Readable)=>void):this;once(event:"ready",listener:()=>void):this;once(event:"unpipe",listener:(src:stream.Readable)=>void):this;once(event:string|symbol,listener:(...args:any[])=>void):this;prependListener(event:"close",listener:()=>void):this;prependListener(event:"drain",listener:()=>void):this;prependListener(event:"error",listener:(err:Error)=>void):this;prependListener(event:"finish",listener:()=>void):this;prependListener(event:"open",listener:(fd:number)=>void):this;prependListener(event:"pipe",listener:(src:stream.Readable)=>void):this;prependListener(event:"ready",listener:()=>void):this;prependListener(event:"unpipe",listener:(src:stream.Readable)=>void):this;prependListener(event:string|symbol,listener:(...args:any[])=>void):this;prependOnceListener(event:"close",listener:()=>void):this;prependOnceListener(event:"drain",listener:()=>void):this;prependOnceListener(event:"error",listener:(err:Error)=>void):this;prependOnceListener(event:"finish",listener:()=>void):this;prependOnceListener(event:"open",listener:(fd:number)=>void):this;prependOnceListener(event:"pipe",listener:(src:stream.Readable)=>void):this;prependOnceListener(event:"ready",listener:()=>void):this;prependOnceListener(event:"unpipe",listener:(src:stream.Readable)=>void):this;prependOnceListener(event:string|symbol,listener:(...args:any[])=>void):this;}export function rename(oldPath:PathLike,newPath:PathLike,callback:NoParamCallback):void;export namespace rename{function __promisify__(oldPath:PathLike,newPath:PathLike):Promise;}export function renameSync(oldPath:PathLike,newPath:PathLike):void;export function truncate(path:PathLike,len:number|undefined|null,callback:NoParamCallback):void;export function truncate(path:PathLike,callback:NoParamCallback):void;export namespace truncate{function __promisify__(path:PathLike,len?:number|null):Promise;}export function truncateSync(path:PathLike,len?:number|null):void;export function ftruncate(fd:number,len:number|undefined|null,callback:NoParamCallback):void;export function ftruncate(fd:number,callback:NoParamCallback):void;export namespace ftruncate{function __promisify__(fd:number,len?:number|null):Promise;}export function ftruncateSync(fd:number,len?:number|null):void;export function chown(path:PathLike,uid:number,gid:number,callback:NoParamCallback):void;export namespace chown{function __promisify__(path:PathLike,uid:number,gid:number):Promise;}export function chownSync(path:PathLike,uid:number,gid:number):void;export function fchown(fd:number,uid:number,gid:number,callback:NoParamCallback):void;export namespace fchown{function __promisify__(fd:number,uid:number,gid:number):Promise;}export function fchownSync(fd:number,uid:number,gid:number):void;export function lchown(path:PathLike,uid:number,gid:number,callback:NoParamCallback):void;export namespace lchown{function __promisify__(path:PathLike,uid:number,gid:number):Promise;}export function lchownSync(path:PathLike,uid:number,gid:number):void;export function lutimes(path:PathLike,atime:string|number|Date,mtime:string|number|Date,callback:NoParamCallback):void;export namespace lutimes{function __promisify__(path:PathLike,atime:string|number|Date,mtime:string|number|Date):Promise;}export function lutimesSync(path:PathLike,atime:string|number|Date,mtime:string|number|Date):void;export function chmod(path:PathLike,mode:Mode,callback:NoParamCallback):void;export namespace chmod{function __promisify__(path:PathLike,mode:Mode):Promise;}export function chmodSync(path:PathLike,mode:Mode):void;export function fchmod(fd:number,mode:Mode,callback:NoParamCallback):void;export namespace fchmod{function __promisify__(fd:number,mode:Mode):Promise;}export function fchmodSync(fd:number,mode:Mode):void;export function lchmod(path:PathLike,mode:Mode,callback:NoParamCallback):void;export namespace lchmod{function __promisify__(path:PathLike,mode:Mode):Promise;}export function lchmodSync(path:PathLike,mode:Mode):void;export function stat(path:PathLike,callback:(err:NodeJS.ErrnoException|null,stats:Stats)=>void):void;export function stat(path:PathLike,options:StatOptions&{bigint?:false}|undefined,callback:(err:NodeJS.ErrnoException|null,stats:Stats)=>void):void;export function stat(path:PathLike,options:StatOptions&{bigint:true},callback:(err:NodeJS.ErrnoException|null,stats:BigIntStats)=>void):void;export function stat(path:PathLike,options:StatOptions|undefined,callback:(err:NodeJS.ErrnoException|null,stats:Stats|BigIntStats)=>void):void;export namespace stat{function __promisify__(path:PathLike,options?:StatOptions&{bigint?:false}):Promise;function __promisify__(path:PathLike,options:StatOptions&{bigint:true}):Promise;function __promisify__(path:PathLike,options?:StatOptions):Promise;}export function statSync(path:PathLike,options?:StatOptions&{bigint?:false}):Stats;export function statSync(path:PathLike,options:StatOptions&{bigint:true}):BigIntStats;export function statSync(path:PathLike,options?:StatOptions):Stats|BigIntStats;export function fstat(fd:number,callback:(err:NodeJS.ErrnoException|null,stats:Stats)=>void):void;export function fstat(fd:number,options:StatOptions&{bigint?:false}|undefined,callback:(err:NodeJS.ErrnoException|null,stats:Stats)=>void):void;export function fstat(fd:number,options:StatOptions&{bigint:true},callback:(err:NodeJS.ErrnoException|null,stats:BigIntStats)=>void):void;export function fstat(fd:number,options:StatOptions|undefined,callback:(err:NodeJS.ErrnoException|null,stats:Stats|BigIntStats)=>void):void;export namespace fstat{function __promisify__(fd:number,options?:StatOptions&{bigint?:false}):Promise;function __promisify__(fd:number,options:StatOptions&{bigint:true}):Promise;function __promisify__(fd:number,options?:StatOptions):Promise;}export function fstatSync(fd:number,options?:StatOptions&{bigint?:false}):Stats;export function fstatSync(fd:number,options:StatOptions&{bigint:true}):BigIntStats;export function fstatSync(fd:number,options?:StatOptions):Stats|BigIntStats;export function lstat(path:PathLike,callback:(err:NodeJS.ErrnoException|null,stats:Stats)=>void):void;export function lstat(path:PathLike,options:StatOptions&{bigint?:false}|undefined,callback:(err:NodeJS.ErrnoException|null,stats:Stats)=>void):void;export function lstat(path:PathLike,options:StatOptions&{bigint:true},callback:(err:NodeJS.ErrnoException|null,stats:BigIntStats)=>void):void;export function lstat(path:PathLike,options:StatOptions|undefined,callback:(err:NodeJS.ErrnoException|null,stats:Stats|BigIntStats)=>void):void;export namespace lstat{function __promisify__(path:PathLike,options?:StatOptions&{bigint?:false}):Promise;function __promisify__(path:PathLike,options:StatOptions&{bigint:true}):Promise;function __promisify__(path:PathLike,options?:StatOptions):Promise;}export function lstatSync(path:PathLike,options?:StatOptions&{bigint?:false}):Stats;export function lstatSync(path:PathLike,options:StatOptions&{bigint:true}):BigIntStats;export function lstatSync(path:PathLike,options?:StatOptions):Stats|BigIntStats;export function link(existingPath:PathLike,newPath:PathLike,callback:NoParamCallback):void;export namespace link{function __promisify__(existingPath:PathLike,newPath:PathLike):Promise;}export function linkSync(existingPath:PathLike,newPath:PathLike):void;export function symlink(target:PathLike,path:PathLike,type:symlink.Type|undefined|null,callback:NoParamCallback):void;export function symlink(target:PathLike,path:PathLike,callback:NoParamCallback):void;export namespace symlink{function __promisify__(target:PathLike,path:PathLike,type?:string|null):Promise;type Type="dir"|"file"|"junction";}export function symlinkSync(target:PathLike,path:PathLike,type?:symlink.Type|null):void;export function readlink(path:PathLike,options:BaseEncodingOptions|BufferEncoding|undefined|null,callback:(err:NodeJS.ErrnoException|null,linkString:string)=>void):void;export function readlink(path:PathLike,options:BufferEncodingOption,callback:(err:NodeJS.ErrnoException|null,linkString:Buffer)=>void):void;export function readlink(path:PathLike,options:BaseEncodingOptions|string|undefined|null,callback:(err:NodeJS.ErrnoException|null,linkString:string|Buffer)=>void):void;export function readlink(path:PathLike,callback:(err:NodeJS.ErrnoException|null,linkString:string)=>void):void;export namespace readlink{function __promisify__(path:PathLike,options?:BaseEncodingOptions|BufferEncoding|null):Promise;function __promisify__(path:PathLike,options:BufferEncodingOption):Promise;function __promisify__(path:PathLike,options?:BaseEncodingOptions|string|null):Promise;}export function readlinkSync(path:PathLike,options?:BaseEncodingOptions|BufferEncoding|null):string;export function readlinkSync(path:PathLike,options:BufferEncodingOption):Buffer;export function readlinkSync(path:PathLike,options?:BaseEncodingOptions|string|null):string|Buffer;export function realpath(path:PathLike,options:BaseEncodingOptions|BufferEncoding|undefined|null,callback:(err:NodeJS.ErrnoException|null,resolvedPath:string)=>void):void;export function realpath(path:PathLike,options:BufferEncodingOption,callback:(err:NodeJS.ErrnoException|null,resolvedPath:Buffer)=>void):void;export function realpath(path:PathLike,options:BaseEncodingOptions|string|undefined|null,callback:(err:NodeJS.ErrnoException|null,resolvedPath:string|Buffer)=>void):void;export function realpath(path:PathLike,callback:(err:NodeJS.ErrnoException|null,resolvedPath:string)=>void):void;export namespace realpath{function __promisify__(path:PathLike,options?:BaseEncodingOptions|BufferEncoding|null):Promise;function __promisify__(path:PathLike,options:BufferEncodingOption):Promise;function __promisify__(path:PathLike,options?:BaseEncodingOptions|string|null):Promise;function native(path:PathLike,options:BaseEncodingOptions|BufferEncoding|undefined|null,callback:(err:NodeJS.ErrnoException|null,resolvedPath:string)=>void):void;function native(path:PathLike,options:BufferEncodingOption,callback:(err:NodeJS.ErrnoException|null,resolvedPath:Buffer)=>void):void;function native(path:PathLike,options:BaseEncodingOptions|string|undefined|null,callback:(err:NodeJS.ErrnoException|null,resolvedPath:string|Buffer)=>void):void;function native(path:PathLike,callback:(err:NodeJS.ErrnoException|null,resolvedPath:string)=>void):void;}export function realpathSync(path:PathLike,options?:BaseEncodingOptions|BufferEncoding|null):string;export function realpathSync(path:PathLike,options:BufferEncodingOption):Buffer;export function realpathSync(path:PathLike,options?:BaseEncodingOptions|string|null):string|Buffer;export namespace realpathSync{function native(path:PathLike,options?:BaseEncodingOptions|BufferEncoding|null):string;function native(path:PathLike,options:BufferEncodingOption):Buffer;function native(path:PathLike,options?:BaseEncodingOptions|string|null):string|Buffer;}export function unlink(path:PathLike,callback:NoParamCallback):void;export namespace unlink{function __promisify__(path:PathLike):Promise;}export function unlinkSync(path:PathLike):void;export interface RmDirOptions{maxRetries?:number;recursive?:boolean;retryDelay?:number;}export function rmdir(path:PathLike,callback:NoParamCallback):void;export function rmdir(path:PathLike,options:RmDirOptions,callback:NoParamCallback):void;export namespace rmdir{function __promisify__(path:PathLike,options?:RmDirOptions):Promise;}export function rmdirSync(path:PathLike,options?:RmDirOptions):void;export interface RmOptions{force?:boolean;maxRetries?:number;recursive?:boolean;retryDelay?:number;}export function rm(path:PathLike,callback:NoParamCallback):void;export function rm(path:PathLike,options:RmOptions,callback:NoParamCallback):void;export namespace rm{function __promisify__(path:PathLike,options?:RmOptions):Promise;}export function rmSync(path:PathLike,options?:RmOptions):void;export interface MakeDirectoryOptions{recursive?:boolean;mode?:Mode;}export function mkdir(path:PathLike,options:MakeDirectoryOptions&{recursive:true},callback:(err:NodeJS.ErrnoException|null,path?:string)=>void):void;export function mkdir(path:PathLike,options:Mode|(MakeDirectoryOptions&{recursive?:false;})|null|undefined,callback:NoParamCallback):void;export function mkdir(path:PathLike,options:Mode|MakeDirectoryOptions|null|undefined,callback:(err:NodeJS.ErrnoException|null,path?:string)=>void):void;export function mkdir(path:PathLike,callback:NoParamCallback):void;export namespace mkdir{function __promisify__(path:PathLike,options:MakeDirectoryOptions&{recursive:true;}):Promise;function __promisify__(path:PathLike,options?:Mode|(MakeDirectoryOptions&{recursive?:false;})|null):Promise;function __promisify__(path:PathLike,options?:Mode|MakeDirectoryOptions|null):Promise;}export function mkdirSync(path:PathLike,options:MakeDirectoryOptions&{recursive:true;}):string|undefined;export function mkdirSync(path:PathLike,options?:Mode|(MakeDirectoryOptions&{recursive?:false;})|null):void;export function mkdirSync(path:PathLike,options?:Mode|MakeDirectoryOptions|null):string|undefined;export function mkdtemp(prefix:string,options:BaseEncodingOptions|BufferEncoding|undefined|null,callback:(err:NodeJS.ErrnoException|null,folder:string)=>void):void;export function mkdtemp(prefix:string,options:"buffer"|{encoding:"buffer"},callback:(err:NodeJS.ErrnoException|null,folder:Buffer)=>void):void;export function mkdtemp(prefix:string,options:BaseEncodingOptions|string|undefined|null,callback:(err:NodeJS.ErrnoException|null,folder:string|Buffer)=>void):void;export function mkdtemp(prefix:string,callback:(err:NodeJS.ErrnoException|null,folder:string)=>void):void;export namespace mkdtemp{function __promisify__(prefix:string,options?:BaseEncodingOptions|BufferEncoding|null):Promise;function __promisify__(prefix:string,options:BufferEncodingOption):Promise;function __promisify__(prefix:string,options?:BaseEncodingOptions|string|null):Promise;}export function mkdtempSync(prefix:string,options?:BaseEncodingOptions|BufferEncoding|null):string;export function mkdtempSync(prefix:string,options:BufferEncodingOption):Buffer;export function mkdtempSync(prefix:string,options?:BaseEncodingOptions|string|null):string|Buffer;export function readdir(path:PathLike,options:{encoding:BufferEncoding|null;withFileTypes?:false}|BufferEncoding|undefined|null,callback:(err:NodeJS.ErrnoException|null,files:string[])=>void,):void;export function readdir(path:PathLike,options:{encoding:"buffer";withFileTypes?:false}|"buffer",callback:(err:NodeJS.ErrnoException|null,files:Buffer[])=>void):void;export function readdir(path:PathLike,options:BaseEncodingOptions&{withFileTypes?:false}|BufferEncoding|undefined|null,callback:(err:NodeJS.ErrnoException|null,files:string[]|Buffer[])=>void,):void;export function readdir(path:PathLike,callback:(err:NodeJS.ErrnoException|null,files:string[])=>void):void;export function readdir(path:PathLike,options:BaseEncodingOptions&{withFileTypes:true},callback:(err:NodeJS.ErrnoException|null,files:Dirent[])=>void):void;export namespace readdir{function __promisify__(path:PathLike,options?:{encoding:BufferEncoding|null;withFileTypes?:false}|BufferEncoding|null):Promise;function __promisify__(path:PathLike,options:"buffer"|{encoding:"buffer";withFileTypes?:false}):Promise;function __promisify__(path:PathLike,options?:BaseEncodingOptions&{withFileTypes?:false}|BufferEncoding|null):Promise;function __promisify__(path:PathLike,options:BaseEncodingOptions&{withFileTypes:true}):Promise;}export function readdirSync(path:PathLike,options?:{encoding:BufferEncoding|null;withFileTypes?:false}|BufferEncoding|null):string[];export function readdirSync(path:PathLike,options:{encoding:"buffer";withFileTypes?:false}|"buffer"):Buffer[];export function readdirSync(path:PathLike,options?:BaseEncodingOptions&{withFileTypes?:false}|BufferEncoding|null):string[]|Buffer[];export function readdirSync(path:PathLike,options:BaseEncodingOptions&{withFileTypes:true}):Dirent[];export function close(fd:number,callback:NoParamCallback):void;export namespace close{function __promisify__(fd:number):Promise;}export function closeSync(fd:number):void;export function open(path:PathLike,flags:OpenMode,mode:Mode|undefined|null,callback:(err:NodeJS.ErrnoException|null,fd:number)=>void):void;export function open(path:PathLike,flags:OpenMode,callback:(err:NodeJS.ErrnoException|null,fd:number)=>void):void;export namespace open{function __promisify__(path:PathLike,flags:OpenMode,mode?:Mode|null):Promise;}export function openSync(path:PathLike,flags:OpenMode,mode?:Mode|null):number;export function utimes(path:PathLike,atime:string|number|Date,mtime:string|number|Date,callback:NoParamCallback):void;export namespace utimes{function __promisify__(path:PathLike,atime:string|number|Date,mtime:string|number|Date):Promise;}export function utimesSync(path:PathLike,atime:string|number|Date,mtime:string|number|Date):void;export function futimes(fd:number,atime:string|number|Date,mtime:string|number|Date,callback:NoParamCallback):void;export namespace futimes{function __promisify__(fd:number,atime:string|number|Date,mtime:string|number|Date):Promise;}export function futimesSync(fd:number,atime:string|number|Date,mtime:string|number|Date):void;export function fsync(fd:number,callback:NoParamCallback):void;export namespace fsync{function __promisify__(fd:number):Promise;}export function fsyncSync(fd:number):void;export function write(fd:number,buffer:TBuffer,offset:number|undefined|null,length:number|undefined|null,position:number|undefined|null,callback:(err:NodeJS.ErrnoException|null,written:number,buffer:TBuffer)=>void,):void;export function write(fd:number,buffer:TBuffer,offset:number|undefined|null,length:number|undefined|null,callback:(err:NodeJS.ErrnoException|null,written:number,buffer:TBuffer)=>void,):void;export function write(fd:number,buffer:TBuffer,offset:number|undefined|null,callback:(err:NodeJS.ErrnoException|null,written:number,buffer:TBuffer)=>void):void;export function write(fd:number,buffer:TBuffer,callback:(err:NodeJS.ErrnoException|null,written:number,buffer:TBuffer)=>void):void;export function write(fd:number,string:string,position:number|undefined|null,encoding:BufferEncoding|undefined|null,callback:(err:NodeJS.ErrnoException|null,written:number,str:string)=>void,):void;export function write(fd:number,string:string,position:number|undefined|null,callback:(err:NodeJS.ErrnoException|null,written:number,str:string)=>void):void;export function write(fd:number,string:string,callback:(err:NodeJS.ErrnoException|null,written:number,str:string)=>void):void;export namespace write{function __promisify__(fd:number,buffer?:TBuffer,offset?:number,length?:number,position?:number|null,):Promise<{bytesWritten:number,buffer:TBuffer}>;function __promisify__(fd:number,string:string,position?:number|null,encoding?:BufferEncoding|null):Promise<{bytesWritten:number,buffer:string}>;}export function writeSync(fd:number,buffer:NodeJS.ArrayBufferView,offset?:number|null,length?:number|null,position?:number|null):number;export function writeSync(fd:number,string:string,position?:number|null,encoding?:BufferEncoding|null):number;export function read(fd:number,buffer:TBuffer,offset:number,length:number,position:number|null,callback:(err:NodeJS.ErrnoException|null,bytesRead:number,buffer:TBuffer)=>void,):void;export namespace read{function __promisify__(fd:number,buffer:TBuffer,offset:number,length:number,position:number|null):Promise<{bytesRead:number,buffer:TBuffer}>;}export interface ReadSyncOptions{offset?:number;length?:number;position?:number|null;}export function readSync(fd:number,buffer:NodeJS.ArrayBufferView,offset:number,length:number,position:number|null):number;export function readSync(fd:number,buffer:NodeJS.ArrayBufferView,opts?:ReadSyncOptions):number;export function readFile(path:PathLike|number,options:{encoding?:null;flag?:string;}|undefined|null,callback:(err:NodeJS.ErrnoException|null,data:Buffer)=>void):void;export function readFile(path:PathLike|number,options:{encoding:BufferEncoding;flag?:string;}|string,callback:(err:NodeJS.ErrnoException|null,data:string)=>void):void;export function readFile(path:PathLike|number,options:BaseEncodingOptions&{flag?:string;}|string|undefined|null,callback:(err:NodeJS.ErrnoException|null,data:string|Buffer)=>void,):void;export function readFile(path:PathLike|number,callback:(err:NodeJS.ErrnoException|null,data:Buffer)=>void):void;export namespace readFile{function __promisify__(path:PathLike|number,options?:{encoding?:null;flag?:string;}|null):Promise;function __promisify__(path:PathLike|number,options:{encoding:BufferEncoding;flag?:string;}|string):Promise;function __promisify__(path:PathLike|number,options?:BaseEncodingOptions&{flag?:string;}|string|null):Promise;}export function readFileSync(path:PathLike|number,options?:{encoding?:null;flag?:string;}|null):Buffer;export function readFileSync(path:PathLike|number,options:{encoding:BufferEncoding;flag?:string;}|BufferEncoding):string;export function readFileSync(path:PathLike|number,options?:BaseEncodingOptions&{flag?:string;}|BufferEncoding|null):string|Buffer;export type WriteFileOptions=BaseEncodingOptions&{mode?:Mode;flag?:string;}|string|null;export function writeFile(path:PathLike|number,data:string|NodeJS.ArrayBufferView,options:WriteFileOptions,callback:NoParamCallback):void;export function writeFile(path:PathLike|number,data:string|NodeJS.ArrayBufferView,callback:NoParamCallback):void;export namespace writeFile{function __promisify__(path:PathLike|number,data:string|NodeJS.ArrayBufferView,options?:WriteFileOptions):Promise;}export function writeFileSync(path:PathLike|number,data:string|NodeJS.ArrayBufferView,options?:WriteFileOptions):void;export function appendFile(file:PathLike|number,data:string|Uint8Array,options:WriteFileOptions,callback:NoParamCallback):void;export function appendFile(file:PathLike|number,data:string|Uint8Array,callback:NoParamCallback):void;export namespace appendFile{function __promisify__(file:PathLike|number,data:string|Uint8Array,options?:WriteFileOptions):Promise;}export function appendFileSync(file:PathLike|number,data:string|Uint8Array,options?:WriteFileOptions):void;export function watchFile(filename:PathLike,options:{persistent?:boolean;interval?:number;}|undefined,listener:(curr:Stats,prev:Stats)=>void):void;export function watchFile(filename:PathLike,listener:(curr:Stats,prev:Stats)=>void):void;export function unwatchFile(filename:PathLike,listener?:(curr:Stats,prev:Stats)=>void):void;export function watch(filename:PathLike,options:{encoding?:BufferEncoding|null,persistent?:boolean,recursive?:boolean}|BufferEncoding|undefined|null,listener?:(event:"rename"|"change",filename:string)=>void,):FSWatcher;export function watch(filename:PathLike,options:{encoding:"buffer",persistent?:boolean,recursive?:boolean;}|"buffer",listener?:(event:"rename"|"change",filename:Buffer)=>void):FSWatcher;export function watch(filename:PathLike,options:{encoding?:BufferEncoding|null,persistent?:boolean,recursive?:boolean}|string|null,listener?:(event:"rename"|"change",filename:string|Buffer)=>void,):FSWatcher;export function watch(filename:PathLike,listener?:(event:"rename"|"change",filename:string)=>any):FSWatcher;export function exists(path:PathLike,callback:(exists:boolean)=>void):void;export namespace exists{function __promisify__(path:PathLike):Promise;}export function existsSync(path:PathLike):boolean;export namespace constants{const F_OK:number;const R_OK:number;const W_OK:number;const X_OK:number;const COPYFILE_EXCL:number;const COPYFILE_FICLONE:number;const COPYFILE_FICLONE_FORCE:number;const O_RDONLY:number;const O_WRONLY:number;const O_RDWR:number;const O_CREAT:number;const O_EXCL:number;const O_NOCTTY:number;const O_TRUNC:number;const O_APPEND:number;const O_DIRECTORY:number;const O_NOATIME:number;const O_NOFOLLOW:number;const O_SYNC:number;const O_DSYNC:number;const O_SYMLINK:number;const O_DIRECT:number;const O_NONBLOCK:number;const S_IFMT:number;const S_IFREG:number;const S_IFDIR:number;const S_IFCHR:number;const S_IFBLK:number;const S_IFIFO:number;const S_IFLNK:number;const S_IFSOCK:number;const S_IRWXU:number;const S_IRUSR:number;const S_IWUSR:number;const S_IXUSR:number;const S_IRWXG:number;const S_IRGRP:number;const S_IWGRP:number;const S_IXGRP:number;const S_IRWXO:number;const S_IROTH:number;const S_IWOTH:number;const S_IXOTH:number;const UV_FS_O_FILEMAP:number;}export function access(path:PathLike,mode:number|undefined,callback:NoParamCallback):void;export function access(path:PathLike,callback:NoParamCallback):void;export namespace access{function __promisify__(path:PathLike,mode?:number):Promise;}export function accessSync(path:PathLike,mode?:number):void;export function createReadStream(path:PathLike,options?:string|{flags?:string;encoding?:BufferEncoding;fd?:number;mode?:number;autoClose?:boolean;emitClose?:boolean;start?:number;end?:number;highWaterMark?:number;}):ReadStream;export function createWriteStream(path:PathLike,options?:string|{flags?:string;encoding?:BufferEncoding;fd?:number;mode?:number;autoClose?:boolean;emitClose?:boolean;start?:number;highWaterMark?:number;}):WriteStream;export function fdatasync(fd:number,callback:NoParamCallback):void;export namespace fdatasync{function __promisify__(fd:number):Promise;}export function fdatasyncSync(fd:number):void;export function copyFile(src:PathLike,dest:PathLike,callback:NoParamCallback):void;export function copyFile(src:PathLike,dest:PathLike,flags:number,callback:NoParamCallback):void;export namespace copyFile{function __promisify__(src:PathLike,dst:PathLike,flags?:number):Promise;}export function copyFileSync(src:PathLike,dest:PathLike,flags?:number):void;export function writev(fd:number,buffers:ReadonlyArray,cb:(err:NodeJS.ErrnoException|null,bytesWritten:number,buffers:NodeJS.ArrayBufferView[])=>void):void;export function writev(fd:number,buffers:ReadonlyArray,position:number,cb:(err:NodeJS.ErrnoException|null,bytesWritten:number,buffers:NodeJS.ArrayBufferView[])=>void):void;export interface WriteVResult{bytesWritten:number;buffers:NodeJS.ArrayBufferView[];}export namespace writev{function __promisify__(fd:number,buffers:ReadonlyArray,position?:number):Promise;}export function writevSync(fd:number,buffers:ReadonlyArray,position?:number):number;export function readv(fd:number,buffers:ReadonlyArray,cb:(err:NodeJS.ErrnoException|null,bytesRead:number,buffers:NodeJS.ArrayBufferView[])=>void):void;export function readv(fd:number,buffers:ReadonlyArray,position:number,cb:(err:NodeJS.ErrnoException|null,bytesRead:number,buffers:NodeJS.ArrayBufferView[])=>void):void;export interface ReadVResult{bytesRead:number;buffers:NodeJS.ArrayBufferView[];}export namespace readv{function __promisify__(fd:number,buffers:ReadonlyArray,position?:number):Promise;}export function readvSync(fd:number,buffers:ReadonlyArray,position?:number):number;export interface OpenDirOptions{encoding?:BufferEncoding;bufferSize?:number;}export function opendirSync(path:string,options?:OpenDirOptions):Dir;export function opendir(path:string,cb:(err:NodeJS.ErrnoException|null,dir:Dir)=>void):void;export function opendir(path:string,options:OpenDirOptions,cb:(err:NodeJS.ErrnoException|null,dir:Dir)=>void):void;export namespace opendir{function __promisify__(path:string,options?:OpenDirOptions):Promise;}export interface BigIntStats extends StatsBase{}export class BigIntStats{atimeNs:bigint;mtimeNs:bigint;ctimeNs:bigint;birthtimeNs:bigint;}export interface BigIntOptions{bigint:true;}export interface StatOptions{bigint?:boolean;}} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/globals.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/globals.d.ts new file mode 100644 index 000000000..79d3016f2 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/globals.d.ts @@ -0,0 +1 @@ +interface ErrorConstructor{captureStackTrace(targetObject:object,constructorOpt?:Function):void;prepareStackTrace?:(err:Error,stackTraces:NodeJS.CallSite[])=>any;stackTraceLimit:number;}interface String{trimLeft():string;trimRight():string;trimStart():string;trimEnd():string;}interface ImportMeta{url:string;}interface NodeRequire extends NodeJS.Require{}interface RequireResolve extends NodeJS.RequireResolve{}interface NodeModule extends NodeJS.Module{}declare var process:NodeJS.Process;declare var console:Console;declare var __filename:string;declare var __dirname:string;declare function setTimeout(callback:(...args:any[])=>void,ms?:number,...args:any[]):NodeJS.Timeout;declare namespace setTimeout{function __promisify__(ms:number):Promise;function __promisify__(ms:number,value:T):Promise;}declare function clearTimeout(timeoutId:NodeJS.Timeout):void;declare function setInterval(callback:(...args:any[])=>void,ms?:number,...args:any[]):NodeJS.Timeout;declare function clearInterval(intervalId:NodeJS.Timeout):void;declare function setImmediate(callback:(...args:any[])=>void,...args:any[]):NodeJS.Immediate;declare namespace setImmediate{function __promisify__():Promise;function __promisify__(value:T):Promise;}declare function clearImmediate(immediateId:NodeJS.Immediate):void;declare function queueMicrotask(callback:()=>void):void;declare var require:NodeRequire;declare var module:NodeModule;declare var exports:any;type BufferEncoding="ascii"|"utf8"|"utf-8"|"utf16le"|"ucs2"|"ucs-2"|"base64"|"latin1"|"binary"|"hex";type WithImplicitCoercion=T|{valueOf():T};declare class Buffer extends Uint8Array{constructor(str:string,encoding?:BufferEncoding);constructor(size:number);constructor(array:Uint8Array);constructor(arrayBuffer:ArrayBuffer|SharedArrayBuffer);constructor(array:ReadonlyArray);constructor(buffer:Buffer);static from(arrayBuffer:WithImplicitCoercion,byteOffset?:number,length?:number):Buffer;static from(data:Uint8Array|ReadonlyArray):Buffer;static from(data:WithImplicitCoercion|string>):Buffer;static from(str:WithImplicitCoercion|{[Symbol.toPrimitive](hint:'string'):string},encoding?:BufferEncoding):Buffer;static of(...items:number[]):Buffer;static isBuffer(obj:any):obj is Buffer;static isEncoding(encoding:string):encoding is BufferEncoding;static byteLength(string:string|NodeJS.ArrayBufferView|ArrayBuffer|SharedArrayBuffer,encoding?:BufferEncoding):number;static concat(list:ReadonlyArray,totalLength?:number):Buffer;static compare(buf1:Uint8Array,buf2:Uint8Array):number;static alloc(size:number,fill?:string|Buffer|number,encoding?:BufferEncoding):Buffer;static allocUnsafe(size:number):Buffer;static allocUnsafeSlow(size:number):Buffer;static poolSize:number;write(string:string,encoding?:BufferEncoding):number;write(string:string,offset:number,encoding?:BufferEncoding):number;write(string:string,offset:number,length:number,encoding?:BufferEncoding):number;toString(encoding?:BufferEncoding,start?:number,end?:number):string;toJSON():{type:'Buffer';data:number[]};equals(otherBuffer:Uint8Array):boolean;compare(otherBuffer:Uint8Array,targetStart?:number,targetEnd?:number,sourceStart?:number,sourceEnd?:number):number;copy(targetBuffer:Uint8Array,targetStart?:number,sourceStart?:number,sourceEnd?:number):number;slice(begin?:number,end?:number):Buffer;subarray(begin?:number,end?:number):Buffer;writeBigInt64BE(value:bigint,offset?:number):number;writeBigInt64LE(value:bigint,offset?:number):number;writeBigUInt64BE(value:bigint,offset?:number):number;writeBigUInt64LE(value:bigint,offset?:number):number;writeUIntLE(value:number,offset:number,byteLength:number):number;writeUIntBE(value:number,offset:number,byteLength:number):number;writeIntLE(value:number,offset:number,byteLength:number):number;writeIntBE(value:number,offset:number,byteLength:number):number;readBigUInt64BE(offset?:number):bigint;readBigUInt64LE(offset?:number):bigint;readBigInt64BE(offset?:number):bigint;readBigInt64LE(offset?:number):bigint;readUIntLE(offset:number,byteLength:number):number;readUIntBE(offset:number,byteLength:number):number;readIntLE(offset:number,byteLength:number):number;readIntBE(offset:number,byteLength:number):number;readUInt8(offset?:number):number;readUInt16LE(offset?:number):number;readUInt16BE(offset?:number):number;readUInt32LE(offset?:number):number;readUInt32BE(offset?:number):number;readInt8(offset?:number):number;readInt16LE(offset?:number):number;readInt16BE(offset?:number):number;readInt32LE(offset?:number):number;readInt32BE(offset?:number):number;readFloatLE(offset?:number):number;readFloatBE(offset?:number):number;readDoubleLE(offset?:number):number;readDoubleBE(offset?:number):number;reverse():this;swap16():Buffer;swap32():Buffer;swap64():Buffer;writeUInt8(value:number,offset?:number):number;writeUInt16LE(value:number,offset?:number):number;writeUInt16BE(value:number,offset?:number):number;writeUInt32LE(value:number,offset?:number):number;writeUInt32BE(value:number,offset?:number):number;writeInt8(value:number,offset?:number):number;writeInt16LE(value:number,offset?:number):number;writeInt16BE(value:number,offset?:number):number;writeInt32LE(value:number,offset?:number):number;writeInt32BE(value:number,offset?:number):number;writeFloatLE(value:number,offset?:number):number;writeFloatBE(value:number,offset?:number):number;writeDoubleLE(value:number,offset?:number):number;writeDoubleBE(value:number,offset?:number):number;fill(value:string|Uint8Array|number,offset?:number,end?:number,encoding?:BufferEncoding):this;indexOf(value:string|number|Uint8Array,byteOffset?:number,encoding?:BufferEncoding):number;lastIndexOf(value:string|number|Uint8Array,byteOffset?:number,encoding?:BufferEncoding):number;entries():IterableIterator<[number,number]>;includes(value:string|number|Buffer,byteOffset?:number,encoding?:BufferEncoding):boolean;keys():IterableIterator;values():IterableIterator;}declare namespace NodeJS{interface InspectOptions{getters?:'get'|'set'|boolean;showHidden?:boolean;depth?:number|null;colors?:boolean;customInspect?:boolean;showProxy?:boolean;maxArrayLength?:number|null;maxStringLength?:number|null;breakLength?:number;compact?:boolean|number;sorted?:boolean|((a:string,b:string)=>number);}interface CallSite{getThis():any;getTypeName():string|null;getFunction():Function|undefined;getFunctionName():string|null;getMethodName():string|null;getFileName():string|null;getLineNumber():number|null;getColumnNumber():number|null;getEvalOrigin():string|undefined;isToplevel():boolean;isEval():boolean;isNative():boolean;isConstructor():boolean;}interface ErrnoException extends Error{errno?:number;code?:string;path?:string;syscall?:string;stack?:string;}interface ReadableStream extends EventEmitter{readable:boolean;read(size?:number):string|Buffer;setEncoding(encoding:BufferEncoding):this;pause():this;resume():this;isPaused():boolean;pipe(destination:T,options?:{end?:boolean;}):T;unpipe(destination?:WritableStream):this;unshift(chunk:string|Uint8Array,encoding?:BufferEncoding):void;wrap(oldStream:ReadableStream):this;[Symbol.asyncIterator]():AsyncIterableIterator;}interface WritableStream extends EventEmitter{writable:boolean;write(buffer:Uint8Array|string,cb?:(err?:Error|null)=>void):boolean;write(str:string,encoding?:BufferEncoding,cb?:(err?:Error|null)=>void):boolean;end(cb?:()=>void):void;end(data:string|Uint8Array,cb?:()=>void):void;end(str:string,encoding?:BufferEncoding,cb?:()=>void):void;}interface ReadWriteStream extends ReadableStream,WritableStream{}interface Global{Array:typeof Array;ArrayBuffer:typeof ArrayBuffer;Boolean:typeof Boolean;Buffer:typeof Buffer;DataView:typeof DataView;Date:typeof Date;Error:typeof Error;EvalError:typeof EvalError;Float32Array:typeof Float32Array;Float64Array:typeof Float64Array;Function:typeof Function;Infinity:typeof Infinity;Int16Array:typeof Int16Array;Int32Array:typeof Int32Array;Int8Array:typeof Int8Array;Intl:typeof Intl;JSON:typeof JSON;Map:MapConstructor;Math:typeof Math;NaN:typeof NaN;Number:typeof Number;Object:typeof Object;Promise:typeof Promise;RangeError:typeof RangeError;ReferenceError:typeof ReferenceError;RegExp:typeof RegExp;Set:SetConstructor;String:typeof String;Symbol:Function;SyntaxError:typeof SyntaxError;TypeError:typeof TypeError;URIError:typeof URIError;Uint16Array:typeof Uint16Array;Uint32Array:typeof Uint32Array;Uint8Array:typeof Uint8Array;Uint8ClampedArray:typeof Uint8ClampedArray;WeakMap:WeakMapConstructor;WeakSet:WeakSetConstructor;clearImmediate:(immediateId:Immediate)=>void;clearInterval:(intervalId:Timeout)=>void;clearTimeout:(timeoutId:Timeout)=>void;decodeURI:typeof decodeURI;decodeURIComponent:typeof decodeURIComponent;encodeURI:typeof encodeURI;encodeURIComponent:typeof encodeURIComponent;escape:(str:string)=>string;eval:typeof eval;global:Global;isFinite:typeof isFinite;isNaN:typeof isNaN;parseFloat:typeof parseFloat;parseInt:typeof parseInt;setImmediate:(callback:(...args:any[])=>void,...args:any[])=>Immediate;setInterval:(callback:(...args:any[])=>void,ms?:number,...args:any[])=>Timeout;setTimeout:(callback:(...args:any[])=>void,ms?:number,...args:any[])=>Timeout;queueMicrotask:typeof queueMicrotask;undefined:typeof undefined;unescape:(str:string)=>string;gc:()=>void;v8debug?:any;}interface RefCounted{ref():this;unref():this;}interface Timer extends RefCounted{hasRef():boolean;refresh():this;[Symbol.toPrimitive]():number;}interface Immediate extends RefCounted{hasRef():boolean;_onImmediate:Function;}interface Timeout extends Timer{hasRef():boolean;refresh():this;[Symbol.toPrimitive]():number;}type TypedArray=|Uint8Array|Uint8ClampedArray|Uint16Array|Uint32Array|Int8Array|Int16Array|Int32Array|BigUint64Array|BigInt64Array|Float32Array|Float64Array;type ArrayBufferView=TypedArray|DataView;interface Require{(id:string):any;resolve:RequireResolve;cache:Dict;extensions:RequireExtensions;main:Module|undefined;}interface RequireResolve{(id:string,options?:{paths?:string[];}):string;paths(request:string):string[]|null;}interface RequireExtensions extends Dict<(m:Module,filename:string)=>any>{'.js':(m:Module,filename:string)=>any;'.json':(m:Module,filename:string)=>any;'.node':(m:Module,filename:string)=>any;}interface Module{exports:any;require:Require;id:string;filename:string;loaded:boolean;parent:Module|null|undefined;children:Module[];path:string;paths:string[];}interface Dict{[key:string]:T|undefined;}interface ReadOnlyDict{readonly[key:string]:T|undefined;}} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/http.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/http.d.ts new file mode 100644 index 000000000..1ef4ea696 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/http.d.ts @@ -0,0 +1 @@ +declare module'node:http'{export*from'http';}declare module'http'{import*as stream from'node:stream';import{URL}from'node:url';import{Socket,Server as NetServer}from'node:net';interface IncomingHttpHeaders extends NodeJS.Dict{'accept'?:string;'accept-language'?:string;'accept-patch'?:string;'accept-ranges'?:string;'access-control-allow-credentials'?:string;'access-control-allow-headers'?:string;'access-control-allow-methods'?:string;'access-control-allow-origin'?:string;'access-control-expose-headers'?:string;'access-control-max-age'?:string;'access-control-request-headers'?:string;'access-control-request-method'?:string;'age'?:string;'allow'?:string;'alt-svc'?:string;'authorization'?:string;'cache-control'?:string;'connection'?:string;'content-disposition'?:string;'content-encoding'?:string;'content-language'?:string;'content-length'?:string;'content-location'?:string;'content-range'?:string;'content-type'?:string;'cookie'?:string;'date'?:string;'expect'?:string;'expires'?:string;'forwarded'?:string;'from'?:string;'host'?:string;'if-match'?:string;'if-modified-since'?:string;'if-none-match'?:string;'if-unmodified-since'?:string;'last-modified'?:string;'location'?:string;'origin'?:string;'pragma'?:string;'proxy-authenticate'?:string;'proxy-authorization'?:string;'public-key-pins'?:string;'range'?:string;'referer'?:string;'retry-after'?:string;'sec-websocket-accept'?:string;'sec-websocket-extensions'?:string;'sec-websocket-key'?:string;'sec-websocket-protocol'?:string;'sec-websocket-version'?:string;'set-cookie'?:string[];'strict-transport-security'?:string;'tk'?:string;'trailer'?:string;'transfer-encoding'?:string;'upgrade'?:string;'user-agent'?:string;'vary'?:string;'via'?:string;'warning'?:string;'www-authenticate'?:string;}type OutgoingHttpHeader=number|string|string[];interface OutgoingHttpHeaders extends NodeJS.Dict{}interface ClientRequestArgs{protocol?:string|null;host?:string|null;hostname?:string|null;family?:number;port?:number|string|null;defaultPort?:number|string;localAddress?:string;socketPath?:string;maxHeaderSize?:number;method?:string;path?:string|null;headers?:OutgoingHttpHeaders;auth?:string|null;agent?:Agent|boolean;_defaultAgent?:Agent;timeout?:number;setHost?:boolean;createConnection?:(options:ClientRequestArgs,oncreate:(err:Error,socket:Socket)=>void)=>Socket;}interface ServerOptions{IncomingMessage?:typeof IncomingMessage;ServerResponse?:typeof ServerResponse;maxHeaderSize?:number;insecureHTTPParser?:boolean;}type RequestListener=(req:IncomingMessage,res:ServerResponse)=>void;interface HttpBase{setTimeout(msecs?:number,callback?:()=>void):this;setTimeout(callback:()=>void):this;maxHeadersCount:number|null;timeout:number;headersTimeout:number;keepAliveTimeout:number;requestTimeout:number;}interface Server extends HttpBase{}class Server extends NetServer{constructor(requestListener?:RequestListener);constructor(options:ServerOptions,requestListener?:RequestListener);}class OutgoingMessage extends stream.Writable{upgrading:boolean;chunkedEncoding:boolean;shouldKeepAlive:boolean;useChunkedEncodingByDefault:boolean;sendDate:boolean;finished:boolean;headersSent:boolean;connection:Socket|null;socket:Socket|null;constructor();setTimeout(msecs:number,callback?:()=>void):this;setHeader(name:string,value:number|string|ReadonlyArray):void;getHeader(name:string):number|string|string[]|undefined;getHeaders():OutgoingHttpHeaders;getHeaderNames():string[];hasHeader(name:string):boolean;removeHeader(name:string):void;addTrailers(headers:OutgoingHttpHeaders|ReadonlyArray<[string,string]>):void;flushHeaders():void;}class ServerResponse extends OutgoingMessage{statusCode:number;statusMessage:string;constructor(req:IncomingMessage);assignSocket(socket:Socket):void;detachSocket(socket:Socket):void;writeContinue(callback?:()=>void):void;writeHead(statusCode:number,reasonPhrase?:string,headers?:OutgoingHttpHeaders|OutgoingHttpHeader[]):this;writeHead(statusCode:number,headers?:OutgoingHttpHeaders|OutgoingHttpHeader[]):this;writeProcessing():void;}interface InformationEvent{statusCode:number;statusMessage:string;httpVersion:string;httpVersionMajor:number;httpVersionMinor:number;headers:IncomingHttpHeaders;rawHeaders:string[];}class ClientRequest extends OutgoingMessage{aborted:boolean;host:string;protocol:string;constructor(url:string|URL|ClientRequestArgs,cb?:(res:IncomingMessage)=>void);method:string;path:string;abort():void;onSocket(socket:Socket):void;setTimeout(timeout:number,callback?:()=>void):this;setNoDelay(noDelay?:boolean):void;setSocketKeepAlive(enable?:boolean,initialDelay?:number):void;addListener(event:'abort',listener:()=>void):this;addListener(event:'connect',listener:(response:IncomingMessage,socket:Socket,head:Buffer)=>void):this;addListener(event:'continue',listener:()=>void):this;addListener(event:'information',listener:(info:InformationEvent)=>void):this;addListener(event:'response',listener:(response:IncomingMessage)=>void):this;addListener(event:'socket',listener:(socket:Socket)=>void):this;addListener(event:'timeout',listener:()=>void):this;addListener(event:'upgrade',listener:(response:IncomingMessage,socket:Socket,head:Buffer)=>void):this;addListener(event:'close',listener:()=>void):this;addListener(event:'drain',listener:()=>void):this;addListener(event:'error',listener:(err:Error)=>void):this;addListener(event:'finish',listener:()=>void):this;addListener(event:'pipe',listener:(src:stream.Readable)=>void):this;addListener(event:'unpipe',listener:(src:stream.Readable)=>void):this;addListener(event:string|symbol,listener:(...args:any[])=>void):this;on(event:'abort',listener:()=>void):this;on(event:'connect',listener:(response:IncomingMessage,socket:Socket,head:Buffer)=>void):this;on(event:'continue',listener:()=>void):this;on(event:'information',listener:(info:InformationEvent)=>void):this;on(event:'response',listener:(response:IncomingMessage)=>void):this;on(event:'socket',listener:(socket:Socket)=>void):this;on(event:'timeout',listener:()=>void):this;on(event:'upgrade',listener:(response:IncomingMessage,socket:Socket,head:Buffer)=>void):this;on(event:'close',listener:()=>void):this;on(event:'drain',listener:()=>void):this;on(event:'error',listener:(err:Error)=>void):this;on(event:'finish',listener:()=>void):this;on(event:'pipe',listener:(src:stream.Readable)=>void):this;on(event:'unpipe',listener:(src:stream.Readable)=>void):this;on(event:string|symbol,listener:(...args:any[])=>void):this;once(event:'abort',listener:()=>void):this;once(event:'connect',listener:(response:IncomingMessage,socket:Socket,head:Buffer)=>void):this;once(event:'continue',listener:()=>void):this;once(event:'information',listener:(info:InformationEvent)=>void):this;once(event:'response',listener:(response:IncomingMessage)=>void):this;once(event:'socket',listener:(socket:Socket)=>void):this;once(event:'timeout',listener:()=>void):this;once(event:'upgrade',listener:(response:IncomingMessage,socket:Socket,head:Buffer)=>void):this;once(event:'close',listener:()=>void):this;once(event:'drain',listener:()=>void):this;once(event:'error',listener:(err:Error)=>void):this;once(event:'finish',listener:()=>void):this;once(event:'pipe',listener:(src:stream.Readable)=>void):this;once(event:'unpipe',listener:(src:stream.Readable)=>void):this;once(event:string|symbol,listener:(...args:any[])=>void):this;prependListener(event:'abort',listener:()=>void):this;prependListener(event:'connect',listener:(response:IncomingMessage,socket:Socket,head:Buffer)=>void):this;prependListener(event:'continue',listener:()=>void):this;prependListener(event:'information',listener:(info:InformationEvent)=>void):this;prependListener(event:'response',listener:(response:IncomingMessage)=>void):this;prependListener(event:'socket',listener:(socket:Socket)=>void):this;prependListener(event:'timeout',listener:()=>void):this;prependListener(event:'upgrade',listener:(response:IncomingMessage,socket:Socket,head:Buffer)=>void):this;prependListener(event:'close',listener:()=>void):this;prependListener(event:'drain',listener:()=>void):this;prependListener(event:'error',listener:(err:Error)=>void):this;prependListener(event:'finish',listener:()=>void):this;prependListener(event:'pipe',listener:(src:stream.Readable)=>void):this;prependListener(event:'unpipe',listener:(src:stream.Readable)=>void):this;prependListener(event:string|symbol,listener:(...args:any[])=>void):this;prependOnceListener(event:'abort',listener:()=>void):this;prependOnceListener(event:'connect',listener:(response:IncomingMessage,socket:Socket,head:Buffer)=>void):this;prependOnceListener(event:'continue',listener:()=>void):this;prependOnceListener(event:'information',listener:(info:InformationEvent)=>void):this;prependOnceListener(event:'response',listener:(response:IncomingMessage)=>void):this;prependOnceListener(event:'socket',listener:(socket:Socket)=>void):this;prependOnceListener(event:'timeout',listener:()=>void):this;prependOnceListener(event:'upgrade',listener:(response:IncomingMessage,socket:Socket,head:Buffer)=>void):this;prependOnceListener(event:'close',listener:()=>void):this;prependOnceListener(event:'drain',listener:()=>void):this;prependOnceListener(event:'error',listener:(err:Error)=>void):this;prependOnceListener(event:'finish',listener:()=>void):this;prependOnceListener(event:'pipe',listener:(src:stream.Readable)=>void):this;prependOnceListener(event:'unpipe',listener:(src:stream.Readable)=>void):this;prependOnceListener(event:string|symbol,listener:(...args:any[])=>void):this;}class IncomingMessage extends stream.Readable{constructor(socket:Socket);aborted:boolean;httpVersion:string;httpVersionMajor:number;httpVersionMinor:number;complete:boolean;connection:Socket;socket:Socket;headers:IncomingHttpHeaders;rawHeaders:string[];trailers:NodeJS.Dict;rawTrailers:string[];setTimeout(msecs:number,callback?:()=>void):this;method?:string;url?:string;statusCode?:number;statusMessage?:string;destroy(error?:Error):void;}interface AgentOptions{keepAlive?:boolean;keepAliveMsecs?:number;maxSockets?:number;maxTotalSockets?:number;maxFreeSockets?:number;timeout?:number;scheduling?:'fifo'|'lifo';}class Agent{maxFreeSockets:number;maxSockets:number;maxTotalSockets:number;readonly freeSockets:NodeJS.ReadOnlyDict;readonly sockets:NodeJS.ReadOnlyDict;readonly requests:NodeJS.ReadOnlyDict;constructor(opts?:AgentOptions);destroy():void;}const METHODS:string[];const STATUS_CODES:{[errorCode:number]:string|undefined;[errorCode:string]:string|undefined;};function createServer(requestListener?:RequestListener):Server;function createServer(options:ServerOptions,requestListener?:RequestListener):Server;interface RequestOptions extends ClientRequestArgs{}function request(options:RequestOptions|string|URL,callback?:(res:IncomingMessage)=>void):ClientRequest;function request(url:string|URL,options:RequestOptions,callback?:(res:IncomingMessage)=>void):ClientRequest;function get(options:RequestOptions|string|URL,callback?:(res:IncomingMessage)=>void):ClientRequest;function get(url:string|URL,options:RequestOptions,callback?:(res:IncomingMessage)=>void):ClientRequest;let globalAgent:Agent;const maxHeaderSize:number;} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/net.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/net.d.ts new file mode 100644 index 000000000..e55792600 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/net.d.ts @@ -0,0 +1 @@ +declare module'node:net'{export*from'net';}declare module'net'{import*as stream from'node:stream';import EventEmitter=require('node:events');import*as dns from'node:dns';type LookupFunction=(hostname:string,options:dns.LookupOneOptions,callback:(err:NodeJS.ErrnoException|null,address:string,family:number)=>void,)=>void;interface AddressInfo{address:string;family:string;port:number;}interface SocketConstructorOpts{fd?:number;allowHalfOpen?:boolean;readable?:boolean;writable?:boolean;}interface OnReadOpts{buffer:Uint8Array|(()=>Uint8Array);callback(bytesWritten:number,buf:Uint8Array):boolean;}interface ConnectOpts{onread?:OnReadOpts;}interface TcpSocketConnectOpts extends ConnectOpts{port:number;host?:string;localAddress?:string;localPort?:number;hints?:number;family?:number;lookup?:LookupFunction;}interface IpcSocketConnectOpts extends ConnectOpts{path:string;}type SocketConnectOpts=TcpSocketConnectOpts|IpcSocketConnectOpts;class Socket extends stream.Duplex{constructor(options?:SocketConstructorOpts);write(buffer:Uint8Array|string,cb?:(err?:Error)=>void):boolean;write(str:Uint8Array|string,encoding?:BufferEncoding,cb?:(err?:Error)=>void):boolean;connect(options:SocketConnectOpts,connectionListener?:()=>void):this;connect(port:number,host:string,connectionListener?:()=>void):this;connect(port:number,connectionListener?:()=>void):this;connect(path:string,connectionListener?:()=>void):this;setEncoding(encoding?:BufferEncoding):this;pause():this;resume():this;setTimeout(timeout:number,callback?:()=>void):this;setNoDelay(noDelay?:boolean):this;setKeepAlive(enable?:boolean,initialDelay?:number):this;address():AddressInfo|{};unref():this;ref():this;readonly bufferSize:number;readonly bytesRead:number;readonly bytesWritten:number;readonly connecting:boolean;readonly destroyed:boolean;readonly localAddress:string;readonly localPort:number;readonly remoteAddress?:string;readonly remoteFamily?:string;readonly remotePort?:number;end(cb?:()=>void):void;end(buffer:Uint8Array|string,cb?:()=>void):void;end(str:Uint8Array|string,encoding?:BufferEncoding,cb?:()=>void):void;addListener(event:string,listener:(...args:any[])=>void):this;addListener(event:"close",listener:(had_error:boolean)=>void):this;addListener(event:"connect",listener:()=>void):this;addListener(event:"data",listener:(data:Buffer)=>void):this;addListener(event:"drain",listener:()=>void):this;addListener(event:"end",listener:()=>void):this;addListener(event:"error",listener:(err:Error)=>void):this;addListener(event:"lookup",listener:(err:Error,address:string,family:string|number,host:string)=>void):this;addListener(event:"timeout",listener:()=>void):this;emit(event:string|symbol,...args:any[]):boolean;emit(event:"close",had_error:boolean):boolean;emit(event:"connect"):boolean;emit(event:"data",data:Buffer):boolean;emit(event:"drain"):boolean;emit(event:"end"):boolean;emit(event:"error",err:Error):boolean;emit(event:"lookup",err:Error,address:string,family:string|number,host:string):boolean;emit(event:"timeout"):boolean;on(event:string,listener:(...args:any[])=>void):this;on(event:"close",listener:(had_error:boolean)=>void):this;on(event:"connect",listener:()=>void):this;on(event:"data",listener:(data:Buffer)=>void):this;on(event:"drain",listener:()=>void):this;on(event:"end",listener:()=>void):this;on(event:"error",listener:(err:Error)=>void):this;on(event:"lookup",listener:(err:Error,address:string,family:string|number,host:string)=>void):this;on(event:"timeout",listener:()=>void):this;once(event:string,listener:(...args:any[])=>void):this;once(event:"close",listener:(had_error:boolean)=>void):this;once(event:"connect",listener:()=>void):this;once(event:"data",listener:(data:Buffer)=>void):this;once(event:"drain",listener:()=>void):this;once(event:"end",listener:()=>void):this;once(event:"error",listener:(err:Error)=>void):this;once(event:"lookup",listener:(err:Error,address:string,family:string|number,host:string)=>void):this;once(event:"timeout",listener:()=>void):this;prependListener(event:string,listener:(...args:any[])=>void):this;prependListener(event:"close",listener:(had_error:boolean)=>void):this;prependListener(event:"connect",listener:()=>void):this;prependListener(event:"data",listener:(data:Buffer)=>void):this;prependListener(event:"drain",listener:()=>void):this;prependListener(event:"end",listener:()=>void):this;prependListener(event:"error",listener:(err:Error)=>void):this;prependListener(event:"lookup",listener:(err:Error,address:string,family:string|number,host:string)=>void):this;prependListener(event:"timeout",listener:()=>void):this;prependOnceListener(event:string,listener:(...args:any[])=>void):this;prependOnceListener(event:"close",listener:(had_error:boolean)=>void):this;prependOnceListener(event:"connect",listener:()=>void):this;prependOnceListener(event:"data",listener:(data:Buffer)=>void):this;prependOnceListener(event:"drain",listener:()=>void):this;prependOnceListener(event:"end",listener:()=>void):this;prependOnceListener(event:"error",listener:(err:Error)=>void):this;prependOnceListener(event:"lookup",listener:(err:Error,address:string,family:string|number,host:string)=>void):this;prependOnceListener(event:"timeout",listener:()=>void):this;}interface ListenOptions{port?:number;host?:string;backlog?:number;path?:string;exclusive?:boolean;readableAll?:boolean;writableAll?:boolean;ipv6Only?:boolean;}interface ServerOpts{allowHalfOpen?:boolean;pauseOnConnect?:boolean;}class Server extends EventEmitter{constructor(connectionListener?:(socket:Socket)=>void);constructor(options?:ServerOpts,connectionListener?:(socket:Socket)=>void);listen(port?:number,hostname?:string,backlog?:number,listeningListener?:()=>void):this;listen(port?:number,hostname?:string,listeningListener?:()=>void):this;listen(port?:number,backlog?:number,listeningListener?:()=>void):this;listen(port?:number,listeningListener?:()=>void):this;listen(path:string,backlog?:number,listeningListener?:()=>void):this;listen(path:string,listeningListener?:()=>void):this;listen(options:ListenOptions,listeningListener?:()=>void):this;listen(handle:any,backlog?:number,listeningListener?:()=>void):this;listen(handle:any,listeningListener?:()=>void):this;close(callback?:(err?:Error)=>void):this;address():AddressInfo|string|null;getConnections(cb:(error:Error|null,count:number)=>void):void;ref():this;unref():this;maxConnections:number;connections:number;listening:boolean;addListener(event:string,listener:(...args:any[])=>void):this;addListener(event:"close",listener:()=>void):this;addListener(event:"connection",listener:(socket:Socket)=>void):this;addListener(event:"error",listener:(err:Error)=>void):this;addListener(event:"listening",listener:()=>void):this;emit(event:string|symbol,...args:any[]):boolean;emit(event:"close"):boolean;emit(event:"connection",socket:Socket):boolean;emit(event:"error",err:Error):boolean;emit(event:"listening"):boolean;on(event:string,listener:(...args:any[])=>void):this;on(event:"close",listener:()=>void):this;on(event:"connection",listener:(socket:Socket)=>void):this;on(event:"error",listener:(err:Error)=>void):this;on(event:"listening",listener:()=>void):this;once(event:string,listener:(...args:any[])=>void):this;once(event:"close",listener:()=>void):this;once(event:"connection",listener:(socket:Socket)=>void):this;once(event:"error",listener:(err:Error)=>void):this;once(event:"listening",listener:()=>void):this;prependListener(event:string,listener:(...args:any[])=>void):this;prependListener(event:"close",listener:()=>void):this;prependListener(event:"connection",listener:(socket:Socket)=>void):this;prependListener(event:"error",listener:(err:Error)=>void):this;prependListener(event:"listening",listener:()=>void):this;prependOnceListener(event:string,listener:(...args:any[])=>void):this;prependOnceListener(event:"close",listener:()=>void):this;prependOnceListener(event:"connection",listener:(socket:Socket)=>void):this;prependOnceListener(event:"error",listener:(err:Error)=>void):this;prependOnceListener(event:"listening",listener:()=>void):this;}interface TcpNetConnectOpts extends TcpSocketConnectOpts,SocketConstructorOpts{timeout?:number;}interface IpcNetConnectOpts extends IpcSocketConnectOpts,SocketConstructorOpts{timeout?:number;}type NetConnectOpts=TcpNetConnectOpts|IpcNetConnectOpts;function createServer(connectionListener?:(socket:Socket)=>void):Server;function createServer(options?:ServerOpts,connectionListener?:(socket:Socket)=>void):Server;function connect(options:NetConnectOpts,connectionListener?:()=>void):Socket;function connect(port:number,host?:string,connectionListener?:()=>void):Socket;function connect(path:string,connectionListener?:()=>void):Socket;function createConnection(options:NetConnectOpts,connectionListener?:()=>void):Socket;function createConnection(port:number,host?:string,connectionListener?:()=>void):Socket;function createConnection(path:string,connectionListener?:()=>void):Socket;function isIP(input:string):number;function isIPv4(input:string):boolean;function isIPv6(input:string):boolean;} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/os.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/os.d.ts new file mode 100644 index 000000000..8d6d654b5 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/os.d.ts @@ -0,0 +1 @@ +declare module'node:os'{export*from'os';}declare module'os'{interface CpuInfo{model:string;speed:number;times:{user:number;nice:number;sys:number;idle:number;irq:number;};}interface NetworkInterfaceBase{address:string;netmask:string;mac:string;internal:boolean;cidr:string|null;}interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase{family:"IPv4";}interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase{family:"IPv6";scopeid:number;}interface UserInfo{username:T;uid:number;gid:number;shell:T;homedir:T;}type NetworkInterfaceInfo=NetworkInterfaceInfoIPv4|NetworkInterfaceInfoIPv6;function hostname():string;function loadavg():number[];function uptime():number;function freemem():number;function totalmem():number;function cpus():CpuInfo[];function type():string;function release():string;function networkInterfaces():NodeJS.Dict;function homedir():string;function userInfo(options:{encoding:'buffer'}):UserInfo;function userInfo(options?:{encoding:BufferEncoding}):UserInfo;type SignalConstants={[key in NodeJS.Signals]:number;};namespace constants{const UV_UDP_REUSEADDR:number;namespace signals{}const signals:SignalConstants;namespace errno{const E2BIG:number;const EACCES:number;const EADDRINUSE:number;const EADDRNOTAVAIL:number;const EAFNOSUPPORT:number;const EAGAIN:number;const EALREADY:number;const EBADF:number;const EBADMSG:number;const EBUSY:number;const ECANCELED:number;const ECHILD:number;const ECONNABORTED:number;const ECONNREFUSED:number;const ECONNRESET:number;const EDEADLK:number;const EDESTADDRREQ:number;const EDOM:number;const EDQUOT:number;const EEXIST:number;const EFAULT:number;const EFBIG:number;const EHOSTUNREACH:number;const EIDRM:number;const EILSEQ:number;const EINPROGRESS:number;const EINTR:number;const EINVAL:number;const EIO:number;const EISCONN:number;const EISDIR:number;const ELOOP:number;const EMFILE:number;const EMLINK:number;const EMSGSIZE:number;const EMULTIHOP:number;const ENAMETOOLONG:number;const ENETDOWN:number;const ENETRESET:number;const ENETUNREACH:number;const ENFILE:number;const ENOBUFS:number;const ENODATA:number;const ENODEV:number;const ENOENT:number;const ENOEXEC:number;const ENOLCK:number;const ENOLINK:number;const ENOMEM:number;const ENOMSG:number;const ENOPROTOOPT:number;const ENOSPC:number;const ENOSR:number;const ENOSTR:number;const ENOSYS:number;const ENOTCONN:number;const ENOTDIR:number;const ENOTEMPTY:number;const ENOTSOCK:number;const ENOTSUP:number;const ENOTTY:number;const ENXIO:number;const EOPNOTSUPP:number;const EOVERFLOW:number;const EPERM:number;const EPIPE:number;const EPROTO:number;const EPROTONOSUPPORT:number;const EPROTOTYPE:number;const ERANGE:number;const EROFS:number;const ESPIPE:number;const ESRCH:number;const ESTALE:number;const ETIME:number;const ETIMEDOUT:number;const ETXTBSY:number;const EWOULDBLOCK:number;const EXDEV:number;const WSAEINTR:number;const WSAEBADF:number;const WSAEACCES:number;const WSAEFAULT:number;const WSAEINVAL:number;const WSAEMFILE:number;const WSAEWOULDBLOCK:number;const WSAEINPROGRESS:number;const WSAEALREADY:number;const WSAENOTSOCK:number;const WSAEDESTADDRREQ:number;const WSAEMSGSIZE:number;const WSAEPROTOTYPE:number;const WSAENOPROTOOPT:number;const WSAEPROTONOSUPPORT:number;const WSAESOCKTNOSUPPORT:number;const WSAEOPNOTSUPP:number;const WSAEPFNOSUPPORT:number;const WSAEAFNOSUPPORT:number;const WSAEADDRINUSE:number;const WSAEADDRNOTAVAIL:number;const WSAENETDOWN:number;const WSAENETUNREACH:number;const WSAENETRESET:number;const WSAECONNABORTED:number;const WSAECONNRESET:number;const WSAENOBUFS:number;const WSAEISCONN:number;const WSAENOTCONN:number;const WSAESHUTDOWN:number;const WSAETOOMANYREFS:number;const WSAETIMEDOUT:number;const WSAECONNREFUSED:number;const WSAELOOP:number;const WSAENAMETOOLONG:number;const WSAEHOSTDOWN:number;const WSAEHOSTUNREACH:number;const WSAENOTEMPTY:number;const WSAEPROCLIM:number;const WSAEUSERS:number;const WSAEDQUOT:number;const WSAESTALE:number;const WSAEREMOTE:number;const WSASYSNOTREADY:number;const WSAVERNOTSUPPORTED:number;const WSANOTINITIALISED:number;const WSAEDISCON:number;const WSAENOMORE:number;const WSAECANCELLED:number;const WSAEINVALIDPROCTABLE:number;const WSAEINVALIDPROVIDER:number;const WSAEPROVIDERFAILEDINIT:number;const WSASYSCALLFAILURE:number;const WSASERVICE_NOT_FOUND:number;const WSATYPE_NOT_FOUND:number;const WSA_E_NO_MORE:number;const WSA_E_CANCELLED:number;const WSAEREFUSED:number;}namespace priority{const PRIORITY_LOW:number;const PRIORITY_BELOW_NORMAL:number;const PRIORITY_NORMAL:number;const PRIORITY_ABOVE_NORMAL:number;const PRIORITY_HIGH:number;const PRIORITY_HIGHEST:number;}}function arch():string;function version():string;function platform():NodeJS.Platform;function tmpdir():string;const EOL:string;function endianness():"BE"|"LE";function getPriority(pid?:number):number;function setPriority(priority:number):void;function setPriority(pid:number,priority:number):void;} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/path.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/path.d.ts new file mode 100644 index 000000000..93a69e962 --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/path.d.ts @@ -0,0 +1 @@ +declare module'node:path'{import path=require('path');export=path;}declare module'path'{namespace path{interface ParsedPath{root:string;dir:string;base:string;ext:string;name:string;}interface FormatInputPathObject{root?:string;dir?:string;base?:string;ext?:string;name?:string;}interface PlatformPath{normalize(p:string):string;join(...paths:string[]):string;resolve(...pathSegments:string[]):string;isAbsolute(p:string):boolean;relative(from:string,to:string):string;dirname(p:string):string;basename(p:string,ext?:string):string;extname(p:string):string;readonly sep:string;readonly delimiter:string;parse(p:string):ParsedPath;format(pP:FormatInputPathObject):string;toNamespacedPath(path:string):string;readonly posix:PlatformPath;readonly win32:PlatformPath;}}const path:path.PlatformPath;export=path;} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/process.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/process.d.ts new file mode 100644 index 000000000..ac44b12ec --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/process.d.ts @@ -0,0 +1 @@ +declare module'node:process'{export=process;}declare module'process'{import*as tty from'node:tty';global{var process:NodeJS.Process;namespace NodeJS{interface ReadStream extends tty.ReadStream{}interface WriteStream extends tty.WriteStream{}interface MemoryUsage{rss:number;heapTotal:number;heapUsed:number;external:number;arrayBuffers:number;}interface CpuUsage{user:number;system:number;}interface ProcessRelease{name:string;sourceUrl?:string;headersUrl?:string;libUrl?:string;lts?:string;}interface ProcessVersions extends Dict{http_parser:string;node:string;v8:string;ares:string;uv:string;zlib:string;modules:string;openssl:string;}type Platform='aix'|'android'|'darwin'|'freebsd'|'linux'|'openbsd'|'sunos'|'win32'|'cygwin'|'netbsd';type Signals="SIGABRT"|"SIGALRM"|"SIGBUS"|"SIGCHLD"|"SIGCONT"|"SIGFPE"|"SIGHUP"|"SIGILL"|"SIGINT"|"SIGIO"|"SIGIOT"|"SIGKILL"|"SIGPIPE"|"SIGPOLL"|"SIGPROF"|"SIGPWR"|"SIGQUIT"|"SIGSEGV"|"SIGSTKFLT"|"SIGSTOP"|"SIGSYS"|"SIGTERM"|"SIGTRAP"|"SIGTSTP"|"SIGTTIN"|"SIGTTOU"|"SIGUNUSED"|"SIGURG"|"SIGUSR1"|"SIGUSR2"|"SIGVTALRM"|"SIGWINCH"|"SIGXCPU"|"SIGXFSZ"|"SIGBREAK"|"SIGLOST"|"SIGINFO";type MultipleResolveType='resolve'|'reject';type BeforeExitListener=(code:number)=>void;type DisconnectListener=()=>void;type ExitListener=(code:number)=>void;type RejectionHandledListener=(promise:Promise)=>void;type UncaughtExceptionListener=(error:Error)=>void;type UnhandledRejectionListener=(reason:{}|null|undefined,promise:Promise)=>void;type WarningListener=(warning:Error)=>void;type MessageListener=(message:any,sendHandle:any)=>void;type SignalsListener=(signal:Signals)=>void;type NewListenerListener=(type:string|symbol,listener:(...args:any[])=>void)=>void;type RemoveListenerListener=(type:string|symbol,listener:(...args:any[])=>void)=>void;type MultipleResolveListener=(type:MultipleResolveType,promise:Promise,value:any)=>void;interface Socket extends ReadWriteStream{isTTY?:true;}interface ProcessEnv extends Dict{}interface HRTime{(time?:[number,number]):[number,number];bigint():bigint;}interface ProcessReport{directory:string;filename:string;getReport(err?:Error):string;reportOnFatalError:boolean;reportOnSignal:boolean;reportOnUncaughtException:boolean;signal:Signals;writeReport(fileName?:string):string;writeReport(error?:Error):string;writeReport(fileName?:string,err?:Error):string;}interface ResourceUsage{fsRead:number;fsWrite:number;involuntaryContextSwitches:number;ipcReceived:number;ipcSent:number;majorPageFault:number;maxRSS:number;minorPageFault:number;sharedMemorySize:number;signalsCount:number;swappedOut:number;systemCPUTime:number;unsharedDataSize:number;unsharedStackSize:number;userCPUTime:number;voluntaryContextSwitches:number;}interface Process extends EventEmitter{stdout:WriteStream&{fd:1;};stderr:WriteStream&{fd:2;};stdin:ReadStream&{fd:0;};openStdin():Socket;argv:string[];argv0:string;execArgv:string[];execPath:string;abort():never;chdir(directory:string):void;cwd():string;debugPort:number;emitWarning(warning:string|Error,name?:string,ctor?:Function):void;env:ProcessEnv;exit(code?:number):never;exitCode?:number;getgid():number;setgid(id:number|string):void;getuid():number;setuid(id:number|string):void;geteuid():number;seteuid(id:number|string):void;getegid():number;setegid(id:number|string):void;getgroups():number[];setgroups(groups:ReadonlyArray):void;setUncaughtExceptionCaptureCallback(cb:((err:Error)=>void)|null):void;hasUncaughtExceptionCaptureCallback():boolean;version:string;versions:ProcessVersions;config:{target_defaults:{cflags:any[];default_configuration:string;defines:string[];include_dirs:string[];libraries:string[];};variables:{clang:number;host_arch:string;node_install_npm:boolean;node_install_waf:boolean;node_prefix:string;node_shared_openssl:boolean;node_shared_v8:boolean;node_shared_zlib:boolean;node_use_dtrace:boolean;node_use_etw:boolean;node_use_openssl:boolean;target_arch:string;v8_no_strict_aliasing:number;v8_use_snapshot:boolean;visibility:string;};};kill(pid:number,signal?:string|number):true;pid:number;ppid:number;title:string;arch:string;platform:Platform;mainModule?:Module;memoryUsage():MemoryUsage;cpuUsage(previousValue?:CpuUsage):CpuUsage;nextTick(callback:Function,...args:any[]):void;release:ProcessRelease;features:{inspector:boolean;debug:boolean;uv:boolean;ipv6:boolean;tls_alpn:boolean;tls_sni:boolean;tls_ocsp:boolean;tls:boolean;};umask():number;umask(mask:string|number):number;uptime():number;hrtime:HRTime;domain:Domain;send?(message:any,sendHandle?:any,options?:{swallowErrors?:boolean},callback?:(error:Error|null)=>void):boolean;disconnect():void;connected:boolean;allowedNodeEnvironmentFlags:ReadonlySet;report?:ProcessReport;resourceUsage():ResourceUsage;traceDeprecation:boolean;addListener(event:"beforeExit",listener:BeforeExitListener):this;addListener(event:"disconnect",listener:DisconnectListener):this;addListener(event:"exit",listener:ExitListener):this;addListener(event:"rejectionHandled",listener:RejectionHandledListener):this;addListener(event:"uncaughtException",listener:UncaughtExceptionListener):this;addListener(event:"uncaughtExceptionMonitor",listener:UncaughtExceptionListener):this;addListener(event:"unhandledRejection",listener:UnhandledRejectionListener):this;addListener(event:"warning",listener:WarningListener):this;addListener(event:"message",listener:MessageListener):this;addListener(event:Signals,listener:SignalsListener):this;addListener(event:"newListener",listener:NewListenerListener):this;addListener(event:"removeListener",listener:RemoveListenerListener):this;addListener(event:"multipleResolves",listener:MultipleResolveListener):this;emit(event:"beforeExit",code:number):boolean;emit(event:"disconnect"):boolean;emit(event:"exit",code:number):boolean;emit(event:"rejectionHandled",promise:Promise):boolean;emit(event:"uncaughtException",error:Error):boolean;emit(event:"uncaughtExceptionMonitor",error:Error):boolean;emit(event:"unhandledRejection",reason:any,promise:Promise):boolean;emit(event:"warning",warning:Error):boolean;emit(event:"message",message:any,sendHandle:any):this;emit(event:Signals,signal:Signals):boolean;emit(event:"newListener",eventName:string|symbol,listener:(...args:any[])=>void):this;emit(event:"removeListener",eventName:string,listener:(...args:any[])=>void):this;emit(event:"multipleResolves",listener:MultipleResolveListener):this;on(event:"beforeExit",listener:BeforeExitListener):this;on(event:"disconnect",listener:DisconnectListener):this;on(event:"exit",listener:ExitListener):this;on(event:"rejectionHandled",listener:RejectionHandledListener):this;on(event:"uncaughtException",listener:UncaughtExceptionListener):this;on(event:"uncaughtExceptionMonitor",listener:UncaughtExceptionListener):this;on(event:"unhandledRejection",listener:UnhandledRejectionListener):this;on(event:"warning",listener:WarningListener):this;on(event:"message",listener:MessageListener):this;on(event:Signals,listener:SignalsListener):this;on(event:"newListener",listener:NewListenerListener):this;on(event:"removeListener",listener:RemoveListenerListener):this;on(event:"multipleResolves",listener:MultipleResolveListener):this;on(event:string|symbol,listener:(...args:any[])=>void):this;once(event:"beforeExit",listener:BeforeExitListener):this;once(event:"disconnect",listener:DisconnectListener):this;once(event:"exit",listener:ExitListener):this;once(event:"rejectionHandled",listener:RejectionHandledListener):this;once(event:"uncaughtException",listener:UncaughtExceptionListener):this;once(event:"uncaughtExceptionMonitor",listener:UncaughtExceptionListener):this;once(event:"unhandledRejection",listener:UnhandledRejectionListener):this;once(event:"warning",listener:WarningListener):this;once(event:"message",listener:MessageListener):this;once(event:Signals,listener:SignalsListener):this;once(event:"newListener",listener:NewListenerListener):this;once(event:"removeListener",listener:RemoveListenerListener):this;once(event:"multipleResolves",listener:MultipleResolveListener):this;prependListener(event:"beforeExit",listener:BeforeExitListener):this;prependListener(event:"disconnect",listener:DisconnectListener):this;prependListener(event:"exit",listener:ExitListener):this;prependListener(event:"rejectionHandled",listener:RejectionHandledListener):this;prependListener(event:"uncaughtException",listener:UncaughtExceptionListener):this;prependListener(event:"uncaughtExceptionMonitor",listener:UncaughtExceptionListener):this;prependListener(event:"unhandledRejection",listener:UnhandledRejectionListener):this;prependListener(event:"warning",listener:WarningListener):this;prependListener(event:"message",listener:MessageListener):this;prependListener(event:Signals,listener:SignalsListener):this;prependListener(event:"newListener",listener:NewListenerListener):this;prependListener(event:"removeListener",listener:RemoveListenerListener):this;prependListener(event:"multipleResolves",listener:MultipleResolveListener):this;prependOnceListener(event:"beforeExit",listener:BeforeExitListener):this;prependOnceListener(event:"disconnect",listener:DisconnectListener):this;prependOnceListener(event:"exit",listener:ExitListener):this;prependOnceListener(event:"rejectionHandled",listener:RejectionHandledListener):this;prependOnceListener(event:"uncaughtException",listener:UncaughtExceptionListener):this;prependOnceListener(event:"uncaughtExceptionMonitor",listener:UncaughtExceptionListener):this;prependOnceListener(event:"unhandledRejection",listener:UnhandledRejectionListener):this;prependOnceListener(event:"warning",listener:WarningListener):this;prependOnceListener(event:"message",listener:MessageListener):this;prependOnceListener(event:Signals,listener:SignalsListener):this;prependOnceListener(event:"newListener",listener:NewListenerListener):this;prependOnceListener(event:"removeListener",listener:RemoveListenerListener):this;prependOnceListener(event:"multipleResolves",listener:MultipleResolveListener):this;listeners(event:"beforeExit"):BeforeExitListener[];listeners(event:"disconnect"):DisconnectListener[];listeners(event:"exit"):ExitListener[];listeners(event:"rejectionHandled"):RejectionHandledListener[];listeners(event:"uncaughtException"):UncaughtExceptionListener[];listeners(event:"uncaughtExceptionMonitor"):UncaughtExceptionListener[];listeners(event:"unhandledRejection"):UnhandledRejectionListener[];listeners(event:"warning"):WarningListener[];listeners(event:"message"):MessageListener[];listeners(event:Signals):SignalsListener[];listeners(event:"newListener"):NewListenerListener[];listeners(event:"removeListener"):RemoveListenerListener[];listeners(event:"multipleResolves"):MultipleResolveListener[];}interface Global{process:Process;}}}export=process;} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/querystring.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/querystring.d.ts new file mode 100644 index 000000000..2964d0efd --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/querystring.d.ts @@ -0,0 +1 @@ +declare module'node:querystring'{export*from'querystring';}declare module'querystring'{interface StringifyOptions{encodeURIComponent?:(str:string)=>string;}interface ParseOptions{maxKeys?:number;decodeURIComponent?:(str:string)=>string;}interface ParsedUrlQuery extends NodeJS.Dict{}interface ParsedUrlQueryInput extends NodeJS.Dict|ReadonlyArray|ReadonlyArray|null>{}function stringify(obj?:ParsedUrlQueryInput,sep?:string,eq?:string,options?:StringifyOptions):string;function parse(str:string,sep?:string,eq?:string,options?:ParseOptions):ParsedUrlQuery;const encode:typeof stringify;const decode:typeof parse;function escape(str:string):string;function unescape(str:string):string;} \ No newline at end of file diff --git a/packages/node_modules/@node-red/editor-client/src/types/node/url.d.ts b/packages/node_modules/@node-red/editor-client/src/types/node/url.d.ts new file mode 100644 index 000000000..dfa1d1b4b --- /dev/null +++ b/packages/node_modules/@node-red/editor-client/src/types/node/url.d.ts @@ -0,0 +1 @@ +declare module'node:url'{export*from'url';}declare module'url'{import{ParsedUrlQuery,ParsedUrlQueryInput}from'node:querystring';interface UrlObject{auth?:string|null;hash?:string|null;host?:string|null;hostname?:string|null;href?:string|null;pathname?:string|null;protocol?:string|null;search?:string|null;slashes?:boolean|null;port?:string|number|null;query?:string|null|ParsedUrlQueryInput;}interface Url{auth:string|null;hash:string|null;host:string|null;hostname:string|null;href:string;path:string|null;pathname:string|null;protocol:string|null;search:string|null;slashes:boolean|null;port:string|null;query:string|null|ParsedUrlQuery;}interface UrlWithParsedQuery extends Url{query:ParsedUrlQuery;}interface UrlWithStringQuery extends Url{query:string|null;}function parse(urlStr:string):UrlWithStringQuery;function parse(urlStr:string,parseQueryString:false|undefined,slashesDenoteHost?:boolean):UrlWithStringQuery;function parse(urlStr:string,parseQueryString:true,slashesDenoteHost?:boolean):UrlWithParsedQuery;function parse(urlStr:string,parseQueryString:boolean,slashesDenoteHost?:boolean):Url;function format(URL:URL,options?:URLFormatOptions):string;function format(urlObject:UrlObject|string):string;function resolve(from:string,to:string):string;function domainToASCII(domain:string):string;function domainToUnicode(domain:string):string;function fileURLToPath(url:string|URL):string;function pathToFileURL(url:string):URL;interface URLFormatOptions{auth?:boolean;fragment?:boolean;search?:boolean;unicode?:boolean;}class URL{constructor(input:string,base?:string|URL);hash:string;host:string;hostname:string;href:string;readonly origin:string;password:string;pathname:string;port:string;protocol:string;search:string;readonly searchParams:URLSearchParams;username:string;toString():string;toJSON():string;}class URLSearchParams implements Iterable<[string,string]>{constructor(init?:URLSearchParams|string|NodeJS.Dict>|Iterable<[string,string]>|ReadonlyArray<[string,string]>);append(name:string,value:string):void;delete(name:string):void;entries():IterableIterator<[string,string]>;forEach(callback:(value:string,name:string,searchParams:this)=>void):void;get(name:string):string|null;getAll(name:string):string[];has(name:string):boolean;keys():IterableIterator;set(name:string,value:string):void;sort():void;toString():string;values():IterableIterator;[Symbol.iterator]():IterableIterator<[string,string]>;}} \ No newline at end of file