Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

Commit

Permalink
Flow upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
EvHaus committed Aug 30, 2020
1 parent 3419d8b commit afe6247
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 39 deletions.
4 changes: 2 additions & 2 deletions flow-typed/npm/@hapi/joi_vx.x.x.js
@@ -1,5 +1,5 @@
// flow-typed signature: b0e65174e128b975e4f6d1197cd20f8d
// flow-typed version: <<STUB>>/@hapi/joi_v^17.0.0/flow_v0.130.0
// flow-typed signature: 31011043d9826bde4334f2ce10dcea89
// flow-typed version: <<STUB>>/@hapi/joi_v^17.0.0/flow_v0.132.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/archiver_vx.x.x.js
@@ -1,5 +1,5 @@
// flow-typed signature: 689c3cc94eed636038489e266abe85d1
// flow-typed version: <<STUB>>/archiver_v^5.0.0/flow_v0.130.0
// flow-typed signature: 159077a0b7503cb08601927ee96adc72
// flow-typed version: <<STUB>>/archiver_v^5.0.0/flow_v0.132.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/chalk_vx.x.x.js
@@ -1,5 +1,5 @@
// flow-typed signature: e8cf030257a06a98b1ced95e3ed463ba
// flow-typed version: <<STUB>>/chalk_v^4.0.0/flow_v0.130.0
// flow-typed signature: c5c2e1623a90b35a3f567e71d3c87082
// flow-typed version: <<STUB>>/chalk_v^4.0.0/flow_v0.132.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/commander_vx.x.x.js
@@ -1,5 +1,5 @@
// flow-typed signature: 2bf1a668228893b4c79161429a66eca8
// flow-typed version: <<STUB>>/commander_v^6.0.0/flow_v0.130.0
// flow-typed signature: f0dd36b57e5cbaa74a6a0634d089ec30
// flow-typed version: <<STUB>>/commander_v^6.0.0/flow_v0.132.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/cosmiconfig_vx.x.x.js
@@ -1,5 +1,5 @@
// flow-typed signature: 9171b84088d01c55b2e95b3168ec9168
// flow-typed version: <<STUB>>/cosmiconfig_v^7.0.0/flow_v0.130.0
// flow-typed signature: 310223694dedf0118e831eb47dde4d32
// flow-typed version: <<STUB>>/cosmiconfig_v^7.0.0/flow_v0.132.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/inquirer_vx.x.x.js
@@ -1,5 +1,5 @@
// flow-typed signature: 7541d087e016a0a0eb0586e8ff821a56
// flow-typed version: <<STUB>>/inquirer_v^7.0.0/flow_v0.130.0
// flow-typed signature: e5666e3a36291f82ae092561423bf6f9
// flow-typed version: <<STUB>>/inquirer_v^7.0.0/flow_v0.132.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/node-ssh_vx.x.x.js
@@ -1,5 +1,5 @@
// flow-typed signature: ff33d10363736cd8204cd5a5206dcb43
// flow-typed version: <<STUB>>/node-ssh_v^11.0.0/flow_v0.130.0
// flow-typed signature: f3ef4faad50b3d9fbe928eb57b8c518c
// flow-typed version: <<STUB>>/node-ssh_v^11.0.0/flow_v0.132.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/ora_vx.x.x.js
@@ -1,5 +1,5 @@
// flow-typed signature: 5978dc9089c377aa5a8825797d140cd9
// flow-typed version: <<STUB>>/ora_v^4.0.2/flow_v0.130.0
// flow-typed signature: a351172ad9dcd34e02095b8372a49c02
// flow-typed version: <<STUB>>/ora_v^5.0.0/flow_v0.132.0

/**
* This is an autogenerated libdef stub for:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/Rocketry.js
Expand Up @@ -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';
Expand All @@ -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;
}
Expand Down
14 changes: 7 additions & 7 deletions src/utils/local.js
Expand Up @@ -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';
Expand All @@ -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<void> {
const deleteFile = promisify(fs.unlink);
const outputPath = getZipFilePath(program);
Expand All @@ -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;
Expand All @@ -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');
};
Expand All @@ -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<Array<string>> {
const spinner = ora('Compiling a list of source files...');
if (!program.debug) spinner.start();
Expand Down Expand Up @@ -118,7 +118,7 @@ export const validatePrivateKeyPath = function (
// Creates a ZIP of the current directory
export const zipUpCurrentDirectory = function (
sources: Array<string>,
program: Command
program: typeof Command
): Promise<string> {
const dir = cwd(program);

Expand Down
16 changes: 8 additions & 8 deletions src/utils/server.js
Expand Up @@ -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';
Expand Down Expand Up @@ -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
) {
Expand Down Expand Up @@ -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
) {
Expand Down Expand Up @@ -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<boolean> {
const spinner = ora('Installing npm dependencies...');
Expand All @@ -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
) {
Expand Down Expand Up @@ -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
) {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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...`);
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -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"
Expand Down

0 comments on commit afe6247

Please sign in to comment.