@iobroker/js-controller-common
Advanced tools
Comparing version 4.1.0-alpha.18-20220402-768cb6b7 to 4.1.0-alpha.19-20220404-b8487968
@@ -440,20 +440,2 @@ /// <reference types="node" /> | ||
/** | ||
* Checks if the given callback is a function and if so calls it with the given parameter immediately, else a resolved Promise is returned | ||
* | ||
* @param callback - callback function to be executed | ||
* @param args - as many arguments as needed, which will be returned by the callback function or by the Promise | ||
* @returns if Promise is resolved with multiple arguments, an array is returned | ||
*/ | ||
export declare function maybeCallback(callback?: (...args: any[]) => void | null | undefined, ...args: any[]): Promise<any> | void; | ||
/** | ||
* Checks if the given callback is a function and if so calls it with the given error and parameter immediately, else a resolved or rejected Promise is returned. Error ERROR_DB_CLOSED are not rejecting the promise | ||
* | ||
* @param callback - callback function to be executed | ||
* @param error - error which will be used by the callback function. If callback is not a function and | ||
* error is given, a rejected Promise is returned. If error is given but it is not an instance of Error, it is converted into one. | ||
* @param args - as many arguments as needed, which will be returned by the callback function or by the Promise | ||
* @returns if Promise is resolved with multiple arguments, an array is returned | ||
*/ | ||
export declare function maybeCallbackWithError(callback: ((error: Error | null | undefined, ...args: any[]) => void) | null | undefined, error: Error | string | null | undefined, ...args: any[]): Promise<any> | void; | ||
/** | ||
* Executes a command asynchronously. On success, the promise resolves with stdout and stderr. | ||
@@ -525,3 +507,4 @@ * On error, the promise rejects with the exit code or signal, as well as stdout and stderr. | ||
export declare function getInstanceIndicatorObjects(namespace: string, createWakeup: boolean): ioBroker.StateObject[]; | ||
export declare function getLogger(log: any): Record<string, (msg: string) => void>; | ||
export declare type InternalLogger = Omit<ioBroker.Logger, 'level'>; | ||
export declare function getLogger(log: any): InternalLogger; | ||
export interface OrderedInstancesObject { | ||
@@ -569,3 +552,3 @@ 1: ioBroker.InstanceObject[]; | ||
export declare function compressFileGZip(inputFilename: string, outputFilename: string, options?: GZipFileOptions): Promise<void>; | ||
export {}; | ||
export * from './maybeCallback'; | ||
//# sourceMappingURL=tools.d.ts.map |
{ | ||
"name": "@iobroker/js-controller-common", | ||
"version": "4.1.0-alpha.18-20220402-768cb6b7", | ||
"version": "4.1.0-alpha.19-20220404-b8487968", | ||
"engines": { | ||
@@ -26,3 +26,3 @@ "node": ">=12.0.0" | ||
"winston": "^3.6.0", | ||
"winston-daily-rotate-file": "^4.6.0" | ||
"winston-daily-rotate-file": "^4.6.1" | ||
}, | ||
@@ -47,2 +47,9 @@ "keywords": [ | ||
"types": "build/index.d.ts", | ||
"typesVersions": { | ||
"*": { | ||
"tools": [ | ||
"build/lib/common/tools" | ||
] | ||
} | ||
}, | ||
"license": "MIT", | ||
@@ -52,2 +59,7 @@ "publishConfig": { | ||
}, | ||
"exports": { | ||
".": "./build/index.js", | ||
"./package.json": "./package.json", | ||
"./tools": "./build/lib/common/tools.js" | ||
}, | ||
"files": [ | ||
@@ -58,3 +70,3 @@ "build/lib/", | ||
], | ||
"gitHead": "ac282457abede7e51d4051ace73f47c62804e0cb" | ||
"gitHead": "fe0292f5dd6d4c00c059e5623c806bc58f820b10" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
324405
25
4806
+ Addedsemver@7.7.1(transitive)
- Removedsemver@7.7.0(transitive)