From afe6247d5b39a6bcd9951b720492eb636bc6530a Mon Sep 17 00:00:00 2001 From: Ev Haus Date: Sun, 30 Aug 2020 15:21:18 -0700 Subject: [PATCH] Flow upgrade --- flow-typed/npm/@hapi/joi_vx.x.x.js | 4 ++-- flow-typed/npm/archiver_vx.x.x.js | 4 ++-- flow-typed/npm/chalk_vx.x.x.js | 4 ++-- flow-typed/npm/commander_vx.x.x.js | 4 ++-- flow-typed/npm/cosmiconfig_vx.x.x.js | 4 ++-- flow-typed/npm/inquirer_vx.x.x.js | 4 ++-- flow-typed/npm/node-ssh_vx.x.x.js | 4 ++-- flow-typed/npm/ora_vx.x.x.js | 4 ++-- package.json | 2 +- src/Rocketry.js | 6 +++--- src/utils/local.js | 14 +++++++------- src/utils/server.js | 16 ++++++++-------- yarn.lock | 8 ++++---- 13 files changed, 39 insertions(+), 39 deletions(-) diff --git a/flow-typed/npm/@hapi/joi_vx.x.x.js b/flow-typed/npm/@hapi/joi_vx.x.x.js index 426783b..db16874 100644 --- a/flow-typed/npm/@hapi/joi_vx.x.x.js +++ b/flow-typed/npm/@hapi/joi_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: b0e65174e128b975e4f6d1197cd20f8d -// flow-typed version: <>/@hapi/joi_v^17.0.0/flow_v0.130.0 +// flow-typed signature: 31011043d9826bde4334f2ce10dcea89 +// flow-typed version: <>/@hapi/joi_v^17.0.0/flow_v0.132.0 /** * This is an autogenerated libdef stub for: diff --git a/flow-typed/npm/archiver_vx.x.x.js b/flow-typed/npm/archiver_vx.x.x.js index 1521450..a653a46 100644 --- a/flow-typed/npm/archiver_vx.x.x.js +++ b/flow-typed/npm/archiver_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 689c3cc94eed636038489e266abe85d1 -// flow-typed version: <>/archiver_v^5.0.0/flow_v0.130.0 +// flow-typed signature: 159077a0b7503cb08601927ee96adc72 +// flow-typed version: <>/archiver_v^5.0.0/flow_v0.132.0 /** * This is an autogenerated libdef stub for: diff --git a/flow-typed/npm/chalk_vx.x.x.js b/flow-typed/npm/chalk_vx.x.x.js index d4b545e..778957d 100644 --- a/flow-typed/npm/chalk_vx.x.x.js +++ b/flow-typed/npm/chalk_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: e8cf030257a06a98b1ced95e3ed463ba -// flow-typed version: <>/chalk_v^4.0.0/flow_v0.130.0 +// flow-typed signature: c5c2e1623a90b35a3f567e71d3c87082 +// flow-typed version: <>/chalk_v^4.0.0/flow_v0.132.0 /** * This is an autogenerated libdef stub for: diff --git a/flow-typed/npm/commander_vx.x.x.js b/flow-typed/npm/commander_vx.x.x.js index 8193626..e623eb1 100644 --- a/flow-typed/npm/commander_vx.x.x.js +++ b/flow-typed/npm/commander_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 2bf1a668228893b4c79161429a66eca8 -// flow-typed version: <>/commander_v^6.0.0/flow_v0.130.0 +// flow-typed signature: f0dd36b57e5cbaa74a6a0634d089ec30 +// flow-typed version: <>/commander_v^6.0.0/flow_v0.132.0 /** * This is an autogenerated libdef stub for: diff --git a/flow-typed/npm/cosmiconfig_vx.x.x.js b/flow-typed/npm/cosmiconfig_vx.x.x.js index c101be0..09214e7 100644 --- a/flow-typed/npm/cosmiconfig_vx.x.x.js +++ b/flow-typed/npm/cosmiconfig_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 9171b84088d01c55b2e95b3168ec9168 -// flow-typed version: <>/cosmiconfig_v^7.0.0/flow_v0.130.0 +// flow-typed signature: 310223694dedf0118e831eb47dde4d32 +// flow-typed version: <>/cosmiconfig_v^7.0.0/flow_v0.132.0 /** * This is an autogenerated libdef stub for: diff --git a/flow-typed/npm/inquirer_vx.x.x.js b/flow-typed/npm/inquirer_vx.x.x.js index b26d5a3..b0b673b 100644 --- a/flow-typed/npm/inquirer_vx.x.x.js +++ b/flow-typed/npm/inquirer_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 7541d087e016a0a0eb0586e8ff821a56 -// flow-typed version: <>/inquirer_v^7.0.0/flow_v0.130.0 +// flow-typed signature: e5666e3a36291f82ae092561423bf6f9 +// flow-typed version: <>/inquirer_v^7.0.0/flow_v0.132.0 /** * This is an autogenerated libdef stub for: diff --git a/flow-typed/npm/node-ssh_vx.x.x.js b/flow-typed/npm/node-ssh_vx.x.x.js index 2539b21..e96b268 100644 --- a/flow-typed/npm/node-ssh_vx.x.x.js +++ b/flow-typed/npm/node-ssh_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: ff33d10363736cd8204cd5a5206dcb43 -// flow-typed version: <>/node-ssh_v^11.0.0/flow_v0.130.0 +// flow-typed signature: f3ef4faad50b3d9fbe928eb57b8c518c +// flow-typed version: <>/node-ssh_v^11.0.0/flow_v0.132.0 /** * This is an autogenerated libdef stub for: diff --git a/flow-typed/npm/ora_vx.x.x.js b/flow-typed/npm/ora_vx.x.x.js index 3a4494e..e7f216a 100644 --- a/flow-typed/npm/ora_vx.x.x.js +++ b/flow-typed/npm/ora_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 5978dc9089c377aa5a8825797d140cd9 -// flow-typed version: <>/ora_v^4.0.2/flow_v0.130.0 +// flow-typed signature: a351172ad9dcd34e02095b8372a49c02 +// flow-typed version: <>/ora_v^5.0.0/flow_v0.132.0 /** * This is an autogenerated libdef stub for: diff --git a/package.json b/package.json index 1d517f6..4694af9 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@babel/preset-env": "^7.9.0", "@babel/preset-flow": "^7.9.0", "eslint-config-globex": "^3.1.1", - "flow-bin": "^0.131.0", + "flow-bin": "^0.132.0", "flow-typed": "^3.0.0", "jest": "^26.0.1", "prettier-package-json": "^2.1.0" diff --git a/src/Rocketry.js b/src/Rocketry.js index 9ce33e0..6e62d8a 100644 --- a/src/Rocketry.js +++ b/src/Rocketry.js @@ -18,7 +18,7 @@ import { uploadZipToServer, } from './utils/server'; import chalk from 'chalk'; -import {type Command} from 'commander'; +import {Command} from 'commander'; import inquirer from 'inquirer'; import NodeSSH from 'node-ssh'; import ora from 'ora'; @@ -39,11 +39,11 @@ class Rocketry { config: ConfigType; - program: Command; + program: typeof Command; server: ServerType; - constructor (config: ConfigType, program: Command) { + constructor (config: ConfigType, program: typeof Command) { this.config = config; this.program = program; } diff --git a/src/utils/local.js b/src/utils/local.js index cee2913..2732d3b 100644 --- a/src/utils/local.js +++ b/src/utils/local.js @@ -2,7 +2,7 @@ import archiver from 'archiver'; import chalk from 'chalk'; -import {type Command} from 'commander'; +import {Command} from 'commander'; import {type ConfigType} from '../types/config'; import fs from 'fs'; import glob from 'glob'; @@ -11,14 +11,14 @@ import path from 'path'; import {promisify} from 'util'; export const cwd = function ( - program: Command + program: typeof Command ): string { return program.dir ? path.resolve(process.cwd(), program.dir) : process.cwd(); }; // Delete the deploy file export const deleteZipFile = function ( - program: Command + program: typeof Command ): Promise { const deleteFile = promisify(fs.unlink); const outputPath = getZipFilePath(program); @@ -28,7 +28,7 @@ export const deleteZipFile = function ( // Determines the application's name export const getAppName = function ( config: ConfigType, - program: Command + program: typeof Command ): string { // If the config has a name - use that if (config.name) return config.name; @@ -41,7 +41,7 @@ export const getAppName = function ( // Gets the path to the deployment zip file export const getZipFilePath = function ( - program: Command + program: typeof Command ): string { return path.join(cwd(program), 'rocketry.zip'); }; @@ -50,7 +50,7 @@ export const getZipFilePath = function ( export const getSources = async function ( config: ConfigType, debug: (msg: string) => any, - program: Command + program: typeof Command ): Promise> { const spinner = ora('Compiling a list of source files...'); if (!program.debug) spinner.start(); @@ -118,7 +118,7 @@ export const validatePrivateKeyPath = function ( // Creates a ZIP of the current directory export const zipUpCurrentDirectory = function ( sources: Array, - program: Command + program: typeof Command ): Promise { const dir = cwd(program); diff --git a/src/utils/server.js b/src/utils/server.js index 2fc208a..e9f8aea 100644 --- a/src/utils/server.js +++ b/src/utils/server.js @@ -6,7 +6,7 @@ import { type ServerType, } from '../types/config'; import chalk from 'chalk'; -import {type Command} from 'commander'; +import {Command} from 'commander'; import {getAppName} from './local'; import ora from 'ora'; import path from 'path'; @@ -38,7 +38,7 @@ export const ensureTargetDirectoryExists = async function ( // Installs apt package updates export const installAptUpdates = async function ( - program: Command, + program: typeof Command, debug: (msg: string) => any, server: ServerType ) { @@ -71,7 +71,7 @@ export const installAptUpdates = async function ( // Installs node on the target server export const installNode = async function ( - program: Command, + program: typeof Command, debug: (msg: string) => any, server: ServerType ) { @@ -123,7 +123,7 @@ export const installNode = async function ( export const installNpmDependencies = async function ( config: ConfigType, debug: (msg: string) => any, - program: Command, + program: typeof Command, server: ServerType ): Promise { const spinner = ora('Installing npm dependencies...'); @@ -148,7 +148,7 @@ export const installNpmDependencies = async function ( // Installs pm2 on the target server export const installPm2 = async function ( - program: Command, + program: typeof Command, debug: (msg: string) => any, server: ServerType ) { @@ -183,7 +183,7 @@ export const installPm2 = async function ( // Installs yarn on the target server export const installYarn = async function ( - program: Command, + program: typeof Command, debug: (msg: string) => any, server: ServerType ) { @@ -213,7 +213,7 @@ export const installYarn = async function ( // Restart services export const restartServices = async function ( - program: Command, + program: typeof Command, config: ConfigType, debug: (msg: string) => any, server: ServerType @@ -355,7 +355,7 @@ export const uploadZipToServer = async function ({ config: ConfigType, debug: (msg: string) => any, localZipPath: string, - program: Command, + program: typeof Command, server: ServerType, }) { const spinner = ora(`Uploading ${chalk.yellow(localZipPath)} to server...`); diff --git a/yarn.lock b/yarn.lock index 53e5f72..aff6ed2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3108,10 +3108,10 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== -flow-bin@^0.131.0: - version "0.131.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.131.0.tgz#d4228b6070afdf3b2a76acdee77a7f3f8e8f5133" - integrity sha512-fZmoIBcDrtLhy/NNMxwJysSYzMr1ksRcAOMi3AHSoYXfcuQqTvhGJx+wqjlIOqIwz8RRYm8J4V4JrSJbIKP+Xg== +flow-bin@^0.132.0: + version "0.132.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.132.0.tgz#8bf80a79630db24bd1422dc2cc4b5e97f97ccb98" + integrity sha512-S1g/vnAyNaLUdajmuUHCMl30qqye12gS6mr4LVyswf1k+JDF4efs6SfKmptuvnpitF3LGCVf0TIffChP8ljwnw== flow-typed@^3.0.0: version "3.2.1"