Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: download should not throw. update filesize import. #8

Merged
merged 2 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ jspm_packages
bin
lib
tmp
!bin/flyway
!bin/flyway.cmd

# IntelliJ IDEA
.idea
Expand Down
Empty file removed bin/flyway
Empty file.
Empty file removed bin/flyway.cmd
Empty file.
4 changes: 1 addition & 3 deletions dist/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ var _child_process = require("child_process");

var _filesize = require("filesize");

var _filesize2 = _interopRequireDefault(_filesize);

var _rimraf = require("rimraf");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
Expand Down Expand Up @@ -151,7 +149,7 @@ const downloadFlywaySource = exports.downloadFlywaySource = source => {
if (!error && response.statusCode === 200) {
_fsExtra2.default.writeFileSync(source.filename, body);

console.log(`\nReceived ${(0, _filesize2.default)(body.length)} total.`);
console.log(`\nReceived ${(0, _filesize.filesize)(body.length)} total.`);

resolve(source.filename);
} else if (response) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aldenquimby/flywaydb-cli",
"version": "0.11.0",
"version": "0.11.1",
"description": "Install latest flywaydb-cli as a node module",
"main": "dist/installer.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import requestProgress from "request-progress";
import ProgressBar from "progress";
import extractZip from "extract-zip";
import { spawn } from "child_process";
import filesize from "filesize";
import { filesize } from "filesize";
import { rimrafSync } from "rimraf";
const env = process.env;

Expand Down