chdman
Version:
💿 chdman binaries and wrapper for Node.js.
18 lines • 595 B
JavaScript
import ChdmanBin from './chdmanBin.js';
export default {
/**
* Returns the chdman help message.
*/
async help(options, attempt = 1) {
const output = await ChdmanBin.run(['help']);
// Try to detect failures, and then retry them automatically
if (!output.trim() && attempt <= 3) {
await new Promise((resolve) => {
setTimeout(resolve, Math.random() * (2 ** (attempt - 1) * 20));
});
return this.help(options, attempt + 1);
}
return output;
},
};
//# sourceMappingURL=chdmanHelp.js.map