Comparing version 1.2.2 to 1.2.3
@@ -18,3 +18,3 @@ import ax, { AxiosRequestConfig, AxiosResponse } from 'axios'; | ||
if(!clientId) { | ||
let client_id = (<AxiosResponse> await ax.get('https://a-v2.sndcdn.com/assets/1-d3973efe-3.js', {responseType:'text'}).catch(()=>{}))?.data | ||
let client_id = (<AxiosResponse> await ax.get('https://a-v2.sndcdn.com/assets/1-28868269-3.js', {responseType:'text'}).catch(()=>{}))?.data | ||
.match(/client_id=(\w+)&/)?.[0].replace(/client_id=(\w+)&/, '$1') ?? ''; | ||
@@ -35,4 +35,2 @@ if(!client_id) | ||
/** | ||
@@ -101,3 +99,8 @@ * Downloads given track by its ID | ||
opts.params['q'] = query; | ||
let body = (await ax(opts))?.data?.collection; | ||
let body = (await ax(opts).catch(err => { | ||
switch(err.response.status) { | ||
case 401: case 404: throw Error("Authentication failed, module is probably broken right now"); | ||
} | ||
throw Error(err); | ||
}))?.data?.collection; | ||
body.forEach((s: any) => s.kind == 'track' && result.tracks.push({ | ||
@@ -104,0 +107,0 @@ name: s.title, |
@@ -27,3 +27,3 @@ "use strict"; | ||
if (!clientId) { | ||
let client_id = (_c = (_b = (_a = (await axios_1.default.get('https://a-v2.sndcdn.com/assets/1-d3973efe-3.js', { responseType: 'text' }).catch(() => { }))) === null || _a === void 0 ? void 0 : _a.data.match(/client_id=(\w+)&/)) === null || _b === void 0 ? void 0 : _b[0].replace(/client_id=(\w+)&/, '$1')) !== null && _c !== void 0 ? _c : ''; | ||
let client_id = (_c = (_b = (_a = (await axios_1.default.get('https://a-v2.sndcdn.com/assets/1-28868269-3.js', { responseType: 'text' }).catch(() => { }))) === null || _a === void 0 ? void 0 : _a.data.match(/client_id=(\w+)&/)) === null || _b === void 0 ? void 0 : _b[0].replace(/client_id=(\w+)&/, '$1')) !== null && _c !== void 0 ? _c : ''; | ||
if (!client_id) | ||
@@ -102,3 +102,9 @@ throw Error("Could not fetch client id, you can try to set it manually using the .setClientId() method"); | ||
opts.params['q'] = query; | ||
let body = (_b = (_a = (await axios_1.default(opts))) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.collection; | ||
let body = (_b = (_a = (await axios_1.default(opts).catch(err => { | ||
switch (err.response.status) { | ||
case 401: | ||
case 404: throw Error("Authentication failed, module is probably broken right now"); | ||
} | ||
throw Error(err); | ||
}))) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.collection; | ||
body.forEach((s) => s.kind == 'track' && result.tracks.push({ | ||
@@ -122,2 +128,2 @@ name: s.title, | ||
module.exports = SC; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9saWIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQSxrREFBOEQ7QUFDOUQsNkNBQTBDO0FBRTFDLElBQUksUUFBaUIsQ0FBQztBQUV0QixJQUFJLFVBQVUsR0FBRyxLQUFLLElBQUksRUFBRSxDQUFDLENBQXFCO0lBQzlDLEdBQUcsRUFBRSxzQ0FBc0M7SUFDM0MsWUFBWSxFQUFFLE1BQU07SUFDcEIsT0FBTyxFQUFFLElBQUk7SUFDYixNQUFNLEVBQUU7UUFDSixTQUFTLEVBQUUsTUFBTSxFQUFFLENBQUMsV0FBVyxFQUFFO0tBQ3BDO0NBQ0osQ0FBQSxDQUFBO0FBRUQsTUFBTSxFQUFFO0lBQ0osTUFBTSxDQUFDLEtBQUssQ0FBQyxXQUFXOztRQUNwQixJQUFHLENBQUMsUUFBUSxFQUFFO1lBQ1YsSUFBSSxTQUFTLHFCQUFHLENBQWlCLE1BQU0sZUFBRSxDQUFDLEdBQUcsQ0FBQyxnREFBZ0QsRUFBRSxFQUFDLFlBQVksRUFBQyxNQUFNLEVBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxHQUFFLEVBQUUsR0FBQy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/ICcnO1xyXG4gICAgICAgICAgICBpZighY2xpZW50X2lkKVxyXG4gICAgICAgICAgICAgICAgdGhyb3cgRXJyb3IoXCJDb3VsZCBub3QgZmV0Y2ggY2xpZW50IGlkLCB5b3UgY2FuIHRyeSB0byBzZXQgaXQgbWFudWFsbHkgdXNpbmcgdGhlIC5zZXRDbGllbnRJZCgpIG1ldGhvZFwiKTtcclxuICAgICAgICAgICAgY2xpZW50SWQgPSBjbGllbnRfaWQ7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBjbGllbnRJZDtcclxuICAgIH1cclxuXHJcbiAgICBzdGF0aWMgc2V0Q2xpZW50SWQoaWQ6IHN0cmluZykge1xyXG4gICAgICAgIGlmKCEoL1tBLXowLTldKy8pLnRlc3QoaWQpKVxyXG4gICAgICAgICAgICB0aHJvdyBFcnJvcignSW52YWxpZCBDbGllbnQgSUQnKTtcclxuICAgICAgICBjbGllbnRJZCA9IGlkO1xyXG4gICAgICAgIHJldHVybiBTQztcclxuICAgIH1cclxuXHJcbiAgICBcclxuXHJcbiAgICAvKipcclxuICAgICAqIERvd25sb2FkcyBnaXZlbiB0cmFjayBieSBpdHMgSURcclxuICAgICAqIEBwYXJhbSB0cmFja0lkIFxyXG4gICAgICogQHBhcmFtIHJhd09wdXMgU2hvdWxkIHRoZSBzdHJlYW0gYmUgdHJhbnNmb3JtZWQgaW50byByYXcgb3B1cyBwYWNrZXQgc3RyZWFtPyAodXNlZnVsIGZvciBkaXNjb3JkLmpzKSAocmVxdWlyZXMgcGVlckRlcGVuZGVuY2llcylcclxuICAgICAqIEByZXR1cm5zIC5tcDMgZGF0YSBzdHJlYW0gb3Igb3B1cyBwYWNrZXQgc3RyZWFtIGlmIHNwZWNpZmllZCBieSByYXdPcHVzIHBhcmFtZXRlclxyXG4gICAgICovXHJcbiAgICBzdGF0aWMgYXN5bmMgZG93bmxvYWQodHJhY2tJZDogbnVtYmVyIHwgc3RyaW5nLCByYXdPcHVzPzogYm9vbGVhb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KGAke2luZm9Vcmx9P2NsaWVudF9pZD0ke2F3YWl0IFNDLmdldENsaWVudElkKCl9YCwge3Jlc3BvbnNlVHlwZTonanNvbid9KS5jYXRjaCgoKT0+e30pIGFzIEF4aW9zUmVzcG9uc2UpPy5kYXRhPy51cmwgYXMgc3RyaW5nO1xyXG4gICAgICAgIGlmKCFzdHJVcmwpXHJcbiAgICAgICAgICAgIHRocm93IEVycm9yKCdDb3VsZCBub3QgbG9hZCBzdHJlYW0gVVJMJyk7XHJcblxyXG4gICAgICAgIGlmKHJhd09wdXMpIHtcclxuICAgICAgICAgICAgLy9AdHMtaWdub3JlXHJcbiAgICAgICAgICAgIGNvbnN0IHByaXNtID0gYXdhaXQgaW1wb3J0KCdwcmlzbS1tZWRpYScpO1xyXG4gICAgICAgICAgICBjb25zdCB0cmFuc2NvZGVyID0gbmV3IHByaXNtLkZGbXBlZyh7XHJcbiAgICAgICAgICAgICAgICBhcmdzOiBbXHJcbiAgICAgICAgICAgICAgICAgICAgJy1yZWNvbm5lY3QnLCAnMScsXHJcblx0XHQgICAgXHRcdCctcmVjb25uZWN0X3N0cmVhbWVkJywgJzEnLFxyXG5cdFx0ICAgIFx0XHQnLXJlY29ubmVjdF9kZWxheV9tYXgnLCAnNScsXHJcblx0XHQgICAgXHRcdCctaScsIHN0clVybCxcclxuXHRcdCAgICBcdFx0Jy1hbmFseXplZHVyYXRpb24nLCAnMCcsXHJcblx0XHQgICAgXHRcdCctbG9nbGV2ZWwnLCAnMCcsXHJcblx0XHQgICAgXHRcdCctZicsICdzMTZsZScsXHJcblx0XHQgICAgXHRcdCctYXInLCAnNDgwMDAnLFxyXG5cdFx0ICAgIFx0XHQnLWFjJywgJzInLFxyXG4gICAgICAgICAgICAgICAgXVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgY29uc3Qgb3B1cyA9IG5ldyBwcmlzbS5vcHVzLkVuY29kZXIoeyByYXRlOiA0ODAwMCwgY2hhbm5lbHM6IDIsIGZyYW1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gICAgIGJvZHkuZm9yRWFjaCgoczogYW55KSA9PiBzLmtpbmQgPT0gJ3RyYWNrJyAmJiByZXN1bHQudHJhY2tzLnB1c2goe1xyXG4gICAgICAgICAgICBuYW1lOiBzLnRpdGxlLFxyXG4gICAgICAgICAgICBpZDogcy5pZCxcclxuICAgICAgICAgICAgZGVzY3JpcHRpb246IHMuZGVzY3JpcHRpb24sXHJcbiAgICAgICAgICAgIHRodW1ibmFpbDogcy5hcnR3b3JrX3VybCxcclxuICAgICAgICAgICAgbWlsaXM6IHMuZHVyYXRpb24sXHJcbiAgICAgICAgICAgIGR1cmF0aW9uOiBTQy5taWxpc1RvVGltZXN0YW1wKHMuZHVyYXRpb24pLFxyXG4gICAgICAgICAgICB1cmw6IHMucGVybWFsaW5rX3VybCxcclxuICAgICAgICAgICAgYXV0aG9yOiB7XHJcbiAgICAgICAgICAgICAgICBuYW1lOiBzLnVzZXIudXNlcm5hbWUsXHJcbiAgICAgICAgICAgICAgICB1cmw6IHMudXNlci5wZXJtYWxpbmtfdXJsXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGZ1bGxfcmVzcG9uc2U6IHNcclxuICAgICAgICB9KSk7XHJcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcclxuICAgIH1cclxufVxyXG5leHBvcnQgPSBTQzsiXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9saWIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQSxrREFBOEQ7QUFDOUQsNkNBQTBDO0FBRTFDLElBQUksUUFBaUIsQ0FBQztBQUV0QixJQUFJLFVBQVUsR0FBRyxLQUFLLElBQUksRUFBRSxDQUFDLENBQXFCO0lBQzlDLEdBQUcsRUFBRSxzQ0FBc0M7SUFDM0MsWUFBWSxFQUFF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cnIgPT4ge1xyXG4gICAgICAgICAgICBzd2l0Y2goZXJyLnJlc3BvbnNlLnN0YXR1cykge1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0MDE6IHRocm93IEVycm9yKFwiQXV0aGVudGljYXRpb24gZmFpbGVkLCBtb2R1bGUgaXMgcHJvYmFibHkgYnJva2VuIHJpZ2h0IG5vd1wiKTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNDA0OiB0aHJvdyBFcnJvcignUHJvYmFibHkgaW52YWxpZCB0cmFjayBJRCcpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHRocm93IEVycm9yKGVycik7XHJcbiAgICAgICAgfSkpIGFzIGFueTtcclxuICAgICAgICBsZXQgaW5mb1VybCA9IHRyYW5zLmRhdGE/Lm1lZGlhPy50cmFuc2NvZGluZ3M/LmZpbmQ/LigodjogYW55KSA9PiB2LmZvcm1hdC5wcm90b2NvbCA9PSAncHJvZ3Jlc3NpdmUnKT8udXJsIGFzIHN0cmluZztcclxuICAgICAgICBpZighaW5mb1VybClcclxuICAgICAgICAgICAgdGhyb3cgRXJyb3IoJ0NvdWxkIG5vdCBsb2FkIGluZm8nKTtcclxuICAgICAgICBsZXQgc3RyVXJsID0gKGF3YWl0IGF4LmdldChgJHtpbmZvVXJsfT9jbGllbnRfaWQ9JHthd2FpdCBTQy5nZXRDbGllbnRJZCgpfWAsIHtyZXNwb25zZVR5cGU6J2pzb24nfSkuY2F0Y2goKCk9Pnt9KSBhcyBBeGlvc1Jlc3BvbnNlKT8uZGF0YT8udXJsIGFzIHN0cmluZztcclxuICAgICAgICBpZighc3RyVXJsKVxyXG4gICAgICAgICAgICB0aHJvdyBFcnJvcignQ291bGQgbm90IGxvYWQgc3RyZWFtIFVSTCcpO1xyXG5cclxuICAgICAgICBpZihyYXdPcHVzKSB7XHJcbiAgICAgICAgICAgIC8vQHRzLWlnbm9yZVxyXG4gICAgICAgICAgICBjb25zdCBwcmlzbSA9IGF3YWl0IGltcG9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Nrcy5wdXNoKHtcclxuICAgICAgICAgICAgbmFtZTogcy50aXRsZSxcclxuICAgICAgICAgICAgaWQ6IHMuaWQsXHJcbiAgICAgICAgICAgIGRlc2NyaXB0aW9uOiBzLmRlc2NyaXB0aW9uLFxyXG4gICAgICAgICAgICB0aHVtYm5haWw6IHMuYXJ0d29ya191cmwsXHJcbiAgICAgICAgICAgIG1pbGlzOiBzLmR1cmF0aW9uLFxyXG4gICAgICAgICAgICBkdXJhdGlvbjogU0MubWlsaXNUb1RpbWVzdGFtcChzLmR1cmF0aW9uKSxcclxuICAgICAgICAgICAgdXJsOiBzLnBlcm1hbGlua191cmwsXHJcbiAgICAgICAgICAgIGF1dGhvcjoge1xyXG4gICAgICAgICAgICAgICAgbmFtZTogcy51c2VyLnVzZXJuYW1lLFxyXG4gICAgICAgICAgICAgICAgdXJsOiBzLnVzZXIucGVybWFsaW5rX3VybFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBmdWxsX3Jlc3BvbnNlOiBzXHJcbiAgICAgICAgfSkpO1xyXG4gICAgICAgIHJldHVybiByZXN1bHQ7XHJcbiAgICB9XHJcbn1cclxuZXhwb3J0ID0gU0M7Il19 |
{ | ||
"name": "@caier/sc", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "soundcloud additions", | ||
@@ -18,2 +18,6 @@ "main": "out/index.js", | ||
"devDependencies": { | ||
"@types/chai-as-promised": "^7.1.2", | ||
"chai": "^4.2.0", | ||
"chai-as-promised": "^7.1.1", | ||
"mocha": "^7.1.2", | ||
"typescript": "^3.8.3" | ||
@@ -20,0 +24,0 @@ }, |
@@ -5,3 +5,3 @@ { | ||
"module": "commonjs", | ||
"types": ["node"], | ||
"types": ["node"], | ||
"declaration": true, | ||
@@ -8,0 +8,0 @@ "declarationMap": true, |
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
42754
11
594
5