bug fixes #2
							
								
								
									
										374
									
								
								lib/index.js
									
									
									
									
									
								
							
							
						
						
									
										374
									
								
								lib/index.js
									
									
									
									
									
								
							@ -5,207 +5,263 @@ var request; // = require('@root/request');
 | 
			
		||||
var parseString = require('xml2js').parseString;
 | 
			
		||||
parseString = util.promisify(parseString);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
const SANDBOX_URL = 'https://api.sandbox.namecheap.com/xml.response';
 | 
			
		||||
const PRODUCTION_URL = 'https://api.namecheap.com/xml.response';
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
var defaults = {
 | 
			
		||||
    baseUrl: PRODUCTION_URL
 | 
			
		||||
	baseUrl: SANDBOX_URL
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
function extend(obj) {
 | 
			
		||||
    var newObj = {};
 | 
			
		||||
    for (var i in obj) {
 | 
			
		||||
        if (obj.hasOwnProperty(i)) {
 | 
			
		||||
            newObj[i] = obj[i];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return newObj;
 | 
			
		||||
	var newObj = {};
 | 
			
		||||
	for (var i in obj) {
 | 
			
		||||
		if (obj.hasOwnProperty(i)) {
 | 
			
		||||
			newObj[i] = obj[i];
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return newObj;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function assign(obj1,obj2) {
 | 
			
		||||
    for (var attrname in obj2) { obj1[attrname] = obj2[attrname]; }
 | 
			
		||||
function assign(obj1, obj2) {
 | 
			
		||||
	for (var attrname in obj2) {
 | 
			
		||||
		obj1[attrname] = obj2[attrname];
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function requestUrl(baseUrl, params) {
 | 
			
		||||
    var queryString = Object.keys(params).map(function (key) {
 | 
			
		||||
        return encodeURIComponent(key) + '=' + encodeURIComponent(params[key]);
 | 
			
		||||
    }).join('&');
 | 
			
		||||
    // console.debug(queryString);
 | 
			
		||||
    return baseUrl + '?' + queryString;
 | 
			
		||||
	var queryString = Object.keys(params)
 | 
			
		||||
		.map(function(key) {
 | 
			
		||||
			return (
 | 
			
		||||
				encodeURIComponent(key) + '=' + encodeURIComponent(params[key])
 | 
			
		||||
			);
 | 
			
		||||
		})
 | 
			
		||||
		.join('&');
 | 
			
		||||
	// console.debug(queryString);
 | 
			
		||||
	return baseUrl + '?' + queryString;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
module.exports.create = function (config) {
 | 
			
		||||
    // config = { baseUrl, token }
 | 
			
		||||
    var baseUrl = config.baseUrl || defaults.baseUrl;
 | 
			
		||||
module.exports.create = function(config) {
 | 
			
		||||
	// config = { baseUrl, token }
 | 
			
		||||
	var baseUrl = config.baseUrl || defaults.baseUrl;
 | 
			
		||||
 | 
			
		||||
    var globalParams = {
 | 
			
		||||
        apiUser: config.apiUser,
 | 
			
		||||
        apiKey: config.apiKey,
 | 
			
		||||
        username: config.username,
 | 
			
		||||
        ClientIp: config.clientIp
 | 
			
		||||
    };
 | 
			
		||||
	var globalParams = {
 | 
			
		||||
		apiUser: config.apiUser,
 | 
			
		||||
		apiKey: config.apiKey,
 | 
			
		||||
		username: config.username,
 | 
			
		||||
		ClientIp: config.clientIp
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
    function api(command, params) {
 | 
			
		||||
        var requestParams = extend(globalParams);
 | 
			
		||||
        requestParams['Command'] = command;
 | 
			
		||||
        assign(requestParams,params);
 | 
			
		||||
	function api(command, params) {
 | 
			
		||||
		var requestParams = extend(globalParams);
 | 
			
		||||
		requestParams['Command'] = command;
 | 
			
		||||
		assign(requestParams, params);
 | 
			
		||||
 | 
			
		||||
        var url = requestUrl(baseUrl, requestParams);
 | 
			
		||||
        // console.log(url);
 | 
			
		||||
        return request({
 | 
			
		||||
            method: 'POST',
 | 
			
		||||
            url: url,
 | 
			
		||||
        }).then(function (response) {
 | 
			
		||||
            var responseBody = response.body;
 | 
			
		||||
            // console.log(responseBody);
 | 
			
		||||
            return parseString(responseBody).then(function (result) {
 | 
			
		||||
                // check response status
 | 
			
		||||
                if (result['ApiResponse']['$']['Status'] === 'ERROR') {
 | 
			
		||||
                    for (let i = 0; i < result['ApiResponse']['Errors'].length; i++) {
 | 
			
		||||
                        console.log(result['ApiResponse']['Errors'][i])
 | 
			
		||||
                    }
 | 
			
		||||
                    throw new Error('API Error');
 | 
			
		||||
                } else { // Status="OK"
 | 
			
		||||
                    return result['ApiResponse']['CommandResponse'][0]
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
		var url = requestUrl(baseUrl, requestParams);
 | 
			
		||||
		console.log('DEBUG >>> url: ' + url);
 | 
			
		||||
		console.log(
 | 
			
		||||
			'DEBUG >>> requestParams: ' + JSON.stringify(requestParams, null, 2)
 | 
			
		||||
		);
 | 
			
		||||
 | 
			
		||||
    return {
 | 
			
		||||
        init: function (deps) {
 | 
			
		||||
          request = deps.request;
 | 
			
		||||
          return null;
 | 
			
		||||
        },
 | 
			
		||||
		return request({
 | 
			
		||||
			method: 'POST',
 | 
			
		||||
			url: url
 | 
			
		||||
		}).then(function(response) {
 | 
			
		||||
			var responseBody = response.body;
 | 
			
		||||
			// console.log(responseBody);
 | 
			
		||||
			return parseString(responseBody).then(function(result) {
 | 
			
		||||
				// check response status
 | 
			
		||||
				if (result['ApiResponse']['$']['Status'] === 'ERROR') {
 | 
			
		||||
					for (
 | 
			
		||||
						let i = 0;
 | 
			
		||||
						i < result['ApiResponse']['Errors'].length;
 | 
			
		||||
						i++
 | 
			
		||||
					) {
 | 
			
		||||
						console.log(
 | 
			
		||||
							'DEBUG >>> error: ' +
 | 
			
		||||
								JSON.stringify(
 | 
			
		||||
									result['ApiResponse']['Errors'][i][
 | 
			
		||||
										'Error'
 | 
			
		||||
									][0],
 | 
			
		||||
									null,
 | 
			
		||||
									2
 | 
			
		||||
								)
 | 
			
		||||
						);
 | 
			
		||||
					}
 | 
			
		||||
					throw new Error('API Error');
 | 
			
		||||
				} else {
 | 
			
		||||
					// Status="OK"
 | 
			
		||||
					return result['ApiResponse']['CommandResponse'][0];
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
        zones: function(data) {
 | 
			
		||||
            return api('namecheap.domains.getList',{}).then(function (zonesResponse) {
 | 
			
		||||
                // console.log('zones');
 | 
			
		||||
                // console.log(zonesResponse);
 | 
			
		||||
                return zonesResponse['DomainGetListResult'].map(function (x) {
 | 
			
		||||
                    return x['Domain'][0]['$']['Name'];
 | 
			
		||||
                });
 | 
			
		||||
	return {
 | 
			
		||||
		init: function(deps) {
 | 
			
		||||
			request = deps.request;
 | 
			
		||||
			return null;
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
            });
 | 
			
		||||
        },
 | 
			
		||||
		zones: function(data) {
 | 
			
		||||
			return api('namecheap.domains.getList', {}).then(function(
 | 
			
		||||
				zonesResponse
 | 
			
		||||
			) {
 | 
			
		||||
				// console.log('zones');
 | 
			
		||||
				// console.log(zonesResponse);
 | 
			
		||||
				return zonesResponse['DomainGetListResult'].map(function(x) {
 | 
			
		||||
					return x['Domain'][0]['$']['Name'];
 | 
			
		||||
				});
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
        set: function (data) {
 | 
			
		||||
            var ch = data.challenge;
 | 
			
		||||
            var txt = ch.dnsAuthorization;
 | 
			
		||||
		set: function(data) {
 | 
			
		||||
			console.log(`DEBUG >>> data: ${JSON.stringify(data, null, 2)}`);
 | 
			
		||||
			var ch = data.challenge;
 | 
			
		||||
			var txt = ch.dnsAuthorization;
 | 
			
		||||
 | 
			
		||||
            var params = {};
 | 
			
		||||
            var zone = ch.dnsZone;
 | 
			
		||||
            // the domain is the first part
 | 
			
		||||
            params['SLD'] = zone.split('.')[0];
 | 
			
		||||
            // the rest of the components are the TLD
 | 
			
		||||
            params['TLD'] = zone.split('.').splice(1).join('.');
 | 
			
		||||
			var params = {};
 | 
			
		||||
			// var zone = ch.dnsZone;
 | 
			
		||||
			var zone = ch.identifier.value;
 | 
			
		||||
			console.log(`DEBUG >>> zone: ${zone}`);
 | 
			
		||||
 | 
			
		||||
            // setting a host record overwrites all existing,
 | 
			
		||||
            // adding a new records means you've have to send back all previous records too
 | 
			
		||||
			// the domain is the first part
 | 
			
		||||
			// params['SLD'] = zone.split('.')[0];
 | 
			
		||||
			// the rest of the components are the TLD
 | 
			
		||||
			// params['TLD'] = zone.split('.').splice(1).join('.');
 | 
			
		||||
 | 
			
		||||
            return api('namecheap.domains.dns.getHosts',params).then(function (hostsResponse) {
 | 
			
		||||
                var currentHostRecordsCount = hostsResponse['DomainDNSGetHostsResult'][0]['host'].length;
 | 
			
		||||
			var domains = zone.split('.');
 | 
			
		||||
			console.log('DEBUG >>> ' + domains);
 | 
			
		||||
 | 
			
		||||
                for (var i = 0; i < currentHostRecordsCount; i++) {
 | 
			
		||||
                    // console.log(hostsResponse['DomainDNSGetHostsResult'][i]['host'][0]);
 | 
			
		||||
                    var currentEntry =  hostsResponse['DomainDNSGetHostsResult'][0]['host'][i]['$'];
 | 
			
		||||
			// if you have subdomain foo.blah.com, SLD = blah and TLD = com
 | 
			
		||||
			params['TLD'] = domains[domains.length - 1];
 | 
			
		||||
			params['SLD'] = domains[domains.length - 2];
 | 
			
		||||
 | 
			
		||||
                    params['HostName'+(i+1)] = currentEntry['Name'];
 | 
			
		||||
                    params['RecordType'+(i+1)] = currentEntry['Type'];
 | 
			
		||||
                    params['Address'+(i+1)] = currentEntry['Address'];
 | 
			
		||||
                    params['TTL'+(i+1)] = currentEntry['TTL'];
 | 
			
		||||
                }
 | 
			
		||||
			console.log(`DEBUG >>> SLD: ${params['SLD']}`);
 | 
			
		||||
			console.log(`DEBUG >>> TLD: ${params['TLD']}`);
 | 
			
		||||
 | 
			
		||||
                params['HostName'+(currentHostRecordsCount+1)] = ch.dnsPrefix;
 | 
			
		||||
                params['RecordType'+(currentHostRecordsCount+1)] = 'TXT';
 | 
			
		||||
                params['Address'+(currentHostRecordsCount+1)] = txt;
 | 
			
		||||
                params['TTL'+(currentHostRecordsCount+1)] = 100; // in minutes
 | 
			
		||||
			// setting a host record overwrites all existing,
 | 
			
		||||
			// adding a new records means you've have to send back all previous records too
 | 
			
		||||
 | 
			
		||||
                // console.log(params);
 | 
			
		||||
			return api('namecheap.domains.dns.getHosts', params).then(function(
 | 
			
		||||
				hostsResponse
 | 
			
		||||
			) {
 | 
			
		||||
				var currentHostRecordsCount =
 | 
			
		||||
					hostsResponse['DomainDNSGetHostsResult'][0]['host'].length;
 | 
			
		||||
 | 
			
		||||
                return api('namecheap.domains.dns.setHosts',params).then(function (setHostResponse) {
 | 
			
		||||
                    // console.log('setHost');
 | 
			
		||||
                    // console.log(setHostResponse);
 | 
			
		||||
                    return true
 | 
			
		||||
                }).catch(function (err) {
 | 
			
		||||
                    throw new Error('record did not set. check subdomain, api key, etc');
 | 
			
		||||
                });
 | 
			
		||||
            });
 | 
			
		||||
				for (var i = 0; i < currentHostRecordsCount; i++) {
 | 
			
		||||
					// console.log(hostsResponse['DomainDNSGetHostsResult'][i]['host'][0]);
 | 
			
		||||
					var currentEntry =
 | 
			
		||||
						hostsResponse['DomainDNSGetHostsResult'][0]['host'][i][
 | 
			
		||||
							'$'
 | 
			
		||||
						];
 | 
			
		||||
 | 
			
		||||
        },
 | 
			
		||||
        remove: function (data) {
 | 
			
		||||
            var ch = data.challenge;
 | 
			
		||||
					params['HostName' + (i + 1)] = currentEntry['Name'];
 | 
			
		||||
					params['RecordType' + (i + 1)] = currentEntry['Type'];
 | 
			
		||||
					params['Address' + (i + 1)] = currentEntry['Address'];
 | 
			
		||||
					params['TTL' + (i + 1)] = currentEntry['TTL'];
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
            var params = {};
 | 
			
		||||
            var zone = ch.dnsZone;
 | 
			
		||||
            // the domain is the first part
 | 
			
		||||
            params['SLD'] = zone.split('.')[0];
 | 
			
		||||
            // the rest of the components are the TLD
 | 
			
		||||
            params['TLD'] = zone.split('.').splice(1).join('.');
 | 
			
		||||
				params['HostName' + (currentHostRecordsCount + 1)] =
 | 
			
		||||
					ch.dnsPrefix;
 | 
			
		||||
				params['RecordType' + (currentHostRecordsCount + 1)] = 'TXT';
 | 
			
		||||
				params['Address' + (currentHostRecordsCount + 1)] = txt;
 | 
			
		||||
				params['TTL' + (currentHostRecordsCount + 1)] = 100; // in minutes
 | 
			
		||||
 | 
			
		||||
            // setting a host record overwrites all existing,
 | 
			
		||||
            // removing a new records means you've have to send back all previous records without removed
 | 
			
		||||
				// console.log(params);
 | 
			
		||||
 | 
			
		||||
            return api('namecheap.domains.dns.getHosts',params).then(function (hostsResponse) {
 | 
			
		||||
                var currentHostRecordsCount = hostsResponse['DomainDNSGetHostsResult'][0]['host'].length;
 | 
			
		||||
				return api('namecheap.domains.dns.setHosts', params)
 | 
			
		||||
					.then(function(setHostResponse) {
 | 
			
		||||
						// console.log('setHost');
 | 
			
		||||
						// console.log(setHostResponse);
 | 
			
		||||
						return true;
 | 
			
		||||
					})
 | 
			
		||||
					.catch(function(err) {
 | 
			
		||||
						throw new Error(
 | 
			
		||||
							'record did not set. check subdomain, api key, etc'
 | 
			
		||||
						);
 | 
			
		||||
					});
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		remove: function(data) {
 | 
			
		||||
			var ch = data.challenge;
 | 
			
		||||
 | 
			
		||||
                for (var i = 0; i < currentHostRecordsCount; i++) {
 | 
			
		||||
                    // console.log(hostsResponse['DomainDNSGetHostsResult'][i]['host'][0]);
 | 
			
		||||
                    var currentEntry =  hostsResponse['DomainDNSGetHostsResult'][0]['host'][i]['$'];
 | 
			
		||||
                    if(currentEntry['Address'] != ch.dnsAuthorization){
 | 
			
		||||
                        params['HostName'+(i+1)] = currentEntry['Name'];
 | 
			
		||||
                        params['RecordType'+(i+1)] = currentEntry['Type'];
 | 
			
		||||
                        params['Address'+(i+1)] = currentEntry['Address'];
 | 
			
		||||
                        params['TTL'+(i+1)] = currentEntry['TTL'];    
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
			var params = {};
 | 
			
		||||
			var zone = ch.identifier.value;
 | 
			
		||||
			var domains = zone.split('.');
 | 
			
		||||
 | 
			
		||||
                return api('namecheap.domains.dns.setHosts',params).then(function (setHostResponse) {
 | 
			
		||||
                    // console.log('setHost');
 | 
			
		||||
                    // console.log(setHostResponse);
 | 
			
		||||
                    return true
 | 
			
		||||
                }).catch(function (err) {
 | 
			
		||||
                    throw new Error('record did not remove. check subdomain, api key, etc');
 | 
			
		||||
                });
 | 
			
		||||
            });
 | 
			
		||||
			params['TLD'] = domains[domains.length - 1];
 | 
			
		||||
			params['SLD'] = domains[domains.length - 2];
 | 
			
		||||
 | 
			
		||||
        },
 | 
			
		||||
        get: function (data) {
 | 
			
		||||
            var ch = data.challenge;
 | 
			
		||||
			// setting a host record overwrites all existing,
 | 
			
		||||
			// removing a new records means you've have to send back all previous records without removed
 | 
			
		||||
 | 
			
		||||
            var params = {};
 | 
			
		||||
            var zone = ch.dnsZone;
 | 
			
		||||
			return api('namecheap.domains.dns.getHosts', params).then(function(
 | 
			
		||||
				hostsResponse
 | 
			
		||||
			) {
 | 
			
		||||
				var currentHostRecordsCount =
 | 
			
		||||
					hostsResponse['DomainDNSGetHostsResult'][0]['host'].length;
 | 
			
		||||
 | 
			
		||||
            // the domain is the first part
 | 
			
		||||
            params['SLD'] = zone.split('.')[0];
 | 
			
		||||
            // the rest of the components are the TLD
 | 
			
		||||
            params['TLD'] = zone.split('.').splice(1).join('.');
 | 
			
		||||
				for (var i = 0; i < currentHostRecordsCount; i++) {
 | 
			
		||||
					// console.log(hostsResponse['DomainDNSGetHostsResult'][i]['host'][0]);
 | 
			
		||||
					var currentEntry =
 | 
			
		||||
						hostsResponse['DomainDNSGetHostsResult'][0]['host'][i][
 | 
			
		||||
							'$'
 | 
			
		||||
						];
 | 
			
		||||
					if (currentEntry['Address'] != ch.dnsAuthorization) {
 | 
			
		||||
						params['HostName' + (i + 1)] = currentEntry['Name'];
 | 
			
		||||
						params['RecordType' + (i + 1)] = currentEntry['Type'];
 | 
			
		||||
						params['Address' + (i + 1)] = currentEntry['Address'];
 | 
			
		||||
						params['TTL' + (i + 1)] = currentEntry['TTL'];
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
            return api('namecheap.domains.dns.getHosts',params).then(function (hostsResponse) {
 | 
			
		||||
                // console.log('hosts');
 | 
			
		||||
                // console.log(hostsResponse);
 | 
			
		||||
                var currentHostRecords = hostsResponse['DomainDNSGetHostsResult'][0]['host'];
 | 
			
		||||
				return api('namecheap.domains.dns.setHosts', params)
 | 
			
		||||
					.then(function(setHostResponse) {
 | 
			
		||||
						// console.log('setHost');
 | 
			
		||||
						// console.log(setHostResponse);
 | 
			
		||||
						return true;
 | 
			
		||||
					})
 | 
			
		||||
					.catch(function(err) {
 | 
			
		||||
						throw new Error(
 | 
			
		||||
							'record did not remove. check subdomain, api key, etc'
 | 
			
		||||
						);
 | 
			
		||||
					});
 | 
			
		||||
			});
 | 
			
		||||
		},
 | 
			
		||||
		get: function(data) {
 | 
			
		||||
			var ch = data.challenge;
 | 
			
		||||
 | 
			
		||||
                var entries = currentHostRecords.filter(function (x) {
 | 
			
		||||
                    return x['$']['Type'] === 'TXT';
 | 
			
		||||
                });
 | 
			
		||||
			var params = {};
 | 
			
		||||
			var zone = ch.identifier.value;
 | 
			
		||||
			var domains = zone.split('.');
 | 
			
		||||
 | 
			
		||||
                var entry = entries.filter(function (x) {
 | 
			
		||||
                    // console.log('data', x.data);
 | 
			
		||||
                    // console.log('dnsAuth', ch.dnsAuthorization, ch);
 | 
			
		||||
                    return x['$']['Address'] === ch.dnsAuthorization;
 | 
			
		||||
                })[0];
 | 
			
		||||
			params['TLD'] = domains[domains.length - 1];
 | 
			
		||||
			params['SLD'] = domains[domains.length - 2];
 | 
			
		||||
 | 
			
		||||
                if (entry) {
 | 
			
		||||
                    return {dnsAuthorization: entry['$']['Address']};
 | 
			
		||||
                } else {
 | 
			
		||||
                    return null;
 | 
			
		||||
                }
 | 
			
		||||
			return api('namecheap.domains.dns.getHosts', params).then(function(
 | 
			
		||||
				hostsResponse
 | 
			
		||||
			) {
 | 
			
		||||
				// console.log('hosts');
 | 
			
		||||
				// console.log(hostsResponse);
 | 
			
		||||
				var currentHostRecords =
 | 
			
		||||
					hostsResponse['DomainDNSGetHostsResult'][0]['host'];
 | 
			
		||||
 | 
			
		||||
            });
 | 
			
		||||
				var entries = currentHostRecords.filter(function(x) {
 | 
			
		||||
					return x['$']['Type'] === 'TXT';
 | 
			
		||||
				});
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
				var entry = entries.filter(function(x) {
 | 
			
		||||
					// console.log('data', x.data);
 | 
			
		||||
					// console.log('dnsAuth', ch.dnsAuthorization, ch);
 | 
			
		||||
					return x['$']['Address'] === ch.dnsAuthorization;
 | 
			
		||||
				})[0];
 | 
			
		||||
 | 
			
		||||
				if (entry) {
 | 
			
		||||
					return { dnsAuthorization: entry['$']['Address'] };
 | 
			
		||||
				} else {
 | 
			
		||||
					return null;
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
		}
 | 
			
		||||
	};
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										103
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										103
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -1,58 +1,49 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "acme-dns-01-namecheap",
 | 
			
		||||
  "version": "3.0.0",
 | 
			
		||||
  "lockfileVersion": 1,
 | 
			
		||||
  "requires": true,
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@root/request": {
 | 
			
		||||
      "version": "1.3.11",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@root/request/-/request-1.3.11.tgz",
 | 
			
		||||
      "integrity": "sha512-3a4Eeghcjsfe6zh7EJ+ni1l8OK9Fz2wL1OjP4UCa0YdvtH39kdXB9RGWuzyNv7dZi0+Ffkc83KfH0WbPMiuJFw=="
 | 
			
		||||
    },
 | 
			
		||||
    "acme-challenge-test": {
 | 
			
		||||
      "version": "3.3.2",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/acme-challenge-test/-/acme-challenge-test-3.3.2.tgz",
 | 
			
		||||
      "integrity": "sha512-0AbMcaON20wpI5vzFDAqwcv2VerY4xIlNCqX0w1xEJUIu/EQtQNmkje+rKNuy2TUl2KBMdIaR6YBbJUdaEiC4w==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "@root/request": "^1.3.11"
 | 
			
		||||
      },
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "@root/request": {
 | 
			
		||||
          "version": "1.3.11",
 | 
			
		||||
          "resolved": "https://registry.npmjs.org/@root/request/-/request-1.3.11.tgz",
 | 
			
		||||
          "integrity": "sha512-3a4Eeghcjsfe6zh7EJ+ni1l8OK9Fz2wL1OjP4UCa0YdvtH39kdXB9RGWuzyNv7dZi0+Ffkc83KfH0WbPMiuJFw==",
 | 
			
		||||
          "dev": true
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "acme-dns-01-test": {
 | 
			
		||||
      "version": "3.3.1",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/acme-dns-01-test/-/acme-dns-01-test-3.3.1.tgz",
 | 
			
		||||
      "integrity": "sha512-di2/n19FDLc/pe4CDxd/FpxuuCZG7CHEQVjWr96vvtxe5XNNgdHi2eJqVP0z9WBf9s61zxslyRPrAWzTN8ZVWw==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "acme-challenge-test": "^3.3.1"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "sax": {
 | 
			
		||||
      "version": "1.2.4",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
 | 
			
		||||
      "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
 | 
			
		||||
    },
 | 
			
		||||
    "xml2js": {
 | 
			
		||||
      "version": "0.4.19",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
 | 
			
		||||
      "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==",
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "sax": ">=0.6.0",
 | 
			
		||||
        "xmlbuilder": "~9.0.1"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "xmlbuilder": {
 | 
			
		||||
      "version": "9.0.7",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
 | 
			
		||||
      "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
	"name": "acme-dns-01-namecheap",
 | 
			
		||||
	"version": "3.0.0",
 | 
			
		||||
	"lockfileVersion": 1,
 | 
			
		||||
	"requires": true,
 | 
			
		||||
	"dependencies": {
 | 
			
		||||
		"@root/request": {
 | 
			
		||||
			"version": "1.3.11",
 | 
			
		||||
			"resolved": "https://registry.npmjs.org/@root/request/-/request-1.3.11.tgz",
 | 
			
		||||
			"integrity": "sha512-3a4Eeghcjsfe6zh7EJ+ni1l8OK9Fz2wL1OjP4UCa0YdvtH39kdXB9RGWuzyNv7dZi0+Ffkc83KfH0WbPMiuJFw=="
 | 
			
		||||
		},
 | 
			
		||||
		"acme-challenge-test": {
 | 
			
		||||
			"version": "3.3.2",
 | 
			
		||||
			"resolved": "https://registry.npmjs.org/acme-challenge-test/-/acme-challenge-test-3.3.2.tgz",
 | 
			
		||||
			"integrity": "sha512-0AbMcaON20wpI5vzFDAqwcv2VerY4xIlNCqX0w1xEJUIu/EQtQNmkje+rKNuy2TUl2KBMdIaR6YBbJUdaEiC4w==",
 | 
			
		||||
			"dev": true,
 | 
			
		||||
			"requires": {
 | 
			
		||||
				"@root/request": "^1.3.11"
 | 
			
		||||
			},
 | 
			
		||||
			"dependencies": {
 | 
			
		||||
				"@root/request": {
 | 
			
		||||
					"version": "1.3.11",
 | 
			
		||||
					"resolved": "https://registry.npmjs.org/@root/request/-/request-1.3.11.tgz",
 | 
			
		||||
					"integrity": "sha512-3a4Eeghcjsfe6zh7EJ+ni1l8OK9Fz2wL1OjP4UCa0YdvtH39kdXB9RGWuzyNv7dZi0+Ffkc83KfH0WbPMiuJFw==",
 | 
			
		||||
					"dev": true
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		"sax": {
 | 
			
		||||
			"version": "1.2.4",
 | 
			
		||||
			"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
 | 
			
		||||
			"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
 | 
			
		||||
		},
 | 
			
		||||
		"xml2js": {
 | 
			
		||||
			"version": "0.4.19",
 | 
			
		||||
			"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
 | 
			
		||||
			"integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==",
 | 
			
		||||
			"requires": {
 | 
			
		||||
				"sax": ">=0.6.0",
 | 
			
		||||
				"xmlbuilder": "~9.0.1"
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		"xmlbuilder": {
 | 
			
		||||
			"version": "9.0.7",
 | 
			
		||||
			"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
 | 
			
		||||
			"integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										71
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										71
									
								
								package.json
									
									
									
									
									
								
							@ -1,36 +1,39 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "acme-dns-01-namecheap",
 | 
			
		||||
  "version": "3.0.0",
 | 
			
		||||
  "description": "Namecheap DNS for Let's Encrypt / ACME dns-01 challenges with ACME.js and Greenlock.js",
 | 
			
		||||
  "main": "index.js",
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "test": "node ./test.js"
 | 
			
		||||
  },
 | 
			
		||||
  "repository": {
 | 
			
		||||
    "type": "git",
 | 
			
		||||
    "url": "https://git.coolaj86.com/coolaj86/acme-dns-01-namecheap.js.git"
 | 
			
		||||
  },
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "namecheap",
 | 
			
		||||
    "name-cheap",
 | 
			
		||||
    "dns",
 | 
			
		||||
    "dns-01",
 | 
			
		||||
    "letsencrypt",
 | 
			
		||||
    "acme",
 | 
			
		||||
    "greenlock"
 | 
			
		||||
  ],
 | 
			
		||||
  "author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
 | 
			
		||||
  "contributors": [
 | 
			
		||||
    "Nyaundi Brian <danleyb2@gmail.com> (https://git.coolaj86.com/danleyb2/)",
 | 
			
		||||
    "Archie Baer <archie@abaer.dev> (https://abaer.dev)"
 | 
			
		||||
  ],
 | 
			
		||||
  "license": "MPL-2.0",
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@root/request": "^1.3.11",
 | 
			
		||||
    "xml2js": "^0.4.19"
 | 
			
		||||
  },
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "acme-challenge-test": "^3.3.2",
 | 
			
		||||
    "acme-dns-01-test": "^3.2.1"
 | 
			
		||||
  }
 | 
			
		||||
	"name": "acme-dns-01-namecheap",
 | 
			
		||||
	"version": "3.0.0",
 | 
			
		||||
	"description": "Namecheap DNS for Let's Encrypt / ACME dns-01 challenges with ACME.js and Greenlock.js",
 | 
			
		||||
	"main": "index.js",
 | 
			
		||||
	"files": [
 | 
			
		||||
		"lib",
 | 
			
		||||
		"test.js"
 | 
			
		||||
	],
 | 
			
		||||
	"scripts": {
 | 
			
		||||
		"test": "node ./test.js"
 | 
			
		||||
	},
 | 
			
		||||
	"repository": {
 | 
			
		||||
		"type": "git",
 | 
			
		||||
		"url": "https://git.coolaj86.com/coolaj86/acme-dns-01-namecheap.js.git"
 | 
			
		||||
	},
 | 
			
		||||
	"keywords": [
 | 
			
		||||
		"namecheap",
 | 
			
		||||
		"name-cheap",
 | 
			
		||||
		"dns",
 | 
			
		||||
		"dns-01",
 | 
			
		||||
		"letsencrypt",
 | 
			
		||||
		"acme",
 | 
			
		||||
		"greenlock"
 | 
			
		||||
	],
 | 
			
		||||
	"author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
 | 
			
		||||
	"contributors": [
 | 
			
		||||
		"Nyaundi Brian <danleyb2@gmail.com> (https://git.coolaj86.com/danleyb2/)",
 | 
			
		||||
		"Archie Baer <archie@abaer.dev> (https://abaer.dev)"
 | 
			
		||||
	],
 | 
			
		||||
	"license": "MPL-2.0",
 | 
			
		||||
	"dependencies": {
 | 
			
		||||
		"@root/request": "^1.3.11",
 | 
			
		||||
		"xml2js": "^0.4.19"
 | 
			
		||||
	},
 | 
			
		||||
	"devDependencies": {
 | 
			
		||||
		"acme-challenge-test": "^3.3.2"
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user