Comparing version 1.0.19 to 1.0.20
@@ -7,15 +7,2 @@ const csvWriter = require('csv-write-stream'); | ||
class ClientConfig { | ||
clientName; | ||
clientId; | ||
clientSecret; | ||
scope; | ||
constructor(clientName,clientId,clientSecret,scope) { | ||
this.clientName = clientName; | ||
this.clientId = clientId; | ||
this.clientSecret = clientSecret; | ||
this.scope = scope; | ||
} | ||
} | ||
exports.deleteClient = function(clientName) { | ||
@@ -68,8 +55,8 @@ alert("deleting: " + clientName); | ||
let inputStream = fs.createReadStream(configFilePath, 'utf8'); | ||
let clientConfig = {}; | ||
inputStream | ||
.pipe(csvParser()) | ||
.on('data', function (row) { | ||
if (row.name.toString() === clientIdentifier.toString() || | ||
row.clientId.toString() === clientIdentifier.toString()) { | ||
return createClientConfig(row); | ||
if (row.name.toString() === clientIdentifier.toString()) { | ||
clientConfig = createClientConfig(row); | ||
} | ||
@@ -79,2 +66,3 @@ }) | ||
}); | ||
return clientConfig; | ||
} | ||
@@ -102,1 +90,14 @@ | ||
} | ||
class ClientConfig { | ||
name; | ||
clientId; | ||
secretKey; | ||
scope; | ||
constructor(name,clientId,secretKey,scope) { | ||
this.name = name; | ||
this.clientId = clientId; | ||
this.secretKey = secretKey; | ||
this.scope = scope; | ||
} | ||
} |
{ | ||
"name": "coaclient", | ||
"version": "1.0.19", | ||
"version": "1.0.20", | ||
"description": "Custom Node.js library for manage CourseraOAuth2 API tokens", | ||
"main": "coaclient", | ||
"scripts": { | ||
"test": "test" | ||
}, | ||
"keywords": [ | ||
@@ -10,0 +7,0 @@ "Authorization", |
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
86
15674