Comparing version 2.4.10 to 2.4.11
{ | ||
"name": "akkeris", | ||
"version": "2.4.10", | ||
"version": "2.4.11", | ||
"description": "Akkeris CLI", | ||
@@ -5,0 +5,0 @@ "main": "aka.js", |
@@ -34,2 +34,5 @@ "use strict" | ||
} else { | ||
if(!data || data.length === 0) { | ||
return console.log(appkit.terminal.markdown("**===** There were no routes found.")) | ||
} | ||
data.forEach((route) => { | ||
@@ -47,9 +50,15 @@ let route_app = route.app.name || route.app; // stay compatible with older v2 controller | ||
} | ||
console.assert((args.site && args.site !== '') || (args.app && args.app !== ''), 'Please specify either an app or a site.') | ||
if(!args.site && !args.app) { | ||
return appkit.terminal.error('Please specify either an app or a site (-a or -s).') | ||
} | ||
if (args.site && args.site !== ''){ | ||
console.assert(!args.app, 'Please specify either an app or a site.'); | ||
if(args.app) { | ||
return appkit.terminal.error('Please specify either an app or a site (-a or -s).') | ||
} | ||
args.site = clean_site(args.site); | ||
appkit.api.get(`/sites/${args.site}/routes`, print_routes); | ||
} | ||
else { | ||
} else { | ||
if(args.site) { | ||
return appkit.terminal.error('Please specify either an app or a site (-a or -s).') | ||
} | ||
appkit.api.get(`/apps/${args.app}/routes`, print_routes); | ||
@@ -56,0 +65,0 @@ } |
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
175580
4806