diff --git a/dist/smartacme.classes.acmeclient.d.ts b/dist/smartacme.classes.acmeclient.d.ts
index 7f344af..ae5a0d1 100644
--- a/dist/smartacme.classes.acmeclient.d.ts
+++ b/dist/smartacme.classes.acmeclient.d.ts
@@ -1,3 +1,6 @@
+///
+import * as q from 'q';
+import { IReqResArg } from './smartacme.classes.jwebclient';
/**
* @class AcmeClient
* @constructor
@@ -7,7 +10,7 @@
*/
export declare class AcmeClient {
clientProfilePubKey: any;
- days_valid: number;
+ daysValid: number;
defaultRsaKeySize: number;
directory: any;
directoryUrl: string;
@@ -17,7 +20,7 @@ export declare class AcmeClient {
regLink: string;
tosLink: string;
webroot: string;
- well_known_path: string;
+ wellKnownPath: string;
withInteraction: boolean;
constructor(directoryUrlArg: any);
/**
@@ -25,7 +28,7 @@ export declare class AcmeClient {
* @description retrieve directory entries (directory url must be set prior to execution)
* @param {function} callback - first argument will be the answer object
*/
- getDirectory(callback: any): void;
+ getDirectory(): q.Promise;
/**
* newRegistration
* @description try to register (directory lookup must have occured prior to execution)
@@ -40,7 +43,7 @@ export declare class AcmeClient {
* @param {Object} payload - update information
* @param {function} callback - first argument will be the answer object
*/
- getRegistration(uri: any, payload: any, callback: any): void;
+ getRegistration(uri: any, payload: any): q.Promise;
/**
* authorizeDomain
* @description authorize domain using challenge-response-method
@@ -79,11 +82,10 @@ export declare class AcmeClient {
*/
requestSigning(domain: any, callback: any): void;
/**
- * getProfile
- * @description retrieve profile of user (will make directory lookup and registration check)
+ * retrieves profile of user (will make directory lookup and registration check)
* @param {function} callback - first argument will be the answer object
*/
- getProfile(callback: any): void;
+ getProfile(): q.Promise<{}>;
/**
* createAccount
* @description create new account (assumes directory lookup has already occured)
@@ -104,8 +106,9 @@ export declare class AcmeClient {
* @param {string} organization
* @param {string} country
* @param {function} callback
+ * @returns Promise
*/
- requestCertificate(domain: any, organization: any, country: any, callback: any): void;
+ requestCertificate(domain: string, organization: string, country: string): q.Promise<{}>;
/**
* External: Create key pair
* @param {number} bit - key strength, expected to be already sanitized
@@ -115,7 +118,7 @@ export declare class AcmeClient {
* @param {string} e - email address, expected to be already sanitized
* @param {function} callback
*/
- createKeyPair(bit: any, c: any, o: any, cn: any, e: any, callback: any): void;
+ createKeyPair(bit: any, c: any, o: any, cn: any, e: any): q.Promise<{}>;
/**
* Helper: Empty callback
*/
diff --git a/dist/smartacme.classes.acmeclient.js b/dist/smartacme.classes.acmeclient.js
index 53a1c0e..4d5f1cc 100644
--- a/dist/smartacme.classes.acmeclient.js
+++ b/dist/smartacme.classes.acmeclient.js
@@ -1,6 +1,6 @@
"use strict";
const plugins = require("./smartacme.plugins");
-const child_process = require("child_process");
+const q = require("q");
const crypto = require("crypto");
const fs = require("fs");
const readline = require("readline");
@@ -35,7 +35,7 @@ class AcmeClient {
* @desc Validity period in days
* @default 1
*/
- this.days_valid = 1;
+ this.daysValid = 1;
/**
* @member {number} module:AcmeClient~AcmeClient#defaultRsaKeySize
* @desc Key strength in bits
@@ -89,7 +89,7 @@ class AcmeClient {
* @desc Directory structure for challenge data
* @default "/.well-known/acme-challenge/"
*/
- this.well_known_path = '/.well-known/acme-challenge/'; // {string}
+ this.wellKnownPath = '/.well-known/acme-challenge/'; // {string}
/**
* @member {boolean} module:AcmeClient~AcmeClient#withInteraction
* @desc Determines if interaction of user is required
@@ -105,10 +105,13 @@ class AcmeClient {
* @description retrieve directory entries (directory url must be set prior to execution)
* @param {function} callback - first argument will be the answer object
*/
- getDirectory(callback) {
- this.jWebClient.get(this.directoryUrl, callback, callback);
- // dereference
- callback = null;
+ getDirectory() {
+ let done = q.defer();
+ this.jWebClient.get(this.directoryUrl)
+ .then((reqResArg) => {
+ done.resolve(reqResArg);
+ });
+ return done.promise;
}
/**
* newRegistration
@@ -133,15 +136,9 @@ class AcmeClient {
* @param {Object} payload - update information
* @param {function} callback - first argument will be the answer object
*/
- getRegistration(uri, payload, callback) {
- /*jshint -W069 */
- if (!(payload instanceof Object)) {
- payload = {}; // ensure payload is object
- }
+ getRegistration(uri, payload) {
+ let done = q.defer();
payload['resource'] = 'reg';
- if (typeof callback !== 'function') {
- callback = this.emptyCallback; // ensure callback is function
- }
this.jWebClient.post(uri, payload, (ans, res) => {
if (ans instanceof Object) {
this.clientProfilePubKey = ans.key; // cache or reset returned public key
@@ -163,14 +160,13 @@ class AcmeClient {
else {
this.tosLink = null; // reset TOS link
}
- callback(ans, res);
+ done.resolve({ ans: ans, res: res });
}
else {
- callback(false);
+ done.reject(new Error('some error'));
}
});
- // dereference
- payload = null;
+ return done.promise;
}
/**
* authorizeDomain
@@ -183,7 +179,8 @@ class AcmeClient {
if (typeof callback !== 'function') {
callback = this.emptyCallback; // ensure callback is function
}
- this.getProfile((profile) => {
+ this.getProfile()
+ .then(profile => {
if (!(profile instanceof Object)) {
callback(false); // no profile returned
}
@@ -340,7 +337,7 @@ class AcmeClient {
}
else {
let csr = csrBuffer.toString();
- this.jWebClient.post(this.directory['new-cert'], this.makeCertRequest(csr, this.days_valid), (ans, res) => {
+ this.jWebClient.post(this.directory['new-cert'], this.makeCertRequest(csr, this.daysValid), (ans, res) => {
if ((ans instanceof Buffer) && (ans.length > 0)) {
callback(ans); // certificate was returned with answer
}
@@ -368,18 +365,15 @@ class AcmeClient {
});
}
/**
- * getProfile
- * @description retrieve profile of user (will make directory lookup and registration check)
+ * retrieves profile of user (will make directory lookup and registration check)
* @param {function} callback - first argument will be the answer object
*/
- getProfile(callback) {
- /*jshint -W069 */
- if (typeof callback !== 'function') {
- callback = this.emptyCallback; // ensure callback is function
- }
- this.getDirectory((dir) => {
+ getProfile() {
+ let done = q.defer();
+ this.getDirectory()
+ .then((dir) => {
if (!(dir instanceof Object)) {
- callback(false); // server did not respond with directory
+ done.reject(new Error('server did not respond with directory'));
}
else {
this.directory = dir; // cache directory
@@ -388,14 +382,18 @@ class AcmeClient {
&& (res['headers'] instanceof Object)
&& (typeof res.headers['location'] === 'string')) {
this.regLink = res.headers['location'];
- this.getRegistration(this.regLink, null, callback); // get registration info from link
+ this.getRegistration(this.regLink, null)
+ .then((reqResArg) => {
+ done.resolve();
+ }); // get registration info from link
}
else {
- callback(false); // registration failed
+ done.reject(new Error('registration failed'));
}
});
}
});
+ return done.promise;
}
/**
* createAccount
@@ -437,11 +435,10 @@ class AcmeClient {
* @param {function} callback - first argument will be the answer object
*/
agreeTos(tosLink, callback) {
+ let done = q.defer();
this.getRegistration(this.regLink, {
'Agreement': tosLink // terms of service URI
- }, callback);
- // dereference
- callback = null;
+ }).then(() => { done.resolve(); });
}
/**
* Entry-Point: Request certificate
@@ -449,23 +446,13 @@ class AcmeClient {
* @param {string} organization
* @param {string} country
* @param {function} callback
+ * @returns Promise
*/
- requestCertificate(domain, organization, country, callback) {
- /*jshint -W069 */
- if (typeof domain !== 'string') {
- domain = ''; // ensure domain is string
- }
- if (typeof callback !== 'function') {
- callback = this.emptyCallback; // ensure callback is function
- }
- this.getProfile((profile) => {
+ requestCertificate(domain, organization, country) {
+ let done = q.defer();
+ this.getProfile()
+ .then((profile) => {
let email = this.extractEmail(profile); // try to determine email address from profile
- if (typeof this.emailOverride === 'string') {
- email = this.emailOverride; // override email address if set
- }
- else if (typeof email !== 'string') {
- email = this.emailDefaultPrefix + '@' + domain; // or set default
- }
let bit = this.defaultRsaKeySize;
// sanitize
bit = Number(bit);
@@ -474,32 +461,29 @@ class AcmeClient {
email = this.makeSafeFileName(email);
organization = this.makeSafeFileName(organization);
// create key pair
- this.createKeyPair(bit, country, organization, domain, email, (e) => {
- if (!e) {
- this.requestSigning(domain, (cert) => {
- if ((cert instanceof Buffer) || (typeof cert === 'string')) {
- fs.writeFile(domain + '.der', cert, (err) => {
- if (err instanceof Object) {
- if (this.jWebClient.verbose) {
- console.error('Error : File system error', err['code'], 'while writing certificate to file');
- }
- callback(false);
+ this.createKeyPair(bit, country, organization, domain, email)
+ .then(() => {
+ this.requestSigning(domain, (cert) => {
+ if ((cert instanceof Buffer) || (typeof cert === 'string')) {
+ fs.writeFile(domain + '.der', cert, (err) => {
+ if (err instanceof Object) {
+ if (this.jWebClient.verbose) {
+ console.error('Error : File system error', err['code'], 'while writing certificate to file');
}
- else {
- callback(true); // CSR complete and certificate written to file system
- }
- });
- }
- else {
- callback(false); // invalid certificate data
- }
- });
- }
- else {
- callback(false); // could not create key pair
- }
+ done.reject(err);
+ }
+ else {
+ done.resolve(); // CSR complete and certificate written to file system
+ }
+ });
+ }
+ else {
+ done.reject('invalid certificate data');
+ }
+ });
});
});
+ return done.promise;
}
/**
* External: Create key pair
@@ -510,27 +494,22 @@ class AcmeClient {
* @param {string} e - email address, expected to be already sanitized
* @param {function} callback
*/
- createKeyPair(bit, c, o, cn, e, callback) {
- if (typeof callback !== 'function') {
- callback = this.emptyCallback; // ensure callback is function
- }
+ createKeyPair(bit, c, o, cn, e) {
+ let done = q.defer();
let openssl = `openssl req -new -nodes -newkey rsa:${bit} -sha256 -subj "/C=${c}/O=${o}/CN=${cn}/emailAddress=${e}" -keyout \"${cn}.key\" -outform der -out \"${cn}.csr\"`;
console.error('Action : Creating key pair');
if (this.jWebClient.verbose) {
console.error('Running:', openssl);
}
- child_process.exec(openssl, (e) => {
- if (!e) {
- console.error('Result : done');
+ plugins.shelljs.exec(openssl, (codeArg, stdOutArg, stdErrorArg) => {
+ if (!stdErrorArg) {
+ done.resolve();
}
else {
- console.error('Result : failed');
+ done.reject(stdErrorArg);
}
- callback(e);
- // dereference
- callback = null;
- e = null;
});
+ return done.promise;
}
/**
* Helper: Empty callback
@@ -549,9 +528,9 @@ class AcmeClient {
name = '';
}
// respects file name restrictions for ntfs and ext2
- let regex_file = '[<>:\"/\\\\\\|\\?\\*\\u0000-\\u001f\\u007f\\u0080-\\u009f]';
- let regex_path = '[<>:\"\\\\\\|\\?\\*\\u0000-\\u001f\\u007f\\u0080-\\u009f]';
- return name.replace(new RegExp(withPath ? regex_path : regex_file, 'g'), (charToReplace) => {
+ let regexFile = '[<>:\"/\\\\\\|\\?\\*\\u0000-\\u001f\\u007f\\u0080-\\u009f]';
+ let regexPath = '[<>:\"\\\\\\|\\?\\*\\u0000-\\u001f\\u007f\\u0080-\\u009f]';
+ return name.replace(new RegExp(withPath ? regexPath : regexFile, 'g'), (charToReplace) => {
if (typeof charToReplace === 'string') {
return '%' + charToReplace.charCodeAt(0).toString(16).toLocaleUpperCase();
}
@@ -571,7 +550,7 @@ class AcmeClient {
}
if (challenge instanceof Object) {
if (challenge['type'] === 'http-01') {
- let path = this.webroot + this.well_known_path + challenge['token']; // webroot and well_known_path are expected to be already sanitized
+ let path = this.webroot + this.wellKnownPath + challenge['token']; // webroot and well_known_path are expected to be already sanitized
fs.writeFile(path, this.makeKeyAuthorization(challenge), (err) => {
if (err instanceof Object) {
if (this.jWebClient.verbose) {
@@ -746,4 +725,4 @@ class AcmeClient {
}
}
exports.AcmeClient = AcmeClient;
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhY21lLmNsYXNzZXMuYWNtZWNsaWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0YWNtZS5jbGFzc2VzLmFjbWVjbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtDQUE4QztBQUM5QywrQ0FBOEM7QUFDOUMsaUNBQWdDO0FBQ2hDLHlCQUF3QjtBQUN4QixxQ0FBb0M7QUFDcEMsaUZBQTJEO0FBRTNEOzs7Ozs7O0dBT0c7QUFDSCxJQUFJLGtCQUFrQixHQUFHLENBQUMsR0FBRztJQUN6QixNQUFNLENBQUMsSUFBSSxNQUFNLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUMsRUFBRSxNQUFNLENBQUMsQ0FBQTtBQUNsRCxDQUFDLENBQUE7QUFFRDs7Ozs7O0dBTUc7QUFDSDtJQWNJLFlBQVksZUFBZTtRQUN2Qjs7O1dBR0c7UUFDSCxJQUFJLENBQUMsbUJBQW1CLEdBQUcsRUFBRSxDQUF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FBQyxDQUFBLENBQUMsNEJBQTRCO1FBQzNGLElBQUksWUFBWSxHQUFHLENBQUMsSUFBSSxJQUFJLEVBQUUsQ0FBQyxDQUFDLFdBQVcsRUFBRSxDQUFBLENBQUMsaUNBQWlDO1FBRS9FLDRDQUE0QztRQUM1QyxJQUFJLGFBQWEsR0FBRyxDQUFDLElBQUksSUFBSSxDQUFDLENBQUMsQ0FBQyxJQUFJLElBQUksRUFBRSxDQUFDLEdBQUcsSUFBSSxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDLFdBQVcsRUFBRSxDQUFBO1FBQ3hHLE1BQU0sQ0FBQztZQUNILFVBQVUsRUFBRSxVQUFVO1lBQ3RCLEtBQUssRUFBRSxjQUFjO1lBQ3JCLFdBQVcsRUFBRSxZQUFZO1lBQ3pCLFVBQVUsRUFBRSxhQUFhO1NBQzVCLENBQUE7SUFDTCxDQUFDO0NBQ0o7QUFsdEJELGdDQWt0QkMifQ==
\ No newline at end of file
diff --git a/dist/smartacme.classes.jwebclient.d.ts b/dist/smartacme.classes.jwebclient.d.ts
index ad0360a..b6fa06c 100644
--- a/dist/smartacme.classes.jwebclient.d.ts
+++ b/dist/smartacme.classes.jwebclient.d.ts
@@ -1,11 +1,27 @@
+///
+import * as q from 'q';
+export interface IReqResArg {
+ ans: any;
+ res: any;
+}
/**
* @class JWebClient
* @constructor
* @description Implementation of HTTPS-based JSON-Web-Client
*/
export declare class JWebClient {
- key_pair: any;
- last_nonce: string;
+ /**
+ * User account key pair
+ */
+ keyPair: any;
+ /**
+ * Cached nonce returned with last request
+ */
+ lastNonce: string;
+ /**
+ * @member {boolean} module:JWebClient~JWebClient#verbose
+ * @desc Determines verbose mode
+ */
verbose: boolean;
constructor();
/**
@@ -27,7 +43,7 @@ export declare class JWebClient {
* @param {function} callback
* @param {function} errorCallback
*/
- request(query: any, payload: any, callback: any, errorCallback: any): void;
+ request(query: string, payload?: string): q.Promise<{}>;
/**
* get
* @description make GET request
@@ -35,27 +51,21 @@ export declare class JWebClient {
* @param {function} callback
* @param {function} errorCallback
*/
- get(uri: any, callback: any, errorCallback: any): void;
+ get(uri: string): q.Promise;
/**
- * post
- * @description make POST request
+ * make POST request
* @param {string} uri
* @param {Object|string|number|boolean} payload
* @param {function} callback
* @param {function} errorCallback
*/
- post(uri: any, payload: any, callback: any, errorCallback: any): void;
+ post(uri: string, payload: any): q.Promise;
/**
- * evaluateStatus
- * @description check if status is expected and log errors
+ * checks if status is expected and log errors
* @param {string} uri
* @param {Object|string|number|boolean} payload
* @param {Object|string} ans
* @param {Object} res
*/
evaluateStatus(uri: any, payload: any, ans: any, res: any): void;
- /**
- * Helper: Empty callback
- */
- emptyCallback(): void;
}
diff --git a/dist/smartacme.classes.jwebclient.js b/dist/smartacme.classes.jwebclient.js
index 75e7db2..162c10c 100644
--- a/dist/smartacme.classes.jwebclient.js
+++ b/dist/smartacme.classes.jwebclient.js
@@ -3,6 +3,7 @@ const plugins = require("./smartacme.plugins");
const https = require("https");
let jwa = require('jwa');
const url = require("url");
+const q = require("q");
/**
* json_to_utf8base64url
* @private
@@ -11,7 +12,7 @@ const url = require("url");
* @return {string}
* @throws Exception if object cannot be stringified or contains cycle
*/
-let json_to_utf8base64url = function (obj) {
+let json_to_utf8base64url = (obj) => {
return plugins.smartstring.base64.encodeUri(JSON.stringify(obj));
};
/**
@@ -22,19 +23,13 @@ let json_to_utf8base64url = function (obj) {
class JWebClient {
constructor() {
/**
- * @member {Object} module:JWebClient~JWebClient#key_pair
- * @desc User account key pair
+ * User account key pair
*/
- this.key_pair = {};
+ this.keyPair = {};
/**
- * @member {string} module:JWebClient~JWebClient#last_nonce
- * @desc Cached nonce returned with last request
- */
- this.last_nonce = null;
- /**
- * @member {boolean} module:JWebClient~JWebClient#verbose
- * @desc Determines verbose mode
+ * Cached nonce returned with last request
*/
+ this.lastNonce = null;
this.verbose = false;
}
/**
@@ -87,17 +82,8 @@ class JWebClient {
* @param {function} callback
* @param {function} errorCallback
*/
- request(query, payload, callback, errorCallback) {
- /*jshint -W069 */
- if (typeof query !== 'string') {
- query = ''; // ensure query is string
- }
- if (typeof callback !== 'function') {
- callback = this.emptyCallback; // ensure callback is function
- }
- if (typeof errorCallback !== 'function') {
- errorCallback = this.emptyCallback; // ensure callback is function
- }
+ request(query, payload = null) {
+ let done = q.defer();
// prepare options
let uri = url.parse(query);
let options = {
@@ -107,7 +93,7 @@ class JWebClient {
method: null,
headers: {}
};
- if (typeof payload === 'string') {
+ if (!payload === null) {
options.method = 'POST';
options.headers = {
'Content-Type': 'application/jose',
@@ -118,15 +104,15 @@ class JWebClient {
options.method = 'GET';
}
// prepare request
- let req = https.request(options, function (res) {
+ let req = https.request(options, (res) => {
// receive data
let data = [];
- res.on('data', function (block) {
+ res.on('data', (block) => {
if (block instanceof Buffer) {
data.push(block);
}
});
- res.on('end', function () {
+ res.on('end', () => {
let buf = Buffer.concat(data);
let isJSON = ((res instanceof Object)
&& (res['headers'] instanceof Object)
@@ -136,28 +122,26 @@ class JWebClient {
try {
// convert to JSON
let json = JSON.parse(buf.toString('utf8'));
- callback(json, res);
+ done.resolve({ json: json, res: res });
}
catch (e) {
// error (if empty or invalid JSON)
- errorCallback(void 0, e);
+ done.reject(e);
}
}
- else {
- callback(buf, res);
- }
});
- }).on('error', function (e) {
+ }).on('error', (e) => {
console.error('Error occured', e);
// error
- errorCallback(void 0, e);
+ done.reject(e);
});
// write POST body if payload was specified
- if (typeof payload === 'string') {
+ if (!payload === null) {
req.write(payload);
}
// make request
req.end();
+ return done.promise;
}
/**
* get
@@ -166,62 +150,48 @@ class JWebClient {
* @param {function} callback
* @param {function} errorCallback
*/
- get(uri, callback, errorCallback) {
- /*jshint -W069 */
- let ctx = this;
- if (typeof callback !== 'function') {
- callback = this.emptyCallback; // ensure callback is function
- }
- this.request(uri, void 0, function (ans, res) {
- ctx.evaluateStatus(uri, null, ans, res);
+ get(uri) {
+ let done = q.defer();
+ this.request(uri)
+ .then((reqResArg) => {
+ this.evaluateStatus(uri, null, reqResArg.ans, reqResArg.res);
// save replay nonce for later requests
- if ((res instanceof Object) && (res['headers'] instanceof Object)) {
- ctx.last_nonce = res.headers['replay-nonce'];
+ if ((reqResArg.res instanceof Object) && (reqResArg.res['headers'] instanceof Object)) {
+ this.lastNonce = reqResArg.res.headers['replay-nonce'];
}
- callback(ans, res);
- // dereference
- ans = null;
- callback = null;
- ctx = null;
- res = null;
- }, errorCallback);
- // dereference
- errorCallback = null;
+ done.resolve(reqResArg);
+ });
+ return done.promise;
}
/**
- * post
- * @description make POST request
+ * make POST request
* @param {string} uri
* @param {Object|string|number|boolean} payload
* @param {function} callback
* @param {function} errorCallback
*/
- post(uri, payload, callback, errorCallback) {
- /*jshint -W069 */
- let ctx = this;
- if (typeof callback !== 'function') {
- callback = this.emptyCallback; // ensure callback is function
- }
- let jwt = this.createJWT(this.last_nonce, payload, 'RS256', this.key_pair['private_pem'], this.key_pair['public_jwk']);
- this.request(uri, jwt, (ans, res) => {
- ctx.evaluateStatus(uri, payload, ans, res);
+ post(uri, payload) {
+ let done = q.defer();
+ let jwt = this.createJWT(this.lastNonce, payload, 'RS256', this.keyPair['private_pem'], this.keyPair['public_jwk']);
+ this.request(uri, jwt)
+ .then((reqResArg) => {
+ this.evaluateStatus(uri, payload, reqResArg.ans, reqResArg.res);
// save replay nonce for later requests
- if ((res instanceof Object) && (res['headers'] instanceof Object)) {
- ctx.last_nonce = res.headers['replay-nonce'];
+ if ((reqResArg.res instanceof Object) && (reqResArg.res['headers'] instanceof Object)) {
+ this.lastNonce = reqResArg.res.headers['replay-nonce'];
}
- callback(ans, res);
- }, errorCallback);
+ done.resolve(reqResArg);
+ });
+ return done.promise;
}
/**
- * evaluateStatus
- * @description check if status is expected and log errors
+ * checks if status is expected and log errors
* @param {string} uri
* @param {Object|string|number|boolean} payload
* @param {Object|string} ans
* @param {Object} res
*/
evaluateStatus(uri, payload, ans, res) {
- /*jshint -W069 */
if (this.verbose) {
if ((payload instanceof Object)
|| (typeof payload === 'string')
@@ -247,12 +217,6 @@ class JWebClient {
console.error('Receive:', ans); // received data
}
}
- /**
- * Helper: Empty callback
- */
- emptyCallback() {
- // nop
- }
}
exports.JWebClient = JWebClient;
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhY21lLmNsYXNzZXMuandlYmNsaWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0YWNtZS5jbGFzc2VzLmp3ZWJjbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtDQUE4QztBQUM5QywrQkFBOEI7QUFDOUIsSUFBSSxHQUFHLEdBQUcsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFBO0FBQ3hCLDJCQUEwQjtBQUUxQjs7Ozs7OztHQU9HO0FBQ0gsSUFBSSxxQkFBcUIsR0FBRyxVQUFVLEdBQUc7SUFDckMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUE7QUFDcEUsQ0FBQyxDQUFBO0FBRUQ7Ozs7R0FJRztBQUNIO0lBSUk7UUFDSTs7O1dBR0c7UUFDSCxJQUFJLENBQUMsUUFBUSxHQUFHLEVBQUUsQ0FBQTtRQUNsQjs7O1dBR0c7UUFDSCxJQUFJLENBQUMsVUFBVSxHQUFHLElBQUksQ0FBQTtRQUN0Qjs7O1dBR0c7UUFDSCxJQUFJLENBQUMsT0FBTyxHQUFHLEtBQUssQ0FBQTtJQUN4QixDQUFDO0lBRUQ7Ozs7Ozs7OztPQVNHO0lBQ0gsU0FBUyxDQUFDLEtBQUssRUFBRSxPQUFPLEVBQUUsR0FBRyxFQUFF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EdBQUcsQ0FBQyxDQUFDLENBQUM7WUFDdEQsT0FBTyxDQUFDLEtBQUssQ0FBQyxVQUFVLEVBQUUsR0FBRyxDQUFDLFlBQVksQ0FBQyxFQUFFLFVBQVUsQ0FBQyxJQUFJLENBQUMsQ0FBQSxDQUFDLHlCQUF5QjtZQUN2RixFQUFFLENBQUMsQ0FBQyxHQUFHLFlBQVksTUFBTSxDQUFDLENBQUMsQ0FBQztnQkFDeEIsRUFBRSxDQUFDLENBQUMsT0FBTyxHQUFHLENBQUMsUUFBUSxDQUFDLEtBQUssUUFBUSxDQUFDLENBQUMsQ0FBQztvQkFDcEMsT0FBTyxDQUFDLEtBQUssQ0FBQyxVQUFVLEVBQUUsR0FBRyxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLENBQUMsR0FBRyxFQUFFLENBQUMsQ0FBQSxDQUFDLHVCQUF1QjtnQkFDckYsQ0FBQztZQUNMLENBQUM7UUFDTCxDQUFDO1FBQ0QsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUM7WUFDZixPQUFPLENBQUMsS0FBSyxDQUFDLFVBQVUsRUFBRSxHQUFHLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQSxDQUFDLG1CQUFtQjtZQUM3RCxPQUFPLENBQUMsS0FBSyxDQUFDLFVBQVUsRUFBRSxHQUFHLENBQUMsQ0FBQSxDQUFDLGdCQUFnQjtRQUNuRCxDQUFDO0lBQ0wsQ0FBQztDQUNKO0FBek5ELGdDQXlOQyJ9
\ No newline at end of file
diff --git a/dist/smartacme.plugins.d.ts b/dist/smartacme.plugins.d.ts
index 092605d..a61b275 100644
--- a/dist/smartacme.plugins.d.ts
+++ b/dist/smartacme.plugins.d.ts
@@ -1,4 +1,5 @@
import 'typings-global';
import * as path from 'path';
import * as smartstring from 'smartstring';
-export { path, smartstring };
+import * as shelljs from 'shelljs';
+export { path, smartstring, shelljs };
diff --git a/dist/smartacme.plugins.js b/dist/smartacme.plugins.js
index 5a09677..50be8e7 100644
--- a/dist/smartacme.plugins.js
+++ b/dist/smartacme.plugins.js
@@ -4,4 +4,6 @@ const path = require("path");
exports.path = path;
const smartstring = require("smartstring");
exports.smartstring = smartstring;
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhY21lLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydGFjbWUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBQ3ZCLDZCQUE0QjtBQUl4QixvQkFBSTtBQUhSLDJDQUEwQztBQUl0QyxrQ0FBVyJ9
\ No newline at end of file
+const shelljs = require("shelljs");
+exports.shelljs = shelljs;
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhY21lLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydGFjbWUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBQ3ZCLDZCQUE0QjtBQUt4QixvQkFBSTtBQUpSLDJDQUEwQztBQUt0QyxrQ0FBVztBQUpmLG1DQUFrQztBQUs5QiwwQkFBTyJ9
\ No newline at end of file
diff --git a/package.json b/package.json
index b47fdad..16fcfda 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,9 @@
"dependencies": {
"@types/base64url": "^2.0.3",
"jwa": "^1.1.3",
+ "q": "^1.4.1",
"rsa-pem-to-jwk": "^1.1.3",
+ "shelljs": "^0.7.5",
"smartstring": "^2.0.20",
"typings-global": "^1.0.14"
},
diff --git a/ts/smartacme.classes.acmeclient.ts b/ts/smartacme.classes.acmeclient.ts
index 1452b4c..84fc287 100644
--- a/ts/smartacme.classes.acmeclient.ts
+++ b/ts/smartacme.classes.acmeclient.ts
@@ -1,9 +1,10 @@
import * as plugins from './smartacme.plugins'
-import * as child_process from 'child_process'
+import * as q from 'q'
import * as crypto from 'crypto'
import * as fs from 'fs'
import * as readline from 'readline'
import { JWebClient } from './smartacme.classes.jwebclient'
+import { IReqResArg } from './smartacme.classes.jwebclient'
/**
* json_to_utf8buffer
@@ -121,10 +122,13 @@ export class AcmeClient {
* @description retrieve directory entries (directory url must be set prior to execution)
* @param {function} callback - first argument will be the answer object
*/
- getDirectory(callback) {
- this.jWebClient.get(this.directoryUrl, callback, callback)
- // dereference
- callback = null
+ getDirectory() {
+ let done = q.defer()
+ this.jWebClient.get(this.directoryUrl)
+ .then((reqResArg: IReqResArg) => {
+ done.resolve(reqResArg)
+ })
+ return done.promise
}
/**
@@ -151,16 +155,10 @@ export class AcmeClient {
* @param {Object} payload - update information
* @param {function} callback - first argument will be the answer object
*/
- getRegistration(uri, payload, callback) {
- /*jshint -W069 */
- if (!(payload instanceof Object)) {
- payload = {} // ensure payload is object
- }
+ getRegistration(uri, payload) {
+ let done = q.defer()
payload['resource'] = 'reg'
- if (typeof callback !== 'function') {
- callback = this.emptyCallback // ensure callback is function
- }
- this.jWebClient.post(uri, payload,(ans, res) => {
+ this.jWebClient.post(uri, payload, (ans, res) => {
if (ans instanceof Object) {
this.clientProfilePubKey = ans.key // cache or reset returned public key
if ((res instanceof Object) && (res['headers'] instanceof Object)) {
@@ -178,13 +176,12 @@ export class AcmeClient {
} else {
this.tosLink = null // reset TOS link
}
- callback(ans, res)
+ done.resolve({ ans: ans, res: res })
} else {
- callback(false)
+ done.reject(new Error('some error'))
}
})
- // dereference
- payload = null
+ return done.promise
}
/**
@@ -198,59 +195,60 @@ export class AcmeClient {
if (typeof callback !== 'function') {
callback = this.emptyCallback // ensure callback is function
}
- this.getProfile((profile) => {
- if (!(profile instanceof Object)) {
- callback(false) // no profile returned
- } else {
- this.jWebClient.post(this.directory['new-authz'], this.makeDomainAuthorizationRequest(domain), (ans, res) => {
- if ((res instanceof Object) && (res['statusCode'] === 403)) { // if unauthorized
- this.agreeTos(this.tosLink, (ans_, res_) => { // agree to TOS
- if ( // if TOS were agreed successfully
- (res_ instanceof Object)
- && (res_['statusCode'] >= 200)
- && (res_['statusCode'] <= 400)
- ) {
- this.authorizeDomain(domain, callback) // try authorization again
- } else {
- callback(false) // agreement failed
- }
- })
- } else {
- if (
- (res instanceof Object)
- && (res['headers'] instanceof Object)
- && (typeof res.headers['location'] === 'string')
- && (ans instanceof Object)
- ) {
- let poll_uri = res.headers['location'] // status URI for polling
- let challenge = this.selectChallenge(ans, 'http-01') // select simple http challenge
- if (challenge instanceof Object) { // desired challenge is in list
- this.prepareChallenge(domain, challenge, () => { // prepare all objects and files for challenge
- // reset
- ans = null
- res = null
- // accept challenge
- this.acceptChallenge(challenge, (ans, res) => {
- if (
- (res instanceof Object)
- && (res['statusCode'] < 400) // server confirms challenge acceptance
- ) {
- this.pollUntilValid(poll_uri, callback) // poll status until server states success
- } else {
- callback(false) // server did not confirm challenge acceptance
- }
- })
- })
- } else {
- callback(false) // desired challenge is not in list
- }
+ this.getProfile()
+ .then(profile => {
+ if (!(profile instanceof Object)) {
+ callback(false) // no profile returned
+ } else {
+ this.jWebClient.post(this.directory['new-authz'], this.makeDomainAuthorizationRequest(domain), (ans, res) => {
+ if ((res instanceof Object) && (res['statusCode'] === 403)) { // if unauthorized
+ this.agreeTos(this.tosLink, (ans_, res_) => { // agree to TOS
+ if ( // if TOS were agreed successfully
+ (res_ instanceof Object)
+ && (res_['statusCode'] >= 200)
+ && (res_['statusCode'] <= 400)
+ ) {
+ this.authorizeDomain(domain, callback) // try authorization again
+ } else {
+ callback(false) // agreement failed
+ }
+ })
} else {
- callback(false) // server did not respond with status URI
+ if (
+ (res instanceof Object)
+ && (res['headers'] instanceof Object)
+ && (typeof res.headers['location'] === 'string')
+ && (ans instanceof Object)
+ ) {
+ let poll_uri = res.headers['location'] // status URI for polling
+ let challenge = this.selectChallenge(ans, 'http-01') // select simple http challenge
+ if (challenge instanceof Object) { // desired challenge is in list
+ this.prepareChallenge(domain, challenge, () => { // prepare all objects and files for challenge
+ // reset
+ ans = null
+ res = null
+ // accept challenge
+ this.acceptChallenge(challenge, (ans, res) => {
+ if (
+ (res instanceof Object)
+ && (res['statusCode'] < 400) // server confirms challenge acceptance
+ ) {
+ this.pollUntilValid(poll_uri, callback) // poll status until server states success
+ } else {
+ callback(false) // server did not confirm challenge acceptance
+ }
+ })
+ })
+ } else {
+ callback(false) // desired challenge is not in list
+ }
+ } else {
+ callback(false) // server did not respond with status URI
+ }
}
- }
- })
- }
- })
+ })
+ }
+ })
}
/**
@@ -316,7 +314,7 @@ export class AcmeClient {
if (retry > 128) {
callback(false) // stop if retry value exceeds maximum
} else {
- this.jWebClient.get(uri,(ans, res) => {
+ this.jWebClient.get(uri, (ans, res) => {
if ((ans instanceof Buffer) && (ans.length > 0)) {
callback(ans) // certificate was returned with answer
} else {
@@ -377,34 +375,35 @@ export class AcmeClient {
}
/**
- * getProfile
- * @description retrieve profile of user (will make directory lookup and registration check)
+ * retrieves profile of user (will make directory lookup and registration check)
* @param {function} callback - first argument will be the answer object
*/
- getProfile(callback) {
- /*jshint -W069 */
- if (typeof callback !== 'function') {
- callback = this.emptyCallback // ensure callback is function
- }
- this.getDirectory((dir) => {
- if (!(dir instanceof Object)) {
- callback(false) // server did not respond with directory
- } else {
- this.directory = dir // cache directory
- this.newRegistration(null, (ans, res) => { // try new registration to get registration link
- if (
- (res instanceof Object)
- && (res['headers'] instanceof Object)
- && (typeof res.headers['location'] === 'string')
- ) {
- this.regLink = res.headers['location']
- this.getRegistration(this.regLink, null, callback) // get registration info from link
- } else {
- callback(false) // registration failed
- }
- })
- }
- })
+ getProfile() {
+ let done = q.defer()
+ this.getDirectory()
+ .then((dir) => {
+ if (!(dir instanceof Object)) {
+ done.reject(new Error('server did not respond with directory'))
+ } else {
+ this.directory = dir // cache directory
+ this.newRegistration(null, (ans, res) => { // try new registration to get registration link
+ if (
+ (res instanceof Object)
+ && (res['headers'] instanceof Object)
+ && (typeof res.headers['location'] === 'string')
+ ) {
+ this.regLink = res.headers['location']
+ this.getRegistration(this.regLink, null)
+ .then((reqResArg: IReqResArg) => {
+ done.resolve()
+ }) // get registration info from link
+ } else {
+ done.reject(new Error('registration failed'))
+ }
+ })
+ }
+ })
+ return done.promise
}
/**
@@ -450,11 +449,10 @@ export class AcmeClient {
* @param {function} callback - first argument will be the answer object
*/
agreeTos(tosLink, callback) {
+ let done = q.defer()
this.getRegistration(this.regLink, {
'Agreement': tosLink // terms of service URI
- }, callback)
- // dereference
- callback = null
+ }).then(() => { done.resolve() })
}
/**
@@ -463,53 +461,43 @@ export class AcmeClient {
* @param {string} organization
* @param {string} country
* @param {function} callback
+ * @returns Promise
*/
- requestCertificate(domain, organization, country, callback) {
- /*jshint -W069 */
- if (typeof domain !== 'string') {
- domain = '' // ensure domain is string
- }
- if (typeof callback !== 'function') {
- callback = this.emptyCallback // ensure callback is function
- }
- this.getProfile((profile) => {
- let email = this.extractEmail(profile) // try to determine email address from profile
- if (typeof this.emailOverride === 'string') {
- email = this.emailOverride // override email address if set
- } else if (typeof email !== 'string') {
- email = this.emailDefaultPrefix + '@' + domain // or set default
- }
- let bit = this.defaultRsaKeySize
- // sanitize
- bit = Number(bit)
- country = this.makeSafeFileName(country)
- domain = this.makeSafeFileName(domain)
- email = this.makeSafeFileName(email)
- organization = this.makeSafeFileName(organization)
- // create key pair
- this.createKeyPair(bit, country, organization, domain, email, (e) => { // create key pair
- if (!e) {
- this.requestSigning(domain, (cert) => { // send CSR
- if ((cert instanceof Buffer) || (typeof cert === 'string')) { // valid certificate data
- fs.writeFile(domain + '.der', cert, (err) => { // sanitize domain name for file path
- if (err instanceof Object) { // file system error
- if (this.jWebClient.verbose) {
- console.error('Error : File system error', err['code'], 'while writing certificate to file')
+ requestCertificate(domain: string, organization: string, country: string) {
+ let done = q.defer()
+ this.getProfile()
+ .then((profile) => {
+ let email = this.extractEmail(profile) // try to determine email address from profile
+ let bit = this.defaultRsaKeySize
+ // sanitize
+ bit = Number(bit)
+ country = this.makeSafeFileName(country)
+ domain = this.makeSafeFileName(domain)
+ email = this.makeSafeFileName(email)
+ organization = this.makeSafeFileName(organization)
+ // create key pair
+ this.createKeyPair(bit, country, organization, domain, email)
+ .then(() => { // create key pair
+ this.requestSigning(domain, (cert) => { // send CSR
+ if ((cert instanceof Buffer) || (typeof cert === 'string')) { // valid certificate data
+ fs.writeFile(domain + '.der', cert, (err) => { // sanitize domain name for file path
+ if (err instanceof Object) { // file system error
+ if (this.jWebClient.verbose) {
+ console.error('Error : File system error', err['code'], 'while writing certificate to file')
+ }
+ done.reject(err)
+ } else {
+ done.resolve() // CSR complete and certificate written to file system
}
- callback(false)
- } else {
- callback(true) // CSR complete and certificate written to file system
- }
- })
- } else {
- callback(false) // invalid certificate data
- }
+ })
+ } else {
+ done.reject('invalid certificate data')
+ }
+ })
+
})
- } else {
- callback(false) // could not create key pair
- }
})
- })
+ return done.promise
}
/**
@@ -521,27 +509,21 @@ export class AcmeClient {
* @param {string} e - email address, expected to be already sanitized
* @param {function} callback
*/
- createKeyPair(bit, c, o, cn, e, callback) {
- if (typeof callback !== 'function') {
- callback = this.emptyCallback // ensure callback is function
- }
+ createKeyPair(bit, c, o, cn, e) {
+ let done = q.defer()
let openssl = `openssl req -new -nodes -newkey rsa:${bit} -sha256 -subj "/C=${c}/O=${o}/CN=${cn}/emailAddress=${e}" -keyout \"${cn}.key\" -outform der -out \"${cn}.csr\"`
console.error('Action : Creating key pair')
if (this.jWebClient.verbose) {
console.error('Running:', openssl)
}
- child_process.exec(openssl, (e) => {
- if (!e) {
- console.error('Result : done')
+ plugins.shelljs.exec(openssl, (codeArg, stdOutArg, stdErrorArg) => {
+ if (!stdErrorArg) {
+ done.resolve()
} else {
- console.error('Result : failed')
+ done.reject(stdErrorArg)
}
- callback(e)
- // dereference
- callback = null
- e = null
- }
- )
+ })
+ return done.promise
}
/**
@@ -562,9 +544,9 @@ export class AcmeClient {
name = ''
}
// respects file name restrictions for ntfs and ext2
- let regex_file = '[<>:\"/\\\\\\|\\?\\*\\u0000-\\u001f\\u007f\\u0080-\\u009f]'
- let regex_path = '[<>:\"\\\\\\|\\?\\*\\u0000-\\u001f\\u007f\\u0080-\\u009f]'
- return name.replace(new RegExp(withPath ? regex_path : regex_file, 'g'), (charToReplace) => {
+ let regexFile = '[<>:\"/\\\\\\|\\?\\*\\u0000-\\u001f\\u007f\\u0080-\\u009f]'
+ let regexPath = '[<>:\"\\\\\\|\\?\\*\\u0000-\\u001f\\u007f\\u0080-\\u009f]'
+ return name.replace(new RegExp(withPath ? regexPath : regexFile, 'g'), (charToReplace) => {
if (typeof charToReplace === 'string') {
return '%' + charToReplace.charCodeAt(0).toString(16).toLocaleUpperCase()
}
diff --git a/ts/smartacme.classes.jwebclient.ts b/ts/smartacme.classes.jwebclient.ts
index c340787..610951e 100644
--- a/ts/smartacme.classes.jwebclient.ts
+++ b/ts/smartacme.classes.jwebclient.ts
@@ -2,6 +2,12 @@ import * as plugins from './smartacme.plugins'
import * as https from 'https'
let jwa = require('jwa')
import * as url from 'url'
+import * as q from 'q'
+
+export interface IReqResArg {
+ ans: any
+ res: any
+}
/**
* json_to_utf8base64url
@@ -11,7 +17,7 @@ import * as url from 'url'
* @return {string}
* @throws Exception if object cannot be stringified or contains cycle
*/
-let json_to_utf8base64url = function (obj) {
+let json_to_utf8base64url = (obj) => {
return plugins.smartstring.base64.encodeUri(JSON.stringify(obj))
}
@@ -21,24 +27,22 @@ let json_to_utf8base64url = function (obj) {
* @description Implementation of HTTPS-based JSON-Web-Client
*/
export class JWebClient {
- key_pair: any
- last_nonce: string
+ /**
+ * User account key pair
+ */
+ keyPair: any = {}
+
+ /**
+ * Cached nonce returned with last request
+ */
+ lastNonce: string = null
+
+ /**
+ * @member {boolean} module:JWebClient~JWebClient#verbose
+ * @desc Determines verbose mode
+ */
verbose: boolean
constructor() {
- /**
- * @member {Object} module:JWebClient~JWebClient#key_pair
- * @desc User account key pair
- */
- this.key_pair = {}
- /**
- * @member {string} module:JWebClient~JWebClient#last_nonce
- * @desc Cached nonce returned with last request
- */
- this.last_nonce = null
- /**
- * @member {boolean} module:JWebClient~JWebClient#verbose
- * @desc Determines verbose mode
- */
this.verbose = false
}
@@ -94,17 +98,8 @@ export class JWebClient {
* @param {function} callback
* @param {function} errorCallback
*/
- request(query, payload, callback, errorCallback) {
- /*jshint -W069 */
- if (typeof query !== 'string') {
- query = '' // ensure query is string
- }
- if (typeof callback !== 'function') {
- callback = this.emptyCallback // ensure callback is function
- }
- if (typeof errorCallback !== 'function') {
- errorCallback = this.emptyCallback // ensure callback is function
- }
+ request(query: string, payload: string = null) {
+ let done = q.defer()
// prepare options
let uri = url.parse(query)
let options = {
@@ -114,7 +109,7 @@ export class JWebClient {
method: null,
headers: {}
}
- if (typeof payload === 'string') {
+ if (!payload === null) {
options.method = 'POST'
options.headers = {
'Content-Type': 'application/jose',
@@ -124,15 +119,15 @@ export class JWebClient {
options.method = 'GET'
}
// prepare request
- let req = https.request(options, function (res) {
+ let req = https.request(options, (res) => {
// receive data
let data = []
- res.on('data', function (block) {
+ res.on('data', (block) => {
if (block instanceof Buffer) {
data.push(block)
}
})
- res.on('end', function () {
+ res.on('end', () => {
let buf = Buffer.concat(data)
let isJSON = (
(res instanceof Object)
@@ -144,26 +139,25 @@ export class JWebClient {
try {
// convert to JSON
let json = JSON.parse(buf.toString('utf8'))
- callback(json, res)
+ done.resolve({ json: json, res: res })
} catch (e) {
// error (if empty or invalid JSON)
- errorCallback(void 0, e)
+ done.reject(e)
}
- } else {
- callback(buf, res)
}
})
- }).on('error', function (e) {
+ }).on('error', (e) => {
console.error('Error occured', e)
// error
- errorCallback(void 0, e)
+ done.reject(e)
})
// write POST body if payload was specified
- if (typeof payload === 'string') {
+ if (!payload === null) {
req.write(payload)
}
// make request
req.end()
+ return done.promise
}
/**
@@ -173,69 +167,55 @@ export class JWebClient {
* @param {function} callback
* @param {function} errorCallback
*/
- get(uri, callback, errorCallback) {
- /*jshint -W069 */
- let ctx = this
- if (typeof callback !== 'function') {
- callback = this.emptyCallback // ensure callback is function
- }
- this.request(uri, void 0, function (ans, res) {
- ctx.evaluateStatus(uri, null, ans, res)
- // save replay nonce for later requests
- if ((res instanceof Object) && (res['headers'] instanceof Object)) {
- ctx.last_nonce = res.headers['replay-nonce']
- }
- callback(ans, res)
- // dereference
- ans = null
- callback = null
- ctx = null
- res = null
- }, errorCallback)
- // dereference
- errorCallback = null
+ get(uri: string) {
+ let done = q.defer()
+ this.request(uri)
+ .then((reqResArg: IReqResArg) => {
+ this.evaluateStatus(uri, null, reqResArg.ans, reqResArg.res)
+ // save replay nonce for later requests
+ if ((reqResArg.res instanceof Object) && (reqResArg.res['headers'] instanceof Object)) {
+ this.lastNonce = reqResArg.res.headers['replay-nonce']
+ }
+ done.resolve(reqResArg)
+ })
+ return done.promise
}
/**
- * post
- * @description make POST request
+ * make POST request
* @param {string} uri
* @param {Object|string|number|boolean} payload
* @param {function} callback
* @param {function} errorCallback
*/
- post(uri, payload, callback, errorCallback) {
- /*jshint -W069 */
- let ctx = this
- if (typeof callback !== 'function') {
- callback = this.emptyCallback // ensure callback is function
- }
+ post(uri: string, payload) {
+ let done = q.defer()
let jwt = this.createJWT(
- this.last_nonce,
+ this.lastNonce,
payload,
'RS256',
- this.key_pair['private_pem'],
- this.key_pair['public_jwk'])
- this.request(uri, jwt, (ans, res) => {
- ctx.evaluateStatus(uri, payload, ans, res)
- // save replay nonce for later requests
- if ((res instanceof Object) && (res['headers'] instanceof Object)) {
- ctx.last_nonce = res.headers['replay-nonce']
- }
- callback(ans, res)
- }, errorCallback )
+ this.keyPair['private_pem'],
+ this.keyPair['public_jwk'])
+ this.request(uri, jwt)
+ .then((reqResArg: IReqResArg) => {
+ this.evaluateStatus(uri, payload, reqResArg.ans, reqResArg.res)
+ // save replay nonce for later requests
+ if ((reqResArg.res instanceof Object) && (reqResArg.res['headers'] instanceof Object)) {
+ this.lastNonce = reqResArg.res.headers['replay-nonce']
+ }
+ done.resolve(reqResArg)
+ })
+ return done.promise
}
/**
- * evaluateStatus
- * @description check if status is expected and log errors
+ * checks if status is expected and log errors
* @param {string} uri
* @param {Object|string|number|boolean} payload
* @param {Object|string} ans
* @param {Object} res
*/
evaluateStatus(uri, payload, ans, res) {
- /*jshint -W069 */
if (this.verbose) {
if (
(payload instanceof Object)
@@ -263,11 +243,4 @@ export class JWebClient {
console.error('Receive:', ans) // received data
}
}
-
- /**
- * Helper: Empty callback
- */
- emptyCallback() {
- // nop
- }
}
diff --git a/ts/smartacme.plugins.ts b/ts/smartacme.plugins.ts
index ab0b54b..7856852 100644
--- a/ts/smartacme.plugins.ts
+++ b/ts/smartacme.plugins.ts
@@ -1,8 +1,10 @@
import 'typings-global'
import * as path from 'path'
import * as smartstring from 'smartstring'
+import * as shelljs from 'shelljs'
export {
path,
- smartstring
+ smartstring,
+ shelljs
}