chore(): generate docs
This commit is contained in:
parent
6f5a34b7d0
commit
d26d87507d
73 changed files with 273 additions and 234 deletions
|
|
@ -4,7 +4,7 @@
|
|||
<head>
|
||||
<meta name="generator" content="JSDoc 3.6.11">
|
||||
<meta charset="utf-8">
|
||||
<title>whatsapp-web.js 1.26.1-alpha.3 » Source: authStrategies/LocalAuth.js</title>
|
||||
<title>whatsapp-web.js 1.27.0 » Source: authStrategies/LocalAuth.js</title>
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||||
<div id="jsdoc-navbar-container">
|
||||
<div id="jsdoc-navbar-content">
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>26.<wbr>1-alpha.<wbr>3</a>
|
||||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>27.<wbr>0</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
@ -40,9 +40,10 @@ const BaseAuthStrategy = require('./BaseAuthStrategy');
|
|||
* @param {object} options - options
|
||||
* @param {string} options.clientId - Client id to distinguish instances if you are using multiple, otherwise keep null if you are using only one instance
|
||||
* @param {string} options.dataPath - Change the default path for saving session files, default is: "./.wwebjs_auth/"
|
||||
* @param {number} options.rmMaxRetries - Sets the maximum number of retries for removing the session directory
|
||||
*/
|
||||
class LocalAuth extends BaseAuthStrategy {
|
||||
constructor({ clientId, dataPath }={}) {
|
||||
constructor({ clientId, dataPath, rmMaxRetries }={}) {
|
||||
super();
|
||||
|
||||
const idRegex = /^[-_\w]+$/i;
|
||||
|
|
@ -52,6 +53,7 @@ class LocalAuth extends BaseAuthStrategy {
|
|||
|
||||
this.dataPath = path.resolve(dataPath || './.wwebjs_auth/');
|
||||
this.clientId = clientId;
|
||||
this.rmMaxRetries = rmMaxRetries ?? 4;
|
||||
}
|
||||
|
||||
async beforeBrowserInitialized() {
|
||||
|
|
@ -75,7 +77,7 @@ class LocalAuth extends BaseAuthStrategy {
|
|||
|
||||
async logout() {
|
||||
if (this.userDataDir) {
|
||||
await fs.promises.rm(this.userDataDir, { recursive: true, force: true })
|
||||
await fs.promises.rm(this.userDataDir, { recursive: true, force: true, maxRetries: this.rmMaxRetries })
|
||||
.catch((e) => {
|
||||
throw new Error(e);
|
||||
});
|
||||
|
|
@ -95,7 +97,7 @@ module.exports = LocalAuth;
|
|||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||||
<div id="jsdoc-footer-container">
|
||||
<p>
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.11 on November 22, 2024.
|
||||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.11 on March 27, 2025.
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
|
|||
Loading…
Reference in a new issue