qcobjects-cli
Version:
qcobjects cli command line tool
71 lines • 2.17 kB
JavaScript
/**
* QCObjects Framework CLI
* ________________
*
* Author: Jean Machuca <correojean@gmail.com>
*
* Cross Browser Javascript Framework for MVC Patterns
* QCObjects is licensed under the MIT License
* [LICENSE] (https://github.com/QCObjects/qcobjects-cli/blob/main/LICENSE.txt)
*
* Copyright (C) 2015 Jean Machuca,<correojean@gmail.com>
*
* Everyone is permitted to copy and distribute verbatim copies of this
* license document, but changing it is not allowed.
*/
/*eslint no-unused-vars: "off"*/
/*eslint no-redeclare: "off"*/
/*eslint no-empty: "off"*/
/*eslint strict: "off"*/
/*eslint no-mixed-operators: "off"*/
/*eslint no-undef: "off"*/
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.JiraCloud = void 0;
const qcobjects_1 = require("qcobjects");
class JiraCloud extends qcobjects_1.Service {
domain;
basePath;
username_password;
username;
password;
headers;
url;
apiMethod;
data;
constructor({ name = "jira_cloud", external = true, useHTTP2 = true, cached = false, method = "POST", headers = {
"accept": "application/json",
"content-type": "application/json"
}, basePath = "", url = "", withCredentials = false }) {
super({
name,
external,
useHTTP2,
cached,
method,
headers,
basePath,
url,
withCredentials
});
var o = this;
this.domain = `${o.domain}`;
this.basePath = `https://${this.domain}/`;
this.username_password = `${o.username}:${o.password}`;
this.headers["authorization"] = `Basic ${Buffer.from(this.username_password).toString("base64")}`;
this.url = this.basePath + o.apiMethod;
this.data = o.data;
}
done(service, standardResponse) {
// service loaded
qcobjects_1.logger.debug(standardResponse);
}
fail(e) {
qcobjects_1.logger.debug(e);
}
}
exports.JiraCloud = JiraCloud;
(0, qcobjects_1.Package)("com.qcobjects.cli.commands.jira.client_services", [
JiraCloud
]);
//# sourceMappingURL=client_services.js.map