From 9cb3c1508ebebe90acb45cdc96d291f6e82308b4 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 20 Jun 2016 22:56:09 +0200 Subject: [PATCH] update to latest dependencies --- .gitignore | 5 ++--- package.json | 3 ++- qenv.yml | 3 +++ test/test.js | 13 +++++++------ test/test.ts | 11 ++++++----- 5 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 qenv.yml diff --git a/.gitignore b/.gitignore index 7e97ea1..5129e42 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,7 @@ coverage/ docs/ ts/typings/ -ts/**/*.js -ts/**/*.js.map -.idea/ node_modules/ + +.nogit/ nogit/ diff --git a/package.json b/package.json index 0e50d39..b6ea322 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.3", "description": "cloudflare management for CoreOS", "main": "dist/index.js", - "typings":"dist/index.d.ts", + "typings": "dist/index.d.ts", "scripts": { "test": "(npmts)" }, @@ -30,6 +30,7 @@ }, "devDependencies": { "npmts-g": "^5.2.6", + "qenv": "^1.0.6", "should": "^9.0.2", "typings-test": "^1.0.1" } diff --git a/qenv.yml b/qenv.yml new file mode 100644 index 0000000..b294360 --- /dev/null +++ b/qenv.yml @@ -0,0 +1,3 @@ +vars: + - CF_EMAIL + - CF_KEY \ No newline at end of file diff --git a/test/test.js b/test/test.js index 8a201d5..cb480fa 100644 --- a/test/test.js +++ b/test/test.js @@ -2,11 +2,12 @@ require("typings-test"); var cflare = require("../dist/index"); var should = require("should"); -var nogit = require("../nogit/nogit.json"); +var qenv_1 = require("qenv"); +var testQenv = new qenv_1.Qenv(process.cwd(), process.cwd() + "/.nogit"); var testCflareAccount = new cflare.CflareAccount(); testCflareAccount.auth({ - email: nogit.cfemail, - key: nogit.cfkey + email: process.env.CF_EMAIL, + key: process.env.CF_KEY }); describe("cflare", function () { describe(".CflareAccount", function () { @@ -23,7 +24,7 @@ describe("cflare", function () { describe(".getZoneId(domainName)", function () { it("should get an Cloudflare Id for a domain string", function (done) { this.timeout(10000); - testCflareAccount.getZoneId("push.rocks") + testCflareAccount.getZoneId("bleu.de") .then(function (responseArg) { console.log(responseArg); done(); @@ -33,7 +34,7 @@ describe("cflare", function () { describe(".listRecords(domainName)", function () { it("should list all records for a specific Domain Name", function (done) { this.timeout(10000); - testCflareAccount.listRecords("push.rocks") + testCflareAccount.listRecords("bleu.de") .then(function (responseArg) { console.log(responseArg); done(); @@ -69,4 +70,4 @@ describe("cflare", function () { }); }); -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FBYyxDQUFDLENBQUE7QUFDdEIsSUFBTyxNQUFNLFdBQVcsZUFBZSxDQUFDLENBQUM7QUFDekMsSUFBSSxNQUFNLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDO0FBQy9CLElBQUksS0FBSyxHQUFHLE9BQU8sQ0FBQyxxQkFBcUIsQ0FBQyxDQUFDO0FBRTNDLElBQUksaUJBQWlCLEdBQUcsSUFBSSxNQUFNLENBQUMsYUFBYSxFQUFFLENBQUM7QUFDbkQsaUJBQWlCLENBQUMsSUFBSSxDQUFDO0lBQ25CLEtBQUssRUFBRSxLQUFLLENBQUMsT0FBTztJQUNwQixHQUFHLEVBQUUsS0FBSyxDQUFDLEtBQUs7Q0FDbkIsQ0FBQyxDQUFDO0FBRUgsUUFBUSxDQUFDLFFBQVEsRUFBQztJQUNkLFFBQVEsQ0FBQyxnQkFBZ0IsRUFBQztRQUN0QixRQUFRLENBQUMsY0FBYyxFQUFDO1lBQ3BCLEVBQUUsQ0FBQywyQkFBMkIsRUFBQyxVQUFTLElBQUk7Z0JBQ3hDLElBQUksQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUM7Z0JBQ3BCLGlCQUFpQixDQUFDLFNBQVMsRUFBRTtxQkFDeEIsSUFBSS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xuXG5sZXQgdGVzdENmbGFyZUFjY291bnQgPSBuZXcgY2ZsYXJlLkNmbGFyZUFjY291bnQoKTtcbnRlc3RDZmxhcmVBY2NvdW50LmF1dGgoe1xuICAgIGVtYWlsOiBub2dpdC5jZmVtYWlsLFxuICAgIGtleTogbm9naXQuY2ZrZXlcbn0pO1xuXG5kZXNjcmliZShcImNmbGFyZVwiLGZ1bmN0aW9uKCl7XG4gICAgZGVzY3JpYmUoXCIuQ2ZsYXJlQWNjb3VudFwiLGZ1bmN0aW9uKCl7XG4gICAgICAgIGRlc2NyaWJlKFwiLmxpc3Rab25lcygpXCIsZnVuY3Rpb24oKXtcbiAgICAgICAgICAgIGl0KFwic2hvdWxkIGRpc3BsYXkgYW4gYWNjb3VudFwiLGZ1bmN0aW9uKGRvbmUpe1xuICAgICAgICAgICAgICAgIHRoaXMudGltZW91dCgxMDAwMCk7XG4gICAgICAgICAgICAgICAgdGVzdENmbGFyZUFjY291bnQubGlzdFpvbmVzKClcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4oKHJlc3BvbnNlQXJnKT0+e1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cocmVzcG9uc2VBcmcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgICAgICBkZXNjcmliZShcIi5nZXRab25lSWQoZG9tYWluTmFtZSlcIixmdW5jdGlvbigpe1xuICAgICAgICAgICAgaXQoXCJzaG91bGQgZ2V0IGFuIENsb3VkZmxhcmUgSWQgZm9yIGEgZG9tYWluIHN0cmluZ1wiLGZ1bmN0aW9uKGRvbmUpe1xuICAgICAgICAgICAgICAgIHRoaXMudGltZW91dCgxMDAwMClcbiAgICAgICAgICAgICAgICB0ZXN0Q2ZsYXJlQWNjb3VudC5nZXRab25lSWQoXCJwdXNoLnJvY2tzXCIpXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKChyZXNwb25zZUFyZyk9PntcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKHJlc3BvbnNlQXJnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgICAgIGRlc2NyaWJlKFwiLmxpc3RSZWNvcmRzKGRvbWFpbk5hbWUpXCIsZnVuY3Rpb24oKXtcbiAgICAgICAgICAgIGl0KFwic2hvdWxkIGxpc3QgYWxsIHJlY29yZHMgZm9yIGEgc3BlY2lmaWMgRG9tYWluIE5hbWVcIixmdW5jdGlvbihkb25lKXtcbiAgICAgICAgICAgICAgICB0aGlzLnRpbWVvdXQoMTAwMDApO1xuICAgICAgICAgICAgICAgIHRlc3RDZmxhcmVBY2NvdW50Lmxpc3RSZWNvcmRzKFwicHVzaC5yb2Nrc1wiKVxuICAgICAgICAgICAgICAgICAgICAudGhlbigocmVzcG9uc2VBcmcpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKHJlc3BvbnNlQXJnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSlcbiAgICAgICAgZGVzY3JpYmUoXCIuY3JlYXRlUmVjb3JkXCIsZnVuY3Rpb24oKXtcbiAgICAgICAgICAgIHRoaXMudGltZW91dCgxMDAwMCk7XG4gICAgICAgICAgICBpdChcInNob3VsZCBjcmVhdGUgYSB2YWxpZCByZWNvcmQgZm9yIGEgbGV2ZWwgMiBkb21haW5cIixmdW5jdGlvbihkb25lKXtcbiAgICAgICAgICAgICAgICB0ZXN0Q2ZsYXJlQWNjb3VudC5jcmVhdGVSZWNvcmQoXCJibGV1LmRlXCIsXCJBXCIsXCIxMjcuMC4wLjFcIilcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24ocmVzcG9uc2VBcmcpe1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cocmVzcG9uc2VBcmcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaXQoXCJzaG91bGQgY3JlYXRlIGEgdmFsaWQgcmVjb3JkIGZvciBhIHN1YmRvbWFpblwiLGZ1bmN0aW9uKGRvbmUpe1xuICAgICAgICAgICAgICAgIHRlc3RDZmxhcmVBY2NvdW50LmNyZWF0ZVJlY29yZChcInN1YmRvbWFpbi5ibGV1LmRlXCIsXCJBXCIsXCIxMjcuMC4wLjFcIilcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24ocmVzcG9uc2VBcmcpe1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cocmVzcG9uc2VBcmcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICAgICAgZGVzY3JpYmUoXCIucmVtb3ZlUmVjb3JkXCIsZnVuY3Rpb24oKXtcbiAgICAgICAgICAgIC8qaXQoXCJzaG91bGQgcmVtb3ZlIGEgcmVjb3JkIGZyb20gQ2xvdWRmbGFyZVwiLGZ1bmN0aW9uKGRvbmUpe1xuICAgICAgICAgICAgICAgIHRlc3RDZmxhcmVBY2NvdW50LnJlbW92ZVJlY29yZCgpXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uKHJlc3BvbnNlQXJnKXtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKHJlc3BvbnNlQXJnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICA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IpXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKChyZXNwb25zZUFyZyk9PntcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKHJlc3BvbnNlQXJnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgICAgIGRlc2NyaWJlKFwiLmxpc3RSZWNvcmRzKGRvbWFpbk5hbWUpXCIsZnVuY3Rpb24oKXtcbiAgICAgICAgICAgIGl0KFwic2hvdWxkIGxpc3QgYWxsIHJlY29yZHMgZm9yIGEgc3BlY2lmaWMgRG9tYWluIE5hbWVcIixmdW5jdGlvbihkb25lKXtcbiAgICAgICAgICAgICAgICB0aGlzLnRpbWVvdXQoMTAwMDApO1xuICAgICAgICAgICAgICAgIHRlc3RDZmxhcmVBY2NvdW50Lmxpc3RSZWNvcmRzKFwiYmxldS5kZVwiKVxuICAgICAgICAgICAgICAgICAgICAudGhlbigocmVzcG9uc2VBcmcpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKHJlc3BvbnNlQXJnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSlcbiAgICAgICAgZGVzY3JpYmUoXCIuY3JlYXRlUmVjb3JkXCIsZnVuY3Rpb24oKXtcbiAgICAgICAgICAgIHRoaXMudGltZW91dCgxMDAwMCk7XG4gICAgICAgICAgICBpdChcInNob3VsZCBjcmVhdGUgYSB2YWxpZCByZWNvcmQgZm9yIGEgbGV2ZWwgMiBkb21haW5cIixmdW5jdGlvbihkb25lKXtcbiAgICAgICAgICAgICAgICB0ZXN0Q2ZsYXJlQWNjb3VudC5jcmVhdGVSZWNvcmQoXCJibGV1LmRlXCIsXCJBXCIsXCIxMjcuMC4wLjFcIilcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24ocmVzcG9uc2VBcmcpe1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cocmVzcG9uc2VBcmcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaXQoXCJzaG91bGQgY3JlYXRlIGEgdmFsaWQgcmVjb3JkIGZvciBhIHN1YmRvbWFpblwiLGZ1bmN0aW9uKGRvbmUpe1xuICAgICAgICAgICAgICAgIHRlc3RDZmxhcmVBY2NvdW50LmNyZWF0ZVJlY29yZChcInN1YmRvbWFpbi5ibGV1LmRlXCIsXCJBXCIsXCIxMjcuMC4wLjFcIilcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24ocmVzcG9uc2VBcmcpe1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cocmVzcG9uc2VBcmcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSgpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICAgICAgZGVzY3JpYmUoXCIucmVtb3ZlUmVjb3JkXCIsZnVuY3Rpb24oKXtcbiAgICAgICAgICAgIC8qaXQoXCJzaG91bGQgcmVtb3ZlIGEgcmVjb3JkIGZyb20gQ2xvdWRmbGFyZVwiLGZ1bmN0aW9uKGRvbmUpe1xuICAgICAgICAgICAgICAgIHRlc3RDZmxhcmVBY2NvdW50LnJlbW92ZVJlY29yZCgpXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKGZ1bmN0aW9uKHJlc3BvbnNlQXJnKXtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKHJlc3BvbnNlQXJnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTsqL1xuICAgICAgICB9KTtcbiAgICB9KVxufSk7XG4iXX0= diff --git a/test/test.ts b/test/test.ts index d92fd65..f66cc97 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,12 +1,13 @@ import "typings-test"; import cflare = require("../dist/index"); let should = require("should"); -let nogit = require("../nogit/nogit.json"); +import {Qenv} from "qenv"; +let testQenv = new Qenv(process.cwd(),process.cwd() + "/.nogit"); let testCflareAccount = new cflare.CflareAccount(); testCflareAccount.auth({ - email: nogit.cfemail, - key: nogit.cfkey + email: process.env.CF_EMAIL, + key: process.env.CF_KEY }); describe("cflare",function(){ @@ -24,7 +25,7 @@ describe("cflare",function(){ describe(".getZoneId(domainName)",function(){ it("should get an Cloudflare Id for a domain string",function(done){ this.timeout(10000) - testCflareAccount.getZoneId("push.rocks") + testCflareAccount.getZoneId("bleu.de") .then((responseArg)=>{ console.log(responseArg); done(); @@ -34,7 +35,7 @@ describe("cflare",function(){ describe(".listRecords(domainName)",function(){ it("should list all records for a specific Domain Name",function(done){ this.timeout(10000); - testCflareAccount.listRecords("push.rocks") + testCflareAccount.listRecords("bleu.de") .then((responseArg) => { console.log(responseArg); done();