Browse Source

Fix calls to `undefined.price` while aliasing

master
Matheus Fernandes 8 years ago
parent
commit
5f48a289d5
No known key found for this signature in database GPG Key ID: DD07CA4EA7B65C4F
  1. 6
      bin/now-alias.js
  2. 4
      bin/now-deploy.js
  3. 14
      lib/re-alias.js
  4. 4528
      yarn.lock

6
bin/now-alias.js

@ -307,7 +307,7 @@ async function run({ token, config: { currentTeam, user } }) {
}
default: {
if (argv._.length === 0) {
await reAlias(token, null, null, help, exit, apiUrl, debug, alias)
await reAlias(token, null, null, help, exit, apiUrl, debug, alias, currentTeam, user)
break
}
@ -320,7 +320,9 @@ async function run({ token, config: { currentTeam, user } }) {
exit,
apiUrl,
debug,
alias
alias,
currentTeam,
user
)
break
}

4
bin/now-deploy.js

@ -720,13 +720,13 @@ function printLogs(host, token, currentTeam) {
for (const alias of aliasList) {
assignments.push(
assignAlias(alias, token, host, apiUrl, debug, currentTeam)
assignAlias(alias, token, host, apiUrl, debug, currentTeam, user)
)
}
await Promise.all(assignments)
} else {
await reAlias(token, host, null, help, exit, apiUrl, debug)
await reAlias(token, host, null, help, exit, apiUrl, debug, currentTeam, user)
}
}

14
lib/re-alias.js

@ -9,6 +9,7 @@ const chalk = require('chalk')
const { error } = require('./error')
const readMetaData = require('./read-metadata')
const NowAlias = require('./alias')
const NowDomains = require('./domains')
exports.assignAlias = async (
autoAlias,
@ -16,15 +17,17 @@ exports.assignAlias = async (
deployment,
apiUrl,
debug,
currentTeam
currentTeam,
user
) => {
const aliases = new NowAlias({ apiUrl, token, debug, currentTeam })
const domains = new NowDomains({apiUrl, token, debug, currentTeam})
console.log(
`> Assigning alias ${chalk.bold.underline(autoAlias)} to deployment...`
)
// Assign alias
await aliases.set(String(deployment), String(autoAlias))
await aliases.set(String(deployment), String(autoAlias), domains, currentTeam, user)
}
exports.reAlias = async (
@ -35,7 +38,9 @@ exports.reAlias = async (
exit,
apiUrl,
debug,
alias
alias,
currentTeam,
user
) => {
const path = process.cwd()
@ -112,7 +117,8 @@ exports.reAlias = async (
host,
apiUrl,
debug,
alias.currentTeam
currentTeam,
user
)
)
}

4528
yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save