()
| 12 | } |
| 13 | |
| 14 | loadConfig() { |
| 15 | try { |
| 16 | const configData = fs.readFileSync(this.configPath, 'utf8'); |
| 17 | return JSON.parse(configData); |
| 18 | } catch (error) { |
| 19 | console.error('Error loading config:', error.message); |
| 20 | process.exit(1); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | async makeRequest(options, data = null, isStream = false) { |
| 25 | return new Promise((resolve, reject) => { |