UNPKG

@pmouli/isy-matter-server

Version:

Service to expose an ISY device as a Matter Border router

92 lines 3.82 kB
import winston from 'winston'; import type * as MatterServer from 'isy-matter/Bridge/Server'; import type { ServerLogLevel } from 'isy-matter/Bridge/Server'; import type { ISY } from 'isy-nodejs/ISY'; import { Socket } from 'net'; import TransportStream from 'winston-transport'; import { type ProgramOptions } from './main.js'; export declare let isyConfig: ISY.Config; export declare let matterConfig: MatterServer.Config; export declare let serverConfig: { logLevel: string; logPath: string; workingDir: string; subprocess: boolean; }; export declare let options: ProgramOptions; declare global { interface String { left(numChars: number): string; leftWithToken(maxNumChars: number, token?: string): string; remove(searchValue: string | RegExp): string; removeAll(searchValue: string | RegExp): string; right(numChars: number): string; rightWithToken(maxNumChars: number, token?: string): string; } namespace NodeJS { interface ProcessEnv { ISY_HOST_PORT: number; ISY_HOST_PROTOCOL: 'http' | 'https'; ISY_HOST_URL: string; ISY_PASSWORD: string; ISY_USERNAME: string; LOG_FILE: string; LOG_LEVEL: ServerLogLevel; MATTER_LOG_LEVEL: ServerLogLevel; IOX_MATTER_LOG_LEVEL: ServerLogLevel; MATTER_JS_LOG_LEVEL: ServerLogLevel; ISY_LOG_LEVEL: ServerLogLevel; MATTER_DISCRIMINATOR: number; MATTER_PASSCODE: number; MATTER_PORT: number; MATTER_PRODUCTID: string; MATTER_VENDORID: string; WORKING_DIR: string; ISY_SOCKET_PATH: string; SUBPROCESS: boolean; } } } export declare function right(this: string, numChars: number): string; export declare function left(this: string, numChars: number): string; export declare function rightWithToken(this: string, maxNumChars: number, token?: string): string; export declare function leftWithToken(this: string, maxNumChars: number, token?: string): string; export declare function remove(this: string, searchValue: string | RegExp): string; export declare function removeAll(this: string, searchValue: string | RegExp): string; export declare const myFormat: winston.Logform.Format; export declare function zPad2(str: number): string; export declare function loadConfigs(options: ProgramOptions): Promise<{ isyConfig?: ISY.Config; matterConfig?: MatterServer.Config; serverConfig?: { logLevel: string; logPath: string; workingDir: string; subprocess: any; }; }>; export declare function createLogger(): winston.Logger; export declare let logger: winston.Logger; export declare const tagFormat: winston.Logform.Format; export declare let overrides: Overrides; export type Overrides = { isyConfig?: Partial<ISY.Config>; matterConfig?: Partial<MatterServer.Config>; serverConfig?: { logLevel?: string; logPath?: string; workingDir?: string; }; }; export declare function updateConfigs(config: Partial<Overrides>): Promise<void>; export declare function initialize(): Promise<void>; export declare let clientLogTransport: winston.transport; export declare function removeClientLogTransport(): Promise<void>; export declare class ProcessTransport extends TransportStream { proc: NodeJS.Process; constructor(proc?: NodeJS.Process, options?: TransportStream.TransportStreamOptions); log(info: any, callback: () => void): void; } export declare function addClientLogTransport(socket: Socket | NodeJS.Process): void; export declare function handleExit(...tasks: (() => Promise<void>)[]): (signal: NodeJS.Signals) => Promise<void>; //# sourceMappingURL=utils.d.ts.map