You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

238 lines
5.7 KiB

Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
#!/usr/bin/env node
// Packages
const chalk = require('chalk')
const minimist = require('minimist')
const ms = require('ms')
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
// Ours
const login = require('../lib/login')
const cfg = require('../lib/cfg')
const NowPlans = require('../lib/plans')
const indent = require('../lib/indent')
const listInput = require('../lib/utils/input/list')
const code = require('../lib/utils/output/code')
const error = require('../lib/utils/output/error')
const success = require('../lib/utils/output/success')
const cmd = require('../lib/utils/output/cmd')
const logo = require('../lib/utils/output/logo')
const { bold } = chalk
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
const argv = minimist(process.argv.slice(2), {
string: ['config', 'token'],
boolean: ['help', 'debug'],
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
alias: {
help: 'h',
config: 'c',
debug: 'd',
token: 't'
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
}
})
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
const help = () => {
8 years ago
console.log(`
${chalk.bold(`${logo} now upgrade`)} [plan]
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
${chalk.dim('Options:')}
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
-h, --help Output usage information
-c ${chalk.bold.underline('FILE')}, --config=${chalk.bold.underline('FILE')} Config file
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
-d, --debug Debug mode [off]
-t ${chalk.bold.underline('TOKEN')}, --token=${chalk.bold.underline('TOKEN')} Login token
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
${chalk.dim('Examples:')}
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
${chalk.gray('–')} List available plans and pick one interactively
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
${chalk.cyan('$ now upgrade')}
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
${chalk.yellow('NOTE:')} ${chalk.gray('Make sure you have a payment method, or add one:')}
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
${chalk.cyan(`$ now billing add`)}
${chalk.gray('–')} Pick a specific plan (premium):
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
${chalk.cyan(`$ now upgrade premium`)}
8 years ago
`)
}
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
// Options
const debug = argv.debug
const apiUrl = argv.url || 'https://api.zeit.co'
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
if (argv.config) {
cfg.setConfigFile(argv.config)
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
}
const exit = code => {
// We give stdout some time to flush out
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
// because there's a node bug where
// stdout writes are asynchronous
// https://github.com/nodejs/node/issues/6456
setTimeout(() => process.exit(code || 0), 100)
}
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
if (argv.help) {
help()
exit(0)
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
} else {
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
Promise.resolve().then(async () => {
8 years ago
const config = await cfg.read({ token: argv.token })
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
let token
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
try {
token = config.token || (await login(apiUrl))
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
} catch (err) {
error(`Authentication error – ${err.message}`)
exit(1)
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
}
try {
await run({ token, config })
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
} catch (err) {
if (err.userError) {
error(err.message)
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
} else {
error(`Unknown error: ${err.stack}`)
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
}
exit(1)
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
}
})
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
}
function buildInquirerChoices(current, until) {
if (until) {
until = until.split(' ')
until = ' for ' + chalk.bold(until[0]) + ' more ' + until[1]
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
} else {
until = ''
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
}
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
const currentText = bold('(current)')
let ossName = `OSS ${bold('FREE')}`
let premiumName = `Premium ${bold('$15')}`
let proName = `Pro ${bold('$50')}`
let advancedName = `Advanced ${bold('$200')}`
switch (current) {
case 'oss': {
ossName += indent(currentText, 6)
break
}
case 'premium': {
premiumName += indent(currentText, 3)
break
}
case 'pro': {
proName += indent(currentText, 7)
break
}
case 'advanced': {
advancedName += indent(currentText, 1)
break
}
default: {
ossName += indent(currentText, 6)
}
}
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
return [
{
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
name: ossName,
value: 'oss',
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
short: `OSS ${bold('FREE')}`
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
},
{
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
name: premiumName,
value: 'premium',
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
short: `Premium ${bold('$15')}`
},
{
name: proName,
value: 'pro',
short: `Pro ${bold('$50')}`
},
{
name: advancedName,
value: 'advanced',
short: `Advanced ${bold('$200')}`
}
]
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
}
async function run({ token, config: { currentTeam, user } }) {
const args = argv._
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
if (args.length > 1) {
error('Invalid number of arguments')
return exit(1)
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
}
const start = new Date()
const plans = new NowPlans({ apiUrl, token, debug, currentTeam })
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
let planId = args[0]
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
if (![undefined, 'oss', 'premium', 'pro', 'advanced'].includes(planId)) {
error(`Invalid plan name – should be ${code('oss')} or ${code('premium')}`)
return exit(1)
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
}
const currentPlan = await plans.getCurrent()
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
if (planId === undefined) {
const elapsed = ms(new Date() - start)
let message = `For more info, please head to https://zeit.co`
message = currentTeam
? `${message}/${currentTeam.slug}/settings/plan`
: `${message}/account/plan`
message += `\n> Select a plan for ${bold((currentTeam && currentTeam.slug) || user.username || user.email)} ${chalk.gray(`[${elapsed}]`)}`
const choices = buildInquirerChoices(currentPlan.id, currentPlan.until)
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
planId = await listInput({
message,
choices,
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
separator: false,
abort: 'end'
})
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
}
if (
planId === undefined ||
(planId === currentPlan.id && currentPlan.until === undefined)
) {
return console.log('No changes made')
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
}
let newPlan
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
try {
newPlan = await plans.set(planId)
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
} catch (err) {
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
if (err.code === 'customer_not_found' || err.code === 'source_not_found') {
error(
`You have no payment methods available. Run ${cmd('now billing add')} to add one`
)
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
} else {
error(`An unknow error occured. Please try again later ${err.message}`)
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
}
plans.close()
return
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
}
Add `logs`, `teams`, `switch`, `scale`, new `ls` and much more (#468) * Feature/teams (#25) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * Feature/domains (#26) * Add the skeleton of `now teams` * Add support for "complex" command aliases This adds the ability to set, for example, `now switch` as an alias for `now teams switch`. Subsequent commands and arguments are taken into account: `now switch zeit --debug` will be parsed to `now teams switch zeit --debug`. * `now switch` => `now teams switch` * Extract `rightPad` * Extract `eraseLines` * Extract `✓` * Text input: add `valid` option * Text input: add `forceLowerCase` option * Add preliminary `now teams add` * Make the linter happy * Extract `> NOTE: ...` * Add missing labels * Fix typos * Add missing parameters * Change the section label after inviting all specified team mates * Call the API after each email submission * Show the elapsed time after each `inviteUser` api call * Handle user aborts * We don't need `args` for `now teams add` * Add missing `await` * Extract regex * `process.exit()` => `exit(1)` * `prompt-bool` is an `input` util, not an `output` one * Add the ability to delete a key from the config file * Add `fatal-error` * Add `now teams invite` * This shouldn't be black * Save the username in `~/.now.json` upon login * Save the token and userId instead of token and email * Fix typo * Save more info about the user to `~/.now.json` upon login * `~/.now.json`: Persist the current time when login in * Add `user` helper * `user.userId` => `user.id` * Tweak code organization * Add caching system to `.now.json` * Automatically switch to a team after its creation * Introduce the concept of `inactive` teams * Use bold for `payment method` * Remove duplicated code * Add line breaks * Auto complete with the first match * Remove placeholder stuff * Add the user's email to the list of suggestions * FIx bad merge * Add `now switch` * Make `now teams invite` more reliable and faster * Shut up XO * Improve autocompletion * Fix TypeError * Make stuff pretty * Not sure how this got overwritten * `prompt-bool` is an `input` util, not an `output` one * Make stuff pretty * Not sure how this got overwritten * Add domains.status, price and buy * Add `now domains buy` * Add the ability to buy a domain when running `now alias` * Logs (#27) * Added `logs` sub command * add missing dependencies * use utils/output/logo * logs: fix wrong reference * logs: fix buffer time * sort build logs (#19) * logs: use lib/logs * lib/logs: fix * logs: resolve url to id * logs: default to follow * logs: don't resolve URL to id * logs: revert to default unfollow * logs: add since option and until option * logs: fix default number of logs * fix logs auth * logs: listen ready event * logs: new endpoint * log: remove v query param * logs: default to not include access logs * fix styles of now-logs * logs: remove relative time * Fix bad merge conflict * Add `now scale` (#28) * Inital drafts fro `now-scale` * More final draft * sketch new `now ls` format * Add sketch for `now ls --all` * Placeholder for `now scale ls` * "Prettify" and improve scale command Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Adopt to now-list api changes * Improve now-list --all colors Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Add now scale ls Signed-off-by: Jarmo Isotalo <jamo@isotalo.fi> * Prettify * Show auto correctly * Add partial match scale for now alias * Make alias to match scale before uptading alias and presumably a bunch of unrelated style changes * Replace spinners with help text * Make the list :nice: * Make now-list great again * Final touches * Allow --all only when app is defined * Add progress tracking to scale * Correctly use --all for > 0 deployments found [1s] and improve scale info ux * Show --all info if we are hiding stuff * Fixes * Refactor scale info and unfreeze * Fixes * Proper progress bar * Fix bad merge * Fix auth for now-scale * logs: fix reading config * Fix reference * Small ux tweaks * Improve now alias ux * Fix a ton of lint errors * Fix scaling up and alias ux * Fix lint errors + prettify * Make `bin/now-scale.js` available via `now scale` * Fix errornous syntax for domains list * And use correct header for domains list * Update now-scale help to match new spec * `await` for `cfg.read()` on `cfg.remove()` * Update scale command * Cleanu p * Fetch the teams from the api on teams.ls() Plus prettier shit * Run prettier hooks manually * Make `now switch` perfect * Rm unused variables * Lint * Ruin ux but lint * Consume `POST /teams` * Consume `PATCH /teams/:id` * Fix/teams support (#29) * Add teams support for lib/index.js * Consume `POST /teams/:id/members` * Make `now teams create` and `now teams invite` perfect * Add a way to not send `?teamId` if necessary * Add `?teamId=${currentTeam.id}` support to all comamnds and subcommands * Display the username only if it's available * Consume the preoduction endpoits for domain purchase * Fix typo * Fix grammar * Fix grammar * Remove useless require * Display the user name/team slug on creation/list commands * Remove use of old, now undefined variable * Show domains in bold on `now domains ls` * `user.userId` => `user.uid` * Remove console.log * Show a better messsage upon unexpected `domains.buy()` error * typo * Consume new `/plan` API and fix plan check * Update `now upgrade` – consume new APIs and expose new plans * Fix `now ugprade` info message * `now cc`: consume new APIs and fix error messages * Add team/user context to `now alias` when buying a domain * Fix wording on `now domains buy` * Add stamp to domain purchase * Improve scale ux * Remove ToS prompt upon login * Fix `prompt-bool` trailing issues * Remove useless `require` * Allow `now switch <username>` * Make `now help` better * This shouldn't be here * Make `now switch` incredible * Remove old stuff from ~/.now.json * Add comments * `now team` => `now teams` * 5.0.0 * Fix linter * Fix DNS * Parse subdomain * FIx lint * drop IDs for certs * Make now ls look nice also when noTTY * Make now list look nice when colors are not supported * Mane certs ls look nice when we have no colers * Now ls --all can also take uniq url as a parameter * Improve now ls --all * Now ls -all takes alias as an argument
8 years ago
if (currentPlan.until && newPlan.id !== 'oss') {
success(
`The cancelation has been undone. You're back on the ${chalk.bold(`${newPlan.name} plan`)}`
)
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
} else if (newPlan.until) {
success(
`Your plan will be switched to ${chalk.bold(newPlan.name)} in ${chalk.bold(newPlan.until)}. Your card will not be charged again`
)
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
} else {
success(`You're now on the ${chalk.bold(`${newPlan.name} plan`)}`)
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
}
plans.close()
Add `now billing` and `now upgrade` (#309) * Add the skeleton of `now cc` * Add the `ls` command * Add `inquirer` dependency * Add the `set-default` command * Fix typo * Show the real number of cards when selecting the default one * Add the `ls` command * Fix: Do not throw if there's no cards in the account * Add `blessed` dependency * Add the first sketch of `now cc add` * Add instructions * Add labels * Save every element in the `elements` array instead of variables * Tweaks * Fix: update the element attribute if it's not a special case * Add the `name` input; Add moving between inputs; Make the state more reliable * Auto "detect" if the input is losing focus * Remove useless stuff * Add the ability to move between the fields with tab/shift+tab * Add CCV field * Make the cycling between the fields "infinite" * Add expiration date field and allow only numbers in the CCV field * The form shouldn't have a fixed height * Add the address box and label * Add the address fields * Remove blessed stuff * Add preliminary input field * output utils * add prompt for booleans * fix @matheuss linting problems * remove example * lint * error and info helpers * helper for embedded commands * Remove useless stuff * Add `trailing` option * Add `resolveChars` option * Add `validate` option * Add `strip-ansi` dependency * Add `credit-card` dependency * Add credit card masking * Add support for expiration date mask * Make things simpler * Add auto completion support * Always show the `card_` id prefix * Add `@google/maps` dependency * Always print the initial value if it's available * Add `stripe` dependency * Add `add()` method * Add billing related utils * Add `now cc add` * Rename `cc` to `billing` * Fix: log only one blank line * Refactor * Add list input component * This shouldn't be here * Add `code` output util * Add `now upgrade | downgrade` * add build step * make it more future-proof * more reliable build * remove lock for now * Hide the CCV * Print the new line before `Saving card` * Use the new `success` component * Add confirmation steps for `cc rm` and `cc set-default` * Temporarily monket patch Inquirer * Build before testing * Run the tests using the built files * Fix the `prepublish` script and run the `build` one before packaging * Improve `now help`
8 years ago
}