Browse Source

Merge branch 'master' into add/env-flags

master
Guillermo Rauch 9 years ago
parent
commit
4aba5cc709
  1. 12
      HISTORY.md
  2. 6
      lib/alias.js
  3. 2
      lib/index.js
  4. 9
      package.json

12
HISTORY.md

@ -1,4 +1,16 @@
0.21.0 / 2016-08-16
==================
* fix exceptions
* domain add: try fallback if the list of name servers is empty [@hbp]
* show a proper error message for protected domain names [@hbp]
0.20.0 / 2016-08-16
==================
* docker support
0.19.0 / 2016-07-22
===================

6
lib/alias.js

@ -200,6 +200,12 @@ export default class Alias extends Now {
return bail(err);
}
if ('forbidden' === code) {
const err = new Error('The domain you are trying to use as an alias is already in use by a different account.');
err.userError = true;
return bail(err);
}
return bail(new Error('Authorization error'));
}

2
lib/index.js

@ -354,7 +354,7 @@ export default class Now extends EventEmitter {
if (this._debug) console.timeEnd(`> [debug] #${attempt} GET /whois-ns${fallback ? '-fallback' : ''}`);
const body = await res.json();
if (200 === res.status) {
if (!body.nameservers && !fallback) {
if ((!body.nameservers || body.nameservers.length === 0) && !fallback) {
// if the nameservers are `null` it's likely
// that our whois service failed to parse it
return this.getNameservers(domain, { fallback: true });

9
package.json

@ -1,6 +1,6 @@
{
"name": "now",
"version": "0.19.0",
"version": "0.21.0",
"description": "realtime instant node.js deployment with one command",
"readme": "",
"main": "./build/lib/index",
@ -8,7 +8,10 @@
"build"
],
"greenkeeper": {
"emails": false
"emails": false,
"ignore": [
"babel-runtime"
]
},
"babel": {
"presets": [
@ -89,7 +92,7 @@
"babel-register": "6.11.6",
"del": "2.2.2",
"enclose": "2.2.0",
"eslint": "3.3.0",
"eslint": "3.3.1",
"eslint-config-standard": "5.3.5",
"eslint-plugin-promise": "2.0.1",
"eslint-plugin-standard": "2.0.0",

Loading…
Cancel
Save