flights-search-cli
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -20,9 +20,5 @@ #!/usr/bin/env node | ||
_commander["default"].command('search').description('Search flights').option('-s, --start-airport <iata_code>', 'Starting Airport').option('-e, --end-airport <iata_code>', 'Ending Airport').option('-l, --leaving-between <window>', 'Date(s) or Datetime(s) of departure').option('-r, --returning-between <window>', 'Date(s) or Datetime(s) of return').option('-$, --max-price <usd_amount>', 'Max ticket price (in USD)').option('-d, --direct-flight', 'Only select direct flights').option('-1, --one-way', 'Do not consider return flight').action( | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee(command) { | ||
var options, _ref2, origin, destination, departureDateTimeRange, returnDateTimeRange, maximumPrice, onlyDirectFlights, onlyOneWay; | ||
_commander["default"].command('search').description('Search flights').option('-s, --start-airport <iata_code>', 'Starting Airport').option('-e, --end-airport <iata_code>', 'Ending Airport').option('-l, --leaving-between <window>', 'Date(s) or Datetime(s) of departure').option('-r, --returning-between <window>', 'Date(s) or Datetime(s) of return').option('-$, --max-price <usd_amount>', 'Max ticket price (in USD)').option('-d, --direct-flight', 'Only select direct flights').option('-1, --one-way', 'Do not consider return flight').action( /*#__PURE__*/function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(command) { | ||
var options, _yield$identifyOption, origin, destination, departureDateTimeRange, returnDateTimeRange, maximumPrice, onlyDirectFlights, onlyOneWay; | ||
@@ -47,10 +43,10 @@ return _regenerator["default"].wrap(function _callee$(_context) { | ||
case 4: | ||
_ref2 = _context.sent; | ||
origin = _ref2.origin; | ||
destination = _ref2.destination; | ||
departureDateTimeRange = _ref2.departureDateTimeRange; | ||
returnDateTimeRange = _ref2.returnDateTimeRange; | ||
maximumPrice = _ref2.maximumPrice; | ||
onlyDirectFlights = _ref2.onlyDirectFlights; | ||
onlyOneWay = _ref2.onlyOneWay; | ||
_yield$identifyOption = _context.sent; | ||
origin = _yield$identifyOption.origin; | ||
destination = _yield$identifyOption.destination; | ||
departureDateTimeRange = _yield$identifyOption.departureDateTimeRange; | ||
returnDateTimeRange = _yield$identifyOption.returnDateTimeRange; | ||
maximumPrice = _yield$identifyOption.maximumPrice; | ||
onlyDirectFlights = _yield$identifyOption.onlyDirectFlights; | ||
onlyOneWay = _yield$identifyOption.onlyOneWay; | ||
_context.next = 14; | ||
@@ -57,0 +53,0 @@ return (0, _searchFlights["default"])({ |
@@ -21,5 +21,3 @@ "use strict"; | ||
function _firstMatchingAirport() { | ||
_firstMatchingAirport = (0, _asyncToGenerator2["default"])( | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee(searchTerm) { | ||
_firstMatchingAirport = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(searchTerm) { | ||
var searchResults; | ||
@@ -26,0 +24,0 @@ return _regenerator["default"].wrap(function _callee$(_context) { |
@@ -29,5 +29,3 @@ "use strict"; | ||
function _asyncExecuteSafely() { | ||
_asyncExecuteSafely = (0, _asyncToGenerator2["default"])( | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee(func) { | ||
_asyncExecuteSafely = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(func) { | ||
return _regenerator["default"].wrap(function _callee$(_context) { | ||
@@ -72,6 +70,4 @@ while (1) { | ||
function _identifyOptions() { | ||
_identifyOptions = (0, _asyncToGenerator2["default"])( | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee2(_ref) { | ||
var startAirportOption, endAirportOption, departureWindowOption, returnWindowOption, maxPriceOption, onlyDirectFlightsOption, onlyOneWayOption, _ref2, _ref3, origin, destination, departureDateTimeRange, returnDateTimeRange, maximumPrice, onlyDirectFlights, onlyOneWay; | ||
_identifyOptions = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(_ref) { | ||
var startAirportOption, endAirportOption, departureWindowOption, returnWindowOption, maxPriceOption, onlyDirectFlightsOption, onlyOneWayOption, _yield$Promise$all, _yield$Promise$all2, origin, destination, departureDateTimeRange, returnDateTimeRange, maximumPrice, onlyDirectFlights, onlyOneWay; | ||
@@ -91,6 +87,6 @@ return _regenerator["default"].wrap(function _callee2$(_context2) { | ||
case 3: | ||
_ref2 = _context2.sent; | ||
_ref3 = (0, _slicedToArray2["default"])(_ref2, 2); | ||
origin = _ref3[0]; | ||
destination = _ref3[1]; | ||
_yield$Promise$all = _context2.sent; | ||
_yield$Promise$all2 = (0, _slicedToArray2["default"])(_yield$Promise$all, 2); | ||
origin = _yield$Promise$all2[0]; | ||
destination = _yield$Promise$all2[1]; | ||
departureDateTimeRange = executeSafely(function () { | ||
@@ -97,0 +93,0 @@ return (0, _formatDepartureWindow["default"])((0, _parseDepartureWindow["default"])(departureWindowOption)); |
@@ -28,5 +28,3 @@ "use strict"; | ||
var LocationSelector = | ||
/*#__PURE__*/ | ||
function () { | ||
var LocationSelector = /*#__PURE__*/function () { | ||
function LocationSelector() { | ||
@@ -40,5 +38,3 @@ (0, _classCallCheck2["default"])(this, LocationSelector); | ||
value: function () { | ||
var _select = (0, _asyncToGenerator2["default"])( | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee(message) { | ||
var _select = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(message) { | ||
var _this = this; | ||
@@ -88,5 +84,3 @@ | ||
value: function () { | ||
var _findMatches = (0, _asyncToGenerator2["default"])( | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee2() { | ||
var _findMatches = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { | ||
var _this2 = this; | ||
@@ -93,0 +87,0 @@ |
@@ -22,9 +22,5 @@ "use strict"; | ||
var selectDate = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee(_ref2) { | ||
var message, _ref2$initial, initial, _ref3, date, parsedDate; | ||
var selectDate = /*#__PURE__*/function () { | ||
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(_ref) { | ||
var message, _ref$initial, initial, _yield$inquirer$promp, date, parsedDate; | ||
@@ -35,3 +31,3 @@ return _regenerator["default"].wrap(function _callee$(_context) { | ||
case 0: | ||
message = _ref2.message, _ref2$initial = _ref2.initial, initial = _ref2$initial === void 0 ? (0, _momentTimezone["default"])() : _ref2$initial; | ||
message = _ref.message, _ref$initial = _ref.initial, initial = _ref$initial === void 0 ? (0, _momentTimezone["default"])() : _ref$initial; | ||
_context.next = 3; | ||
@@ -47,4 +43,4 @@ return _inquirer["default"].prompt([{ | ||
case 3: | ||
_ref3 = _context.sent; | ||
date = _ref3.date; | ||
_yield$inquirer$promp = _context.sent; | ||
date = _yield$inquirer$promp.date; | ||
parsedDate = (0, _momentTimezone["default"])(date); | ||
@@ -66,3 +62,3 @@ return _context.abrupt("return", { | ||
return function selectDate(_x) { | ||
return _ref.apply(this, arguments); | ||
return _ref2.apply(this, arguments); | ||
}; | ||
@@ -69,0 +65,0 @@ }(); |
@@ -20,8 +20,4 @@ "use strict"; | ||
var selectDepartureWindow = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee() { | ||
var selectDepartureWindow = /*#__PURE__*/function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() { | ||
var departureStartDate, departureEndDate, departureStartTimeOfDay, departureEndTimeOfDay; | ||
@@ -28,0 +24,0 @@ return _regenerator["default"].wrap(function _callee$(_context) { |
@@ -16,9 +16,5 @@ "use strict"; | ||
var selectDirectFlightsOnly = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee() { | ||
var _ref2, directFlightsOnly; | ||
var selectDirectFlightsOnly = /*#__PURE__*/function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() { | ||
var _yield$inquirer$promp, directFlightsOnly; | ||
@@ -38,4 +34,4 @@ return _regenerator["default"].wrap(function _callee$(_context) { | ||
case 2: | ||
_ref2 = _context.sent; | ||
directFlightsOnly = _ref2.directFlightsOnly; | ||
_yield$inquirer$promp = _context.sent; | ||
directFlightsOnly = _yield$inquirer$promp.directFlightsOnly; | ||
return _context.abrupt("return", directFlightsOnly); | ||
@@ -42,0 +38,0 @@ |
@@ -16,9 +16,5 @@ "use strict"; | ||
var selectIsRoundTrip = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee() { | ||
var _ref2, isRoundTrip; | ||
var selectIsRoundTrip = /*#__PURE__*/function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() { | ||
var _yield$inquirer$promp, isRoundTrip; | ||
@@ -38,4 +34,4 @@ return _regenerator["default"].wrap(function _callee$(_context) { | ||
case 2: | ||
_ref2 = _context.sent; | ||
isRoundTrip = _ref2.isRoundTrip; | ||
_yield$inquirer$promp = _context.sent; | ||
isRoundTrip = _yield$inquirer$promp.isRoundTrip; | ||
return _context.abrupt("return", isRoundTrip); | ||
@@ -42,0 +38,0 @@ |
@@ -24,9 +24,5 @@ "use strict"; | ||
var selectMaximumPrice = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee() { | ||
var _ref2, maximumPrice; | ||
var selectMaximumPrice = /*#__PURE__*/function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() { | ||
var _yield$inquirer$promp, maximumPrice; | ||
@@ -48,4 +44,4 @@ return _regenerator["default"].wrap(function _callee$(_context) { | ||
case 2: | ||
_ref2 = _context.sent; | ||
maximumPrice = _ref2.maximumPrice; | ||
_yield$inquirer$promp = _context.sent; | ||
maximumPrice = _yield$inquirer$promp.maximumPrice; | ||
return _context.abrupt("return", maximumPrice); | ||
@@ -52,0 +48,0 @@ |
@@ -22,9 +22,5 @@ "use strict"; | ||
var selectTimeOfDay = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee(_ref2) { | ||
var message, _ref2$initial, initial, _ref3, timeOfDay, parsedTimeOfDay; | ||
var selectTimeOfDay = /*#__PURE__*/function () { | ||
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(_ref) { | ||
var message, _ref$initial, initial, _yield$inquirer$promp, timeOfDay, parsedTimeOfDay; | ||
@@ -35,3 +31,3 @@ return _regenerator["default"].wrap(function _callee$(_context) { | ||
case 0: | ||
message = _ref2.message, _ref2$initial = _ref2.initial, initial = _ref2$initial === void 0 ? (0, _momentTimezone["default"])().startOf('day') : _ref2$initial; | ||
message = _ref.message, _ref$initial = _ref.initial, initial = _ref$initial === void 0 ? (0, _momentTimezone["default"])().startOf('day') : _ref$initial; | ||
_context.next = 3; | ||
@@ -47,4 +43,4 @@ return _inquirer["default"].prompt([{ | ||
case 3: | ||
_ref3 = _context.sent; | ||
timeOfDay = _ref3.timeOfDay; | ||
_yield$inquirer$promp = _context.sent; | ||
timeOfDay = _yield$inquirer$promp.timeOfDay; | ||
parsedTimeOfDay = (0, _momentTimezone["default"])(timeOfDay); | ||
@@ -65,3 +61,3 @@ return _context.abrupt("return", { | ||
return function selectTimeOfDay(_x) { | ||
return _ref.apply(this, arguments); | ||
return _ref2.apply(this, arguments); | ||
}; | ||
@@ -68,0 +64,0 @@ }(); |
@@ -34,9 +34,5 @@ "use strict"; | ||
var searchFlights = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( | ||
/*#__PURE__*/ | ||
_regenerator["default"].mark(function _callee(_ref2) { | ||
var originOption, destinationOption, departureDateTimeRangeOption, returnDateTimeRangeOption, maximumPriceOption, onlyDirectFlightsOption, onlyOneWayOption, locationSelector, origin, destination, isRoundTrip, maximumPrice, onlyDirectFlights, departureDateTimeRange, returnDepartureDateTimeRange, returnDepartureWindow, parameters, searchResults, tripMapping, formattedTrips, _ref3, trip; | ||
var searchFlights = /*#__PURE__*/function () { | ||
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(_ref) { | ||
var originOption, destinationOption, departureDateTimeRangeOption, returnDateTimeRangeOption, maximumPriceOption, onlyDirectFlightsOption, onlyOneWayOption, locationSelector, origin, destination, isRoundTrip, maximumPrice, onlyDirectFlights, departureDateTimeRange, returnDepartureDateTimeRange, returnDepartureWindow, parameters, searchResults, tripMapping, formattedTrips, _yield$inquirer$promp, trip; | ||
@@ -47,3 +43,3 @@ return _regenerator["default"].wrap(function _callee$(_context) { | ||
case 0: | ||
originOption = _ref2.originOption, destinationOption = _ref2.destinationOption, departureDateTimeRangeOption = _ref2.departureDateTimeRangeOption, returnDateTimeRangeOption = _ref2.returnDateTimeRangeOption, maximumPriceOption = _ref2.maximumPriceOption, onlyDirectFlightsOption = _ref2.onlyDirectFlightsOption, onlyOneWayOption = _ref2.onlyOneWayOption; | ||
originOption = _ref.originOption, destinationOption = _ref.destinationOption, departureDateTimeRangeOption = _ref.departureDateTimeRangeOption, returnDateTimeRangeOption = _ref.returnDateTimeRangeOption, maximumPriceOption = _ref.maximumPriceOption, onlyDirectFlightsOption = _ref.onlyDirectFlightsOption, onlyOneWayOption = _ref.onlyOneWayOption; | ||
locationSelector = new _locationSelector["default"](); | ||
@@ -215,4 +211,4 @@ _context.t0 = originOption; | ||
case 63: | ||
_ref3 = _context.sent; | ||
trip = _ref3.trip; | ||
_yield$inquirer$promp = _context.sent; | ||
trip = _yield$inquirer$promp.trip; | ||
(0, _open["default"])(tripMapping[trip]); | ||
@@ -229,3 +225,3 @@ | ||
return function searchFlights(_x) { | ||
return _ref.apply(this, arguments); | ||
return _ref2.apply(this, arguments); | ||
}; | ||
@@ -232,0 +228,0 @@ }(); |
{ | ||
"name": "flights-search-cli", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Search Flights From Your Terminal", | ||
@@ -35,5 +35,5 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@babel/cli": "^7.8.4", | ||
"@babel/core": "^7.8.4", | ||
"@babel/preset-env": "^7.8.4", | ||
"@babel/cli": "^7.10.1", | ||
"@babel/core": "^7.10.2", | ||
"@babel/preset-env": "^7.10.2", | ||
"@commitlint/cli": "^8.3.5", | ||
@@ -44,16 +44,16 @@ "@commitlint/config-angular": "^8.3.4", | ||
"@commitlint/travis-cli": "^8.3.5", | ||
"codecov": "^3.6.5", | ||
"eslint": "^6.8.0", | ||
"eslint-config-airbnb-base": "^14.0.0", | ||
"eslint-plugin-import": "^2.20.1", | ||
"husky": "^4.2.3", | ||
"jest": "^25.1.0", | ||
"semantic-release": "^17.0.4", | ||
"codecov": "^3.7.0", | ||
"eslint": "^7.2.0", | ||
"eslint-config-airbnb-base": "^14.2.0", | ||
"eslint-plugin-import": "^2.21.2", | ||
"husky": "^4.2.5", | ||
"jest": "^26.0.1", | ||
"semantic-release": "^17.0.8", | ||
"travis-deploy-once": "^5.0.11" | ||
}, | ||
"dependencies": { | ||
"@babel/plugin-transform-runtime": "^7.9.6", | ||
"@babel/plugin-transform-runtime": "^7.10.1", | ||
"accounting": "^0.4.1", | ||
"chalk": "^3.0.0", | ||
"commander": "^4.1.1", | ||
"chalk": "^4.1.0", | ||
"commander": "^5.1.0", | ||
"country-code-emoji": "1.0.0", | ||
@@ -66,4 +66,4 @@ "fuzzy": "^0.1.3", | ||
"open": "7.0.4", | ||
"skypicker": "^1.0.4" | ||
"skypicker": "^1.0.6" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123294
4848
+ Addedcommander@5.1.0(transitive)
- Removedchalk@3.0.0(transitive)
- Removedcommander@4.1.1(transitive)
Updatedchalk@^4.1.0
Updatedcommander@^5.1.0
Updatedskypicker@^1.0.6