Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
//writeConsoleLog('log',{component: CONSOLE_LOG_TAG_COMP},'checking for previously deployed proxies')
const opts = {
organization: options.org,
api: 'edgemicro-internal',
baseuri: this.managementUri,
debug: options.debug
};
if (options.token) {
opts.token = options.token;
} else {
opts.username = options.username;
opts.password = options.password;
}
// const that = this;
apigeetool.listDeployments(opts, function(err /*, proxies */) {
if (err) {
if (err.message.includes("404")) {
return cb(null, options);
} else {
return cb(err, options);
}
}
else {
options.internaldeployed = true;
cb(null, options);
}
});
}
function listDeployments(account, options, cb) {
var opts = buildApigeetoolOpts(account);
if (options.long) { opts.long = true; }
apigeetool.listDeployments(opts, cb);
}
//writeConsoleLog('log',{component: CONSOLE_LOG_TAG_COMP},'checking for previously deployed proxies')
const opts = {
organization: options.org,
api: 'edgemicro-auth',
baseuri: this.managementUri,
debug: options.debug
};
if (options.token) {
opts.token = options.token;
} else {
opts.username = options.username;
opts.password = options.password;
}
//const that = this;
apigeetool.listDeployments(opts, function(err /*, proxies */) {
if (err) {
if (err.message.includes("404")) {
return cb(null, options);
} else {
return cb(err, options);
}
}
else {
options.deployed = true;
cb(null, options);
}
});
}