Browse Source

Fixed Flow errors

master
Leo Lamprecht 7 years ago
parent
commit
35e7b994ef
  1. 3
      src/providers/aws/get-aws.js
  2. 6
      src/providers/gcp/deploy.js
  3. 8
      src/util/copy-to-clipboard.js

3
src/providers/aws/get-aws.js

@ -1,8 +1,9 @@
// @flow
// Packages
const aws = require('aws-sdk')
const getAWS = authConfig => {
const getAWS = (authConfig: Object) => {
const { credentials } = authConfig
const awsCredentials: Object = credentials.find(c => c.provider === 'aws')

6
src/providers/gcp/deploy.js

@ -1,6 +1,6 @@
// @flow
// theirs
// Packages
const ms = require('ms')
const fetch = require('node-fetch')
const minimist = require('minimist')
@ -10,7 +10,7 @@ const bytes = require('bytes')
const sleep = require('then-sleep')
const debug = require('debug')('now:gcp:deploy')
// ours
// Utilities
const ok = require('../../util/output/ok')
const info = require('../../util/output/info')
const wait = require('../../util/output/wait')
@ -228,7 +228,7 @@ const deploy = async (ctx: {
let retriesLeft = 10
let status
let url
let url = ''
do {
if (!--retriesLeft) {

8
src/util/copy-to-clipboard.js

@ -1,12 +1,14 @@
// @flow
// Packages
const { write } = require('clipboardy')
const copyToClipboard = async (
str: string,
shouldCopy = 'auto',
isTTY = process.stdout.isTTY
): boolean => {
shouldCopy: boolean | string = 'auto',
// $FlowFixMe
isTTY: boolean = process.stdout.isTTY
): Promise<boolean> => {
if (shouldCopy === false) {
return false
}

Loading…
Cancel
Save