Browse Source

dummy package

pull/1/head
AJ ONeal 5 years ago
parent
commit
93a6c3bda3
  1. 17
      .jshintrc
  2. 8
      .prettierrc
  3. 1
      AUTHORS
  4. 2
      example.env
  5. 3
      index.js
  6. 29
      lib/index.js
  7. 27
      package.json
  8. 23
      test.js

17
.jshintrc

@ -0,0 +1,17 @@
{ "node": true
, "browser": true
, "jquery": true
, "globals": { "Promise": true }
, "indent": 2
, "onevar": true
, "laxcomma": true
, "laxbreak": true
, "curly": true
, "nonbsp": true
, "eqeqeq": true
, "immed": true
, "undef": true
, "latedef": "nofunc"
}

8
.prettierrc

@ -0,0 +1,8 @@
{
"bracketSpacing": true,
"printWidth": 80,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "none",
"useTabs": true
}

1
AUTHORS

@ -0,0 +1 @@
AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)

2
example.env

@ -0,0 +1,2 @@
ZONE=example.co.uk
TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

3
index.js

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./lib/index.js');

29
lib/index.js

@ -0,0 +1,29 @@
'use strict';
var request;
var defaults = {};
module.exports.create = function(config) {
return {
init: function(opts) {
request = opts.request;
return null;
},
zones: function(data) {
//console.info('List Zones', data);
throw Error('listing zones not implemented');
},
set: function(data) {
// console.info('Add TXT', data);
throw Error('setting TXT not implemented');
},
remove: function(data) {
// console.info('Remove TXT', data);
throw Error('removing TXT not implemented');
},
get: function(data) {
// console.info('List TXT', data);
throw Error('listing TXTs not implemented');
}
};
};

27
package.json

@ -0,0 +1,27 @@
{
"name": "acme-dns-01-gandi",
"version": "0.0.1",
"description": "Gandi + Let's Encrypt for Node.js - ACME dns-01 challenges w/ 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-gandi.js.git"
},
"keywords": [
"digitalocean",
"digital-ocean",
"dns",
"dns-01",
"letsencrypt",
"acme",
"greenlock"
],
"author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
"license": "MPL-2.0",
"devDependencies": {
"dotenv": "^8.0.0"
}
}

23
test.js

@ -0,0 +1,23 @@
#!/usr/bin/env node
'use strict';
// See https://git.coolaj86.com/coolaj86/acme-challenge-test.js
var tester = require('acme-challenge-test');
// Usage: node ./test.js example.com xxxxxxxxx
var zone = process.argv[2] || process.env.ZONE;
var challenger = require('./index.js').create({
token: process.argv[3] || process.env.TOKEN
});
// The dry-run tests can pass on, literally, 'example.com'
// but the integration tests require that you have control over the domain
tester
.testZone('dns-01', zone, challenger)
.then(function() {
console.info('PASS', zone);
})
.catch(function(e) {
console.error(e.message);
console.error(e.stack);
});
Loading…
Cancel
Save