Leo Lamprecht
8 years ago
No known key found for this signature in database
GPG Key ID: B08517883D5E0E10
2 changed files with
3 additions and
6 deletions
-
lib/alias.js
-
package.json
|
|
@ -1,5 +1,5 @@ |
|
|
|
// Packages
|
|
|
|
import PublicSuffixList from 'publicsuffixlist' |
|
|
|
import publicSuffixList from 'psl' |
|
|
|
import chalk from 'chalk' |
|
|
|
|
|
|
|
// Ours
|
|
|
@ -10,9 +10,6 @@ import {DOMAIN_VERIFICATION_ERROR} from './errors' |
|
|
|
import Now from './' |
|
|
|
|
|
|
|
const domainRegex = /^((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}$/ |
|
|
|
const psl = new PublicSuffixList() |
|
|
|
|
|
|
|
psl.initializeSync() |
|
|
|
|
|
|
|
export default class Alias extends Now { |
|
|
|
|
|
|
@ -125,7 +122,7 @@ export default class Alias extends Now { |
|
|
|
console.log(`> ${chalk.bold(chalk.underline(alias))} is a custom domain.`) |
|
|
|
console.log(`> Verifying the DNS settings for ${chalk.bold(chalk.underline(alias))} (see ${chalk.underline('https://zeit.world')} for help)`) |
|
|
|
|
|
|
|
const _domain = psl.domain(alias) |
|
|
|
const _domain = publicSuffixList.parse(alias).domain |
|
|
|
const _domainInfo = await this.getDomain(_domain) |
|
|
|
const domainInfo = _domainInfo && !_domainInfo.error ? _domainInfo : undefined |
|
|
|
const {domain, nameservers} = domainInfo ? {domain: _domain} : await this.getNameservers(alias) |
|
|
|
|
|
@ -88,7 +88,7 @@ |
|
|
|
"node-fetch": "1.6.3", |
|
|
|
"node-version": "1.0.0", |
|
|
|
"progress": "1.1.8", |
|
|
|
"publicsuffixlist": "0.2.71", |
|
|
|
"psl": "1.1.15", |
|
|
|
"resumer": "0.0.0", |
|
|
|
"semver-compare": "1.0.0", |
|
|
|
"socket.io-client": "1.7.1", |
|
|
|