@ctrl/deluge
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -35,2 +35,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
baseURL: 'http://localhost:8112/', | ||
path: '/json', | ||
password: 'deluge' | ||
@@ -49,5 +50,2 @@ }; | ||
this.config = Object.assign({}, defaults, options); | ||
if (this.config.baseURL[this.config.baseURL.length - 1] !== '/') { | ||
this.config.baseURL += '/'; | ||
} | ||
} | ||
@@ -322,3 +320,3 @@ resetSession() { | ||
}; | ||
const url$$1 = url.resolve(this.config.baseURL, 'json'); | ||
const url$$1 = url.resolve(this.config.baseURL, this.config.path); | ||
return got.post(url$$1, { | ||
@@ -325,0 +323,0 @@ json: true, |
@@ -33,2 +33,3 @@ import { resolve } from 'url'; | ||
baseURL: 'http://localhost:8112/', | ||
path: '/json', | ||
password: 'deluge' | ||
@@ -47,5 +48,2 @@ }; | ||
this.config = Object.assign({}, defaults, options); | ||
if (this.config.baseURL[this.config.baseURL.length - 1] !== '/') { | ||
this.config.baseURL += '/'; | ||
} | ||
} | ||
@@ -320,3 +318,3 @@ resetSession() { | ||
}; | ||
const url = resolve(this.config.baseURL, 'json'); | ||
const url = resolve(this.config.baseURL, this.config.path); | ||
return got.post(url, { | ||
@@ -347,5 +345,5 @@ json: true, | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzKG9yaWdpbmFsKSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxZQUFZLGFBQWE7QUFDekIsUUFBUyxjQUFlO0FBQ3hCLE9BQU8sU0FBUztBQUNoQixRQUFTLGFBQWM7QUFDdkIsT0FBTyxjQUFjO0FBQ3JCLE9BQU8sUUFBUTtBQUNmLEtBQUEsQ0FBTSxXQUFXO0lBQ2IsU0FBUyx3QkFESSxDQUFBO0lBRWIsVUFBVTs7QUFFZCxPQUFPLEtBQUEsQ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IGN1cnJlbnQgc2Vzc2lvbiBpcyB2YWxpZFxyXG4gICAgICogQHJldHVybnMgdHJ1ZSBpZiB2YWxpZFxyXG4gICAgICovXHJcbiAgICBjaGVja1Nlc3Npb24oKSB7XHJcbiAgICAgICAgcmV0dXJuIHRzbGliXzEuX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkge1xyXG4gICAgICAgICAgICAvLyBjb29raWUgaXMgbWlzc2luZyBvciBleHBpcmVzIGluIHggc2Vjb25kc1xyXG4gICAgICAgICAgICBpZiAodGhpcy5jb29raWUpIHtcclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmNvb2tpZS5UVEwoKSA8IDUwMDApIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnJlc2V0U2Vzc2lvbigpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICh0aGlzLmNvb2tpZSkge1xyXG4gICAgICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCBjaGVjayA9IHlpZWxkIHRoaXMucmVxdWVzdCgnYXV0aC5jaGVja19zZXNzaW9uJywgdW5kZWZpbmVkLCBmYWxzZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNoZWNrLmJvZHkgJiYgY2hlY2suYm9keS5yZXN1bHQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgY2F0Y2ggKF9hKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gZG8gbm90aGluZ1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcb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ZW50KGZpbGVQYXRoLCBjb25maWcgPSB7fSkge1xyXG4gICAgICAgIHJldHVybiB0c2xpYl8xLl9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHtcclxuICAgICAgICAgICAgY29uc3QgdXBsb2FkID0geWllbGQgdGhpcy51cGxvYWQoZmlsZVBhdGgpO1xyXG4gICAgICAgICAgICBpZiAoIXVwbG9hZC5zdWNjZXNzIHx8ICF1cGxvYWQuZmlsZXMubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZhaWxlZCB0byB1cGxvYWQnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjb25zdCBwYXRoID0gdXBsb2FkLmZpbGVzWzBdO1xyXG4gICAgICAgICAgICBjb25zdCBvcHRpb25zID0gT2JqZWN0LmFzc2lnbih7IGZpbGVfcHJpb3JpdGllczogW10sIGFkZF9wYXVzZWQ6IGZhbHNlLCBjb21wYWN0X2FsbG9jYXRpb246IGZhbHNlLCBtYXhfY29ubmVjdGlvbnM6IC0xLCBtYXhfZG93bmxvYWRfc3BlZWQ6IC0xLCBtYXhfdXBsb2FkX3Nsb3RzOiAtMSwgbWF4X3VwbG9hZF9zcGVlZDogLTEsIHByaW9yaXRpemVfZmlyc3RfbGFzdF9waWVjZXM6IGZhbHNlIH0sIGNvbmZpZyk7XHJcbiAgICAgICAgICAgIGNvbnN0IHJlcyA9IHlpZWxkIHRoaXMucmVxdWVzdCgnd2ViLmFkZF90b3JyZW50cycsIFtcclxuICAgICAgICAgICAgICAgIFtcclxuICAgICAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMsXHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgIF0pO1xyXG4gICAg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SddKSB7XHJcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ09sZCBwYXNzd29yZCBpbmNvcnJlY3QnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAvLyB1cGRhdGUgY3VycmVudCBwYXNzd29yZCB0byBuZXcgcGFzc3dvcmRcclxuICAgICAgICAgICAgdGhpcy5jb25maWcucGFzc3dvcmQgPSBwYXNzd29yZDtcclxuICAgICAgICAgICAgdGhpcy5jb29raWUgPSBDb29raWUucGFyc2UocmVzLmhlYWRlcnNbJ3NldC1jb29raWUnXVswXSk7XHJcbiAgICAgICAgICAgIHJldHVybiByZXMuYm9keTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuICAgIGxpc3RUb3JyZW50cyhhZGRpdGlvbmFsRmllbGRzID0gW10pIHtcclxuICAgICAgICByZXR1cm4gdHNsaWJfMS5fX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uKiAoKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGZpZWxkcyA9IFtcclxuICAgICAgICAgICAgICAgICdkaXN0cmlidXRlZF9jb3BpZXMnLFxyXG4gICAgICAgICAgICAgICAgJ2Rvd25sb2FkX3BheWxvYWRfcmF0ZScsXHJcbiAgICAgICAgICAgICAgICAnZXRhJyxcclxuICAgICAgICAgICAgICAgICdpc19hdXRvX21hbmFnZWQnLFxyXG4gICAgICAgICAgICAgICAgJ21heF9kb3dubG9hZF9zcGVlZCcsXHJcbiAgICAgICAgICAgICAgICAnbWF4X3VwbG9hZF9zcGVlZCcsXHJcbiAgICAgICAgICAgICAgICAnbmFtZScsXHJcbiAgICAgICAgICAgICAgICAnbnVtX3BlZXJzJyxcclxuICAgICAgICAgICAgICAgICdudW1fc2VlZHMnLFxyXG4gICAgICAgICAgICAgICAgJ3Byb2dyZXNzJyxcclxuICAgICAgICAgICAgICAgICdxdWV1ZScsXHJcbiAgICAgICAgICAgICAgICAncmF0aW8nLFxyXG4gICAgICAgICAgICAgICAgJ3NhdmVfcGF0aCcsXHJcbiAgICAgICAgICAgICAgICAnc2VlZHNfcGVlcnNfcmF0aW8nLFxyXG4gICAgICAgICAgICAgICAgJ3N0YXRlJyxcclxuICAgICAgICAgICAgICAgICd0aW1lX2FkZGVkJyxcclxuICAgICAgICAgICAgICAgICd0b3RhbF9kb25lJyxcclxuICAgICAgICAgICAgICAgICd0b3RhbF9wZWVycycsXHJcbiAgICAgICAgICAgICAgICAndG90YWxfc2VlZHMnLFxyXG4gICAgICAgICAgICAgICAgJ3RvdGFsX3VwbG9hZGVkJyxcclxuICAgICAgICAgICAgICAgICd0b3RhbF93YW50ZWQnLFxyXG4gICAgICAgICAgICAgICAgJ3RyYWNrZXJfaG9zdCcsXHJcbiAgICAgICAgICAgICAgICAndXBsb2FkX3BheWxvYWRfcmF0ZScsXHJcbiAgICAgICAgICAgICAgICAuLi5hZGRpdGlvbmFsRmllbGRzLFxyXG4gICAgICAgICAgICBdO1xyXG4gICAgICAgICAgICBjb25zdCByZXEgPSB5aWVsZCB0aGlzLnJlcXVlc3QoJ3dlYi51cGRhdGVfdWknLCBbXHJcbiAgICAgICAgICAgICAgICBbLi4ubmV3IFNldChmaWVsZHMpXSxcclxuICAgICAgICAgICAgICAgIHt9LFxyXG4gICAgICAgICAgICBdKTtcclxuICAgICAgICAgICAgcmV0dXJuIHJlcS5ib2R5O1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG4gICAgLyoqXHJcbiAgICAgKiBnZXQgdG9ycmVudCBzdGF0ZS9zdGF0dXNcclxuICAgICAqIEBwYXJhbSBmaWVsZHMgZmllbGRzIGV4IC0gYFsncGVlcnMnXWBcclxuICAgICAqL1xyXG4gICAgZ2V0VG9ycmVudFN0YXR1cyh0b3JyZW50SWQsIGZpZWxkcyA9IFRPUlJFTlRfU1RBVFVTX0ZJRUxEUykge1xyXG4gICAgICAgIHJldHVybiB0c2xpYl8xLl9fYXdhaXRlcih0aGlzLCB2b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W9uKiAoKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IHJlcSA9IHlpZWxkIHRoaXMucmVxdWVzdCgnY29yZS5yZXN1bWVfdG9ycmVudCcsIFtbdG9ycmVudElkXV0pO1xyXG4gICAgICAgICAgICByZXR1cm4gcmVxLmJvZHk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcbiAgICBzZXRUb3JyZW50T3B0aW9ucyh0b3JyZW50SWQsIG9wdGlvbnMgPSB7fSkge1xyXG4gICAgICAgIHJldHVybiB0c2xpYl8xLl9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHtcclxuICAgICAgICAgICAgY29uc3QgcmVxID0geWllbGQgdGhpcy5yZXF1ZXN0KCdjb3JlLnNldF90b3JyZW50X29wdGlvbnMnLCBbXHJcbiAgICAgICAgICAgICAgICBbdG9ycmVudElkXSxcclxuICAgICAgICAgICAgICAgIG9wdGlvbnMsXHJcbiAgICAgICAgICAgIF0pO1xyXG4gICAgICAgICAgICByZXR1cm4gcmVxLmJvZHk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcbiAgICBzZXRUb3JyZW50VHJhY2tlcnModG9ycmVudElkLCB0cmFja2VycyA9IFtdKSB7XHJcbiAgICAgICAgcmV0dXJuIHRzbGliXzEuX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkge1xyXG4gICAgICAgICAgICBjb25zdCByZXEgPSB5aWVsZCB0aGlzLnJlcXVlc3QoJ2NvcmUuc2V0X3RvcnJlbnRfdHJhY2tlcnMnLCBbXHJcbiAgICAgICAgICAgICAgICBbdG9ycmVudElkXSxcclxuICAgICAgICAgICAgICAgIHRyYWNrZXJzLFxyXG4gICAgICAgICAgICBdKTtcclxuICAgICAgICAgICAgcmV0dXJuIHJlcS5ib2R5O1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG4gICAgcXVldWVVcCh0b3JyZW50SW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zLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHtcclxuICAgICAgICAgICAgY29uc3QgcmVxID0geWllbGQgdGhpcy5yZXF1ZXN0KCdjb3JlLmRpc2FibGVfcGx1Z2luJywgcGx1Z2lucyk7XHJcbiAgICAgICAgICAgIHJldHVybiByZXEuYm9keTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuICAgIHJlcXVlc3QobWV0aG9kLCBwYXJhbXMgPSBbXSwgbmVlZHNBdXRoID0gdHJ1ZSwgYXV0b0Nvbm5lY3QgPSB0cnVlKSB7XHJcbiAgICAgICAgcmV0dXJuIHRzbGliXzEuX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkge1xyXG4gICAgICAgICAgICBpZiAodGhpcy5tc2dJZCA9PT0gNDA5Nikge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5tc2dJZCA9IDA7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKG5lZWRzQXV0aCkge1xyXG4gICAgICAgICAgICAgICAgeWllbGQgdGhpcy52YWxpZGF0ZUF1dGgoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAobmVlZHNBdXRoICYmIGF1dG9Db25uZWN0KSB7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBpc0Nvbm5lY3RlZCA9IHlpZWxkIHRoaXMuY29ubmVjdGVkKCk7XHJcbiAgICAgICAgICAgICAgICBpZiAoIWlzQ29ubmVjdGVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgeWllbGQgdGhpcy5jb25uZWN0KCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY29uc3QgaGVhZGVycyA9IHtcclxuICAgICAgICAgICAgICAgIENvb2tpZTogdGhpcy5jb29raWUgJiYgdGhpcy5jb29raWUuY29va2llU3RyaW5nKCksXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIGNvbnN0IHVybCA9IHJlc29sdmUodGhpcy5jb25maWcuYmFzZVVSTCwgJ2pzb24nKTtcclxuICAgICAgICAgICAgcmV0dXJuIGdvdC5wb3N0KHVybCwge1xyXG4gICAgICAgICAgICAgICAganNvbjogdHJ1ZSxcclxuICAgICAgICAgICAgICAgIGJvZHk6IHtcclxuICAgICAgICAgICAgICAgICAgICBtZXRob2QsXHJcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLFxyXG4gICAgICAgICAgICAgICAgICAgIGlkOiB0aGlzLm1zZ0lkKyssXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgaGVhZGVycyxcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcbiAgICB2YWxpZGF0ZUF1dGgoKSB7XHJcbiAgICAgICAgcmV0dXJuIHRzbGliXzEuX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkge1xyXG4gICAgICAgICAgICBsZXQgdmFsaWRBdXRoID0geWllbGQgdGhpcy5jaGVja1Nlc3Npb24oKTtcclxuICAgICAgICAgICAgaWYgKCF2YWxpZEF1dGgpIHtcclxuICAgICAgICAgICAgICAgIHZhbGlkQXV0aCA9IHlpZWxkIHRoaXMubG9naW4oKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoIXZhbGlkQXV0aCkge1xyXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdJbnZhbGlkIEF1dGgnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG59XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmpzLm1hcCJdfQ== | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzKG9yaWdpbmFsKSJdLCJuYW1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ZXF1ZXN0KCd3ZWIuZ2V0X2hvc3Rfc3RhdHVzJywgW2hvc3RdLCB0cnVlLCBmYWxzZSk7XHJcbiAgICAgICAgICAgIHJldHVybiByZXMuYm9keTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuICAgIC8qKlxyXG4gICAgICogQ29ubmVjdHMgZGVsdWdlXHJcbiAgICAgKiBAcGFyYW0gW2hvc3RdIGluZGV4IG9mIGhvc3QgdG8gdXNlIGluIHJlc3VsdCBvZiBnZXQgaG9zdHNcclxuICAgICAqIEBwYXJhbSBbaG9zdElkeF0gaW5kZXggb2YgaG9zdCB0byB1c2UgaW4gcmVzdWx0IG9mIGdldCBob3N0c1xyXG4gICAgICovXHJcbiAgICBjb25uZWN0KHNlbGVjdGVkSG9zdCwgaG9zdElkeCA9IDApIHtcclxuICAgICAgICByZXR1cm4gdHNsaWJfMS5fX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uKiAoKSB7XHJcbiAgICAgICAgICAgIGxldCBob3N0ID0gc2VsZWN0ZWRIb3N0O1xyXG4gICAgICAgICAgICBpZiAoIWhvc3QpIHtcclxuICAgICAgICAgICAgICAgIGNvbnN0IGhvc3RzID0geWllbGQgdGhpcy5nZXRIb3N0cygpO1xyXG4gICAgICAgICAgICAgICAgaG9zdCA9IGhvc3RzLnJlc3VsdFtob3N0SWR4XVswXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoIWhvc3QpIHtcclxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignTm8gaG9zdHMgZm91bmQnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjb25zdCByZXMgPSB5aWVsZCB0aGlzLnJlcXVlc3QoJ3dlYi5jb25uZWN0JywgW2hvc3RdLCB0cnVlLCBmYWxzZSk7XHJcbiAgICAgICAgICAgIHJldHVybiByZXMuYm9keTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuICAgIG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B0c2xpYl8xLl9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHtcclxuICAgICAgICAgICAgLy8gY29va2llIGlzIG1pc3Npbmcgb3IgZXhwaXJlcyBpbiB4IHNlY29uZHNcclxuICAgICAgICAgICAgaWYgKHRoaXMuY29va2llKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5jb29raWUuVFRMKCkgPCA1MDAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXNldFNlc3Npb24oKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAodGhpcy5jb29raWUpIHtcclxuICAgICAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY2hlY2sgPSB5aWVsZCB0aGlzLnJlcXVlc3QoJ2F1dGguY2hlY2tfc2Vzc2lvbicsIHVuZGVmaW5lZCwgZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChjaGVjay5ib2R5ICYmIGNoZWNrLmJvZHkucmVzdWx0KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGNhdGNoIChfYSkge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIGRvIG5vdGhpbmdcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB0aGlzLnJlc2V0U2Vzc2lvbigpO1xyXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcbiAgICAvKipcclxuICAgICAqIExvZ2luIGRlbHVnZVxyXG4gICAgICogQHJldHVybnMgdHJ1ZSBpZiBzdWNjZXNzXHJcbiAgICAgKi9cclxuICAgIGxvZ2luKCkge1xyXG4gICAgICAgIHJldHVybiB0c2xpYl8xLl9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHtcclxuICAgICAgICAgICAgdGhpcy5yZXNldFNlc3Npb24oKTtcclxuICAgICAgICAgICAgY29uc3QgcmVzID0geWllbGQgdGhpcy5yZXF1ZXN0KCdhdXRoLmxvZ2luJywgW3RoaXMuY29uZmlnLnBhc3N3b3JkXSwgZmFsc2UpO1xyXG4gICAgICAgICAgICBpZiAoIXJlcy5ib2R5LnJlc3VsdCB8fCAhcmVzLmhlYWRlcnMgfHwgIXJlcy5oZWFkZXJzWydzZXQtY29va2llJ10pIHtcclxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQXV0aCBmYWlsZWQsIGluY29ycmVjdCBwYXNzd29yZCcpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHRoaXMuY29va2llID0gQ29va2llLnBhcnNlKHJlcy5oZWFkZXJzWydzZXQtY29va2llJ11bMF0pO1xyXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuICAgIC8qKlxyXG4gICAgICogTG9nb3V0IGRlbHVnZVxyXG4gICAgICogQHJldHVybnMgdHJ1ZSBpZiBzdWNjZXNzXHJcbiAgICAgKi9cclxuICAgIGxvZ291dCgpIHtcclxuICAgICAgICByZXR1cm4gdHNsaWJfMS5fX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uKiAoKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IHJlcyA9IHlpZWxkIHRoaXMucmVxdWVzdCgnYXV0aC5kZWxldGVfc2Vzc2lvbicpO1xyXG4gICAgICAgICAgICB0aGlzLnJlc2V0U2Vzc2lvbigpO1xy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xkIHRoaXMudXBsb2FkKGZpbGVQYXRoKTtcclxuICAgICAgICAgICAgaWYgKCF1cGxvYWQuc3VjY2VzcyB8fCAhdXBsb2FkLmZpbGVzLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdGYWlsZWQgdG8gdXBsb2FkJyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY29uc3QgcGF0aCA9IHVwbG9hZC5maWxlc1swXTtcclxuICAgICAgICAgICAgY29uc3Qgb3B0aW9ucyA9IE9iamVjdC5hc3NpZ24oeyBmaWxlX3ByaW9yaXRpZXM6IFtdLCBhZGRfcGF1c2VkOiBmYWxzZSwgY29tcGFjdF9hbGxvY2F0aW9uOiBmYWxzZSwgbWF4X2Nvbm5lY3Rpb25zOiAtMSwgbWF4X2Rvd25sb2FkX3NwZWVkOiAtMSwgbWF4X3VwbG9hZF9zbG90czogLTEsIG1heF91cGxvYWRfc3BlZWQ6IC0xLCBwcmlvcml0aXplX2ZpcnN0X2xhc3RfcGllY2VzOiBmYWxzZSB9LCBjb25maWcpO1xyXG4gICAgICAgICAgICBjb25zdCByZXMgPSB5aWVsZCB0aGlzLnJlcXVlc3QoJ3dlYi5hZGRfdG9ycmVudHMnLCBbXHJcbiAgICAgICAgICAgICAgICBbXHJcbiAgICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXRoLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLFxyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBdLFxyXG4gICAgICAgICAgICBdKTtcclxuICAgICAgICAgICAgcmV0dXJuIHJlcy5ib2R5O1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG4gICAgLyoqXHJcbiAgICAgKlxyXG4gICAgICogQHBhcmFtIHRvcnJlbnRJZCB0b3JyZW50IGlkIGZyb20gbGlzdCB0b3JyZW50c1xyXG4gICA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XHJcbiAgICAgICAgICAgIHRoaXMuY29uZmlnLnBhc3N3b3JkID0gcGFzc3dvcmQ7XHJcbiAgICAgICAgICAgIHRoaXMuY29va2llID0gQ29va2llLnBhcnNlKHJlcy5oZWFkZXJzWydzZXQtY29va2llJ11bMF0pO1xyXG4gICAgICAgICAgICByZXR1cm4gcmVzLmJvZHk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcbiAgICBsaXN0VG9ycmVudHMoYWRkaXRpb25hbEZpZWxkcyA9IFtdKSB7XHJcbiAgICAgICAgcmV0dXJuIHRzbGliXzEuX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkge1xyXG4gICAgICAgICAgICBjb25zdCBmaWVsZHMgPSBbXHJcbiAgICAgICAgICAgICAgICAnZGlzdHJpYnV0ZWRfY29waWVzJyxcclxuICAgICAgICAgICAgICAgICdkb3dubG9hZF9wYXlsb2FkX3JhdGUnLFxyXG4gICAgICAgICAgICAgICAgJ2V0YScsXHJcbiAgICAgICAgICAgICAgICAnaXNfYXV0b19tYW5hZ2VkJyxcclxuICAgICAgICAgICAgICAgICdtYXhfZG93bmxvYWRfc3BlZWQnLFxyXG4gICAgICAgICAgICAgICAgJ21heF91cGxvYWRfc3BlZWQnLFxyXG4gICAgICAgICAgICAgICAgJ25hbWUnLFxyXG4gICAgICAgICAgICAgICAgJ251bV9wZWVycycsXHJcbiAgICAgICAgICAgICAgICAnbnVtX3NlZWRzJyxcclxuICAgICAgICAgICAgICAgICdwcm9ncmVzcycsXHJcbiAgICAgICAgICAgICAgICAncXVldWUnLFxyXG4gICAgICAgICAgICAgICAgJ3JhdGlvJyxcclxuICAgICAgICAgICAgICAgICdzYXZlX3BhdGgnLFxyXG4gICAgICAgICAgICAgICAgJ3NlZWRzX3BlZXJzX3JhdGlvJyxcclxuICAgICAgICAgICAgICAgICdzdGF0ZScsXHJcbiAgICAgICAgICAgICAgICAndGltZV9hZGRlZCcsXHJcbiAgICAgICAgICAgICAgICAndG90YWxfZG9uZScsXHJcbiAgICAgICAgICAgICAgICAndG90YWxfcGVlcnMnLFxyXG4gICAgICAgICAgICAgICAgJ3RvdGFsX3NlZWRzJyxcclxuICAgICAgICAgICAgICAgICd0b3RhbF91cGxvYWRlZCcsXHJcbiAgICAgICAgICAgICAgICAndG90YWxfd2FudGVkJyxcclxuICAgICAgICAgICAgICAgICd0cmFja2VyX2hvc3QnLFxyXG4gICAgICAgICAgICAgICAgJ3VwbG9hZF9wYXlsb2FkX3JhdGUnLFxyXG4gICAgICAgICAgICAgICAgLi4uYWRkaXRpb25hbEZpZWxkcyxcclxuICAgICAgICAgICAgXTtcclxuICAgICAgICAgICAgY29uc3QgcmVxID0geWllbGQgdGhpcy5yZXF1ZXN0KCd3ZWIudXBkYXRlX3VpJywgW1xyXG4gICAgICAgICAgICAgICAgWy4uLm5ldyBTZXQoZmllbGRzKV0sXHJcbiAgICAgICAgICAgICAgICB7fSxcclxuICAgICAgICAgICAgXSk7XHJcbiAgICAgICAgICAgIHJldHVybiByZXEuYm9keTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuICAgIC8qKlxyXG4gICAgICogZ2V0IHRvcnJlbnQgc3RhdGUvc3RhdHVzXHJcbiAgICAgKiBAcGFyYW0gZmllbGRzIGZpZWxkcyBleCAtIGBbJ3BlZXJzJ11gXHJcbiAgICAgKi9cclxuICAgIGdldFRvcnJlbnRTdGF0dXModG9ycmVudElkLCBmaWVsZHMgPSBUT1JSRU5UX1NUQVRVU19GSUVMRFMpIHtcclxuICAgICAgICByZXR1cm4gdHNsaWJfMS5fX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uKiAoKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IHJlcSA9IHlpZWxkIHRoaXMucmVxdWVzdCgnd2ViLmdldF90b3JyZW50X3N0YXR1cycsIFt0b3JyZW50SWQsIGZpZWxkc10pO1xyXG4gICAgICAgICAgICByZXR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ICAgfVxyXG4gICAgc2V0VG9ycmVudE9wdGlvbnModG9ycmVudElkLCBvcHRpb25zID0ge30pIHtcclxuICAgICAgICByZXR1cm4gdHNsaWJfMS5fX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uKiAoKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IHJlcSA9IHlpZWxkIHRoaXMucmVxdWVzdCgnY29yZS5zZXRfdG9ycmVudF9vcHRpb25zJywgW1xyXG4gICAgICAgICAgICAgICAgW3RvcnJlbnRJZF0sXHJcbiAgICAgICAgICAgICAgICBvcHRpb25zLFxyXG4gICAgICAgICAgICBdKTtcclxuICAgICAgICAgICAgcmV0dXJuIHJlcS5ib2R5O1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG4gICAgc2V0VG9ycmVudFRyYWNrZXJzKHRvcnJlbnRJZCwgdHJhY2tlcnMgPSBbXSkge1xyXG4gICAgICAgIHJldHVybiB0c2xpYl8xLl9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHtcclxuICAgICAgICAgICAgY29uc3QgcmVxID0geWllbGQgdGhpcy5yZXF1ZXN0KCdjb3JlLnNldF90b3JyZW50X3RyYWNrZXJzJywgW1xyXG4gICAgICAgICAgICAgICAgW3RvcnJlbnRJZF0sXHJcbiAgICAgICAgICAgICAgICB0cmFja2VycyxcclxuICAgICAgICAgICAgXSk7XHJcbiAgICAgICAgICAgIHJldHVybiByZXEuYm9keTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuICAgIHF1ZXVlVXAodG9ycmVudElkKSB7XHJcbiAgICAgICAgcmV0dXJuIHRzbGliXzEuX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkge1xyXG4gICAgICAgICAgICBjb25zdCByZXEgPSB5aWVsZCB0aGlzLnJlcXVlc3QoJ2NvcmUucXVldWVfdXAnLCBbW3RvcnJlbn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ICAgfSk7XHJcbiAgICB9XHJcbiAgICByZXF1ZXN0KG1ldGhvZCwgcGFyYW1zID0gW10sIG5lZWRzQXV0aCA9IHRydWUsIGF1dG9Db25uZWN0ID0gdHJ1ZSkge1xyXG4gICAgICAgIHJldHVybiB0c2xpYl8xLl9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHtcclxuICAgICAgICAgICAgaWYgKHRoaXMubXNnSWQgPT09IDQwOTYpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMubXNnSWQgPSAwO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChuZWVkc0F1dGgpIHtcclxuICAgICAgICAgICAgICAgIHlpZWxkIHRoaXMudmFsaWRhdGVBdXRoKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKG5lZWRzQXV0aCAmJiBhdXRvQ29ubmVjdCkge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgaXNDb25uZWN0ZWQgPSB5aWVsZCB0aGlzLmNvbm5lY3RlZCgpO1xyXG4gICAgICAgICAgICAgICAgaWYgKCFpc0Nvbm5lY3RlZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHlpZWxkIHRoaXMuY29ubmVjdCgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNvbnN0IGhlYWRlcnMgPSB7XHJcbiAgICAgICAgICAgICAgICBDb29raWU6IHRoaXMuY29va2llICYmIHRoaXMuY29va2llLmNvb2tpZVN0cmluZygpLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBjb25zdCB1cmwgPSByZXNvbHZlKHRoaXMuY29uZmlnLmJhc2VVUkwsIHRoaXMuY29uZmlnLnBhdGgpO1xyXG4gICAgICAgICAgICByZXR1cm4gZ290LnBvc3QodXJsLCB7XHJcbiAgICAgICAgICAgICAgICBqc29uOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgYm9keToge1xyXG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZCxcclxuICAgICAgICAgICAgICAgICAgICBwYXJhbXMsXHJcbiAgICAgICAgICAgICAgICAgICAgaWQ6IHRoaXMubXNnSWQrKyxcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBoZWFkZXJzLFxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuICAgIHZhbGlkYXRlQXV0aCgpIHtcclxuICAgICAgICByZXR1cm4gdHNsaWJfMS5fX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uKiAoKSB7XHJcbiAgICAgICAgICAgIGxldCB2YWxpZEF1dGggPSB5aWVsZCB0aGlzLmNoZWNrU2Vzc2lvbigpO1xyXG4gICAgICAgICAgICBpZiAoIXZhbGlkQXV0aCkge1xyXG4gICAgICAgICAgICAgICAgdmFsaWRBdXRoID0geWllbGQgdGhpcy5sb2dpbigpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICghdmFsaWRBdXRoKSB7XHJcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ludmFsaWQgQXV0aCcpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcbn1cclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguanMubWFwIl19 | ||
export { TORRENT_STATUS_FIELDS, Deluge }; | ||
//# sourceMappingURL=deluge.m.js.map |
{ | ||
"name": "@ctrl/deluge", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "Scott Cooper <scttcper@gmail.com>", |
@@ -0,1 +1,2 @@ | ||
import { Response } from 'got'; | ||
import { Cookie } from 'tough-cookie'; | ||
@@ -84,4 +85,4 @@ import { DelugeConfig, GetHostsResponse, GetHostStatusResponse, DefaultResponse, BooleanStatus, TorrentInfo, ListMethods, UploadResponse, AddTorrentOptions, TorrentListResponse, DelugeSettings, PluginInfo, ConfigResponse, PluginsListResponse, TorrentOptions, TorrentFiles, TorrentStatus, Tracker } from './types'; | ||
disablePlugin(plugins: string[]): Promise<DefaultResponse>; | ||
private request; | ||
request<T extends object>(method: string, params?: any[], needsAuth?: boolean, autoConnect?: boolean): Promise<Response<T>>; | ||
private validateAuth; | ||
} |
export interface DelugeConfig { | ||
/** | ||
* baseurl ex - `'http://localhost:8112/'` | ||
*/ | ||
baseURL: string; | ||
/** | ||
* ex - `'/json'` | ||
*/ | ||
path: string; | ||
password: string; | ||
@@ -4,0 +11,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1367
112764