Comparing version 2.5.2 to 3.0.0-rc1
@@ -231,3 +231,3 @@ 'use strict'; | ||
_commander2.default.command('url <service>').option('-e, --navy [env]', 'set the navy name to be used [' + defaultNavy + ']', defaultNavy).description('Prints the external URL for the given service if it is a web service').action(basicCliWrapper('url', { driverLogging: false })).on('--help', function () { | ||
return console.log('\n Examples:\n $ navy url mywebserver\n http://mywebserver.dev.0.xip.io\n '); | ||
return console.log('\n Examples:\n $ navy url mywebserver\n http://mywebserver.dev.127.0.0.1.nip.io\n '); | ||
}); | ||
@@ -265,7 +265,3 @@ | ||
_commander2.default.command('host <service>').option('-e, --navy [env]', 'set the navy name to be used [' + defaultNavy + ']', defaultNavy).description('Prints the external host for the given service. DEPRECATED - use `navy external-ip` instead').action(basicCliWrapper('host', { driverLogging: false })); | ||
_commander2.default.command('set-default <navy>').description('Set the default navy. DEPRECATED - use `navy config set default-navy <navy>` instead').action(lazyRequire('./set-default')); | ||
exports.default = _commander2.default; | ||
module.exports = exports['default']; |
@@ -31,3 +31,3 @@ 'use strict'; | ||
var _xipio = require('../util/xipio'); | ||
var _nipio = require('../util/nipio'); | ||
@@ -94,3 +94,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
_context.next = 8; | ||
return (0, _xipio.getHostForService)(serviceName, navy.normalisedName, externalIP); | ||
return (0, _nipio.getHostForService)(serviceName, navy.normalisedName, externalIP); | ||
@@ -97,0 +97,0 @@ case 8: |
@@ -57,15 +57,15 @@ 'use strict'; | ||
var getLaunchedNavies = exports.getLaunchedNavies = function () { | ||
var _ref35 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee35() { | ||
var _ref34 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee34() { | ||
var navyNames; | ||
return _regenerator2.default.wrap(function _callee35$(_context35) { | ||
return _regenerator2.default.wrap(function _callee34$(_context34) { | ||
while (1) { | ||
switch (_context35.prev = _context35.next) { | ||
switch (_context34.prev = _context34.next) { | ||
case 0: | ||
_context35.prev = 0; | ||
_context35.next = 3; | ||
_context34.prev = 0; | ||
_context34.next = 3; | ||
return fs.readdirAsync((0, _state.pathToNavys)()); | ||
case 3: | ||
navyNames = _context35.sent; | ||
return _context35.abrupt('return', navyNames.map(function (name) { | ||
navyNames = _context34.sent; | ||
return _context34.abrupt('return', navyNames.map(function (name) { | ||
return getNavy(name); | ||
@@ -75,16 +75,16 @@ })); | ||
case 7: | ||
_context35.prev = 7; | ||
_context35.t0 = _context35['catch'](0); | ||
return _context35.abrupt('return', []); | ||
_context34.prev = 7; | ||
_context34.t0 = _context34['catch'](0); | ||
return _context34.abrupt('return', []); | ||
case 10: | ||
case 'end': | ||
return _context35.stop(); | ||
return _context34.stop(); | ||
} | ||
} | ||
}, _callee35, this, [[0, 7]]); | ||
}, _callee34, this, [[0, 7]]); | ||
})); | ||
return function getLaunchedNavies() { | ||
return _ref35.apply(this, arguments); | ||
return _ref34.apply(this, arguments); | ||
}; | ||
@@ -100,29 +100,29 @@ }(); | ||
var getLaunchedNavyNames = exports.getLaunchedNavyNames = function () { | ||
var _ref36 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee36() { | ||
return _regenerator2.default.wrap(function _callee36$(_context36) { | ||
var _ref35 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee35() { | ||
return _regenerator2.default.wrap(function _callee35$(_context35) { | ||
while (1) { | ||
switch (_context36.prev = _context36.next) { | ||
switch (_context35.prev = _context35.next) { | ||
case 0: | ||
_context36.prev = 0; | ||
_context36.next = 3; | ||
_context35.prev = 0; | ||
_context35.next = 3; | ||
return fs.readdirAsync((0, _state.pathToNavys)()); | ||
case 3: | ||
return _context36.abrupt('return', _context36.sent); | ||
return _context35.abrupt('return', _context35.sent); | ||
case 6: | ||
_context36.prev = 6; | ||
_context36.t0 = _context36['catch'](0); | ||
return _context36.abrupt('return', []); | ||
_context35.prev = 6; | ||
_context35.t0 = _context35['catch'](0); | ||
return _context35.abrupt('return', []); | ||
case 9: | ||
case 'end': | ||
return _context36.stop(); | ||
return _context35.stop(); | ||
} | ||
} | ||
}, _callee36, this, [[0, 6]]); | ||
}, _callee35, this, [[0, 6]]); | ||
})); | ||
return function getLaunchedNavyNames() { | ||
return _ref36.apply(this, arguments); | ||
return _ref35.apply(this, arguments); | ||
}; | ||
@@ -163,3 +163,3 @@ }(); | ||
var _xipio = require('../util/xipio'); | ||
var _nipio = require('../util/nipio'); | ||
@@ -1686,9 +1686,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/** | ||
* @deprecated | ||
* Returns the external port for the given service and internal private port. | ||
* @public | ||
*/ | ||
}, { | ||
key: 'host', | ||
key: 'port', | ||
value: function () { | ||
var _ref30 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee30(service, index) { | ||
var _ref30 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee30(service, privatePort) { | ||
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; | ||
return _regenerator2.default.wrap(function _callee30$(_context30) { | ||
@@ -1699,8 +1701,15 @@ while (1) { | ||
_context30.next = 2; | ||
return this.externalIP(); | ||
return this.safeGetDriver(); | ||
case 2: | ||
_context30.t0 = service; | ||
_context30.t1 = privatePort; | ||
_context30.t2 = index; | ||
_context30.next = 7; | ||
return _context30.sent.port(_context30.t0, _context30.t1, _context30.t2); | ||
case 7: | ||
return _context30.abrupt('return', _context30.sent); | ||
case 3: | ||
case 8: | ||
case 'end': | ||
@@ -1713,11 +1722,12 @@ return _context30.stop(); | ||
function host(_x26, _x27) { | ||
function port(_x26, _x27, _x28) { | ||
return _ref30.apply(this, arguments); | ||
} | ||
return host; | ||
return port; | ||
}() | ||
/** | ||
* Returns the external port for the given service and internal private port. | ||
* Returns the URL for the given service which can be used to access it if it exposes | ||
* a HTTP server. | ||
* @public | ||
@@ -1727,6 +1737,5 @@ */ | ||
}, { | ||
key: 'port', | ||
key: 'url', | ||
value: function () { | ||
var _ref31 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee31(service, privatePort) { | ||
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; | ||
var _ref31 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee31(service) { | ||
return _regenerator2.default.wrap(function _callee31$(_context31) { | ||
@@ -1736,11 +1745,11 @@ while (1) { | ||
case 0: | ||
_context31.next = 2; | ||
return this.safeGetDriver(); | ||
_context31.t0 = service; | ||
_context31.t1 = this.normalisedName; | ||
_context31.next = 4; | ||
return this.externalIP(); | ||
case 2: | ||
_context31.t0 = service; | ||
_context31.t1 = privatePort; | ||
_context31.t2 = index; | ||
case 4: | ||
_context31.t2 = _context31.sent; | ||
_context31.next = 7; | ||
return _context31.sent.port(_context31.t0, _context31.t1, _context31.t2); | ||
return (0, _nipio.getUrlForService)(_context31.t0, _context31.t1, _context31.t2); | ||
@@ -1758,12 +1767,11 @@ case 7: | ||
function port(_x28, _x29, _x30) { | ||
function url(_x30) { | ||
return _ref31.apply(this, arguments); | ||
} | ||
return port; | ||
return url; | ||
}() | ||
/** | ||
* Returns the URL for the given service which can be used to access it if it exposes | ||
* a HTTP server. | ||
* Returns an array of the names of the launched services for this Navy. | ||
* @public | ||
@@ -1773,5 +1781,5 @@ */ | ||
}, { | ||
key: 'url', | ||
key: 'getLaunchedServiceNames', | ||
value: function () { | ||
var _ref32 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee32(service) { | ||
var _ref32 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee32() { | ||
return _regenerator2.default.wrap(function _callee32$(_context32) { | ||
@@ -1781,16 +1789,13 @@ while (1) { | ||
case 0: | ||
_context32.t0 = service; | ||
_context32.t1 = this.normalisedName; | ||
_context32.next = 2; | ||
return this.safeGetDriver(); | ||
case 2: | ||
_context32.next = 4; | ||
return this.externalIP(); | ||
return _context32.sent.getLaunchedServiceNames(); | ||
case 4: | ||
_context32.t2 = _context32.sent; | ||
_context32.next = 7; | ||
return (0, _xipio.getUrlForService)(_context32.t0, _context32.t1, _context32.t2); | ||
case 7: | ||
return _context32.abrupt('return', _context32.sent); | ||
case 8: | ||
case 5: | ||
case 'end': | ||
@@ -1803,11 +1808,11 @@ return _context32.stop(); | ||
function url(_x32) { | ||
function getLaunchedServiceNames() { | ||
return _ref32.apply(this, arguments); | ||
} | ||
return url; | ||
return getLaunchedServiceNames; | ||
}() | ||
/** | ||
* Returns an array of the names of the launched services for this Navy. | ||
* Returns an array of the names of all of the possible services for this Navy. | ||
* @public | ||
@@ -1817,3 +1822,3 @@ */ | ||
}, { | ||
key: 'getLaunchedServiceNames', | ||
key: 'getAvailableServiceNames', | ||
value: function () { | ||
@@ -1830,3 +1835,3 @@ var _ref33 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee33() { | ||
_context33.next = 4; | ||
return _context33.sent.getLaunchedServiceNames(); | ||
return _context33.sent.getAvailableServiceNames(); | ||
@@ -1844,44 +1849,6 @@ case 4: | ||
function getLaunchedServiceNames() { | ||
function getAvailableServiceNames() { | ||
return _ref33.apply(this, arguments); | ||
} | ||
return getLaunchedServiceNames; | ||
}() | ||
/** | ||
* Returns an array of the names of all of the possible services for this Navy. | ||
* @public | ||
*/ | ||
}, { | ||
key: 'getAvailableServiceNames', | ||
value: function () { | ||
var _ref34 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee34() { | ||
return _regenerator2.default.wrap(function _callee34$(_context34) { | ||
while (1) { | ||
switch (_context34.prev = _context34.next) { | ||
case 0: | ||
_context34.next = 2; | ||
return this.safeGetDriver(); | ||
case 2: | ||
_context34.next = 4; | ||
return _context34.sent.getAvailableServiceNames(); | ||
case 4: | ||
return _context34.abrupt('return', _context34.sent); | ||
case 5: | ||
case 'end': | ||
return _context34.stop(); | ||
} | ||
} | ||
}, _callee34, this); | ||
})); | ||
function getAvailableServiceNames() { | ||
return _ref34.apply(this, arguments); | ||
} | ||
return getAvailableServiceNames; | ||
@@ -1888,0 +1855,0 @@ }() |
@@ -81,3 +81,3 @@ 'use strict'; | ||
process.env.DOCKER_HOST = 'tcp://testfoo.192.168.1.13.xip.io:2375'; | ||
process.env.DOCKER_HOST = 'tcp://testfoo.192.168.1.13.nip.io:2375'; | ||
_context3.next = 8; | ||
@@ -84,0 +84,0 @@ return (0, _externalIp.getExternalIP)(); |
{ | ||
"name": "navy", | ||
"version": "2.5.2", | ||
"version": "3.0.0-rc1", | ||
"description": "Quick and powerful development environments using Docker and Docker Compose", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -35,3 +35,3 @@ navy | ||
Access your services using `myservice.dev.xip.io` rather than using pesky IP addresses and random ports. | ||
Access your services using `myservice.dev.nip.io` rather than using pesky IP addresses and random ports. | ||
This is also great for testing your services on other devices like tablets and phones. | ||
@@ -38,0 +38,0 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
273140
75
6620
2