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 // @flow
// Packages
const aws = require('aws-sdk') const aws = require('aws-sdk')
const getAWS = authConfig => { const getAWS = (authConfig: Object) => {
const { credentials } = authConfig const { credentials } = authConfig
const awsCredentials: Object = credentials.find(c => c.provider === 'aws') const awsCredentials: Object = credentials.find(c => c.provider === 'aws')

6
src/providers/gcp/deploy.js

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

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

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

Loading…
Cancel
Save