def show_dependencies(args): _helper.DO_PRINT = True # enable all by default if not args.binary and not args.builddeb: args.binary = True args.builddeb = True npm2deb_instance = get_npm2deb_instance(args) module_name = npm2deb_instance.name json = npm2deb_instance.json if args.binary: if 'dependencies' in json and json['dependencies']: print("Dependencies:") _helper.print_formatted_dependency("NPM", "Debian") module_ver = npm2deb_instance.upstream_version module_deb = _Mapper.get_instance()\ .get_debian_package(module_name)["repr"] _helper.print_formatted_dependency("%s (%s)" % (module_name, module_ver), module_deb) _helper.search_for_dependencies(npm2deb_instance, args.recursive, args.force) print("") else: print("Module %s has no dependencies." % module_name) if args.builddeb: if 'devDependencies' in json and json['devDependencies']: print("Build dependencies:") _helper.print_formatted_dependency("NPM", "Debian") _helper.search_for_builddep(npm2deb_instance) print("") else: print("Module %s has no build dependencies." % module_name) _show_mapper_warnings()
def show_dependencies(args): _helper.DO_PRINT = True # enable all by default if not args.binary and not args.builddeb: args.binary = True args.builddeb = True npm2deb_instance = get_npm2deb_instance(args) module_name = npm2deb_instance.name json = npm2deb_instance.json if args.binary: if 'dependencies' in json and json['dependencies']: print("Dependencies:") _helper.print_formatted_dependency("NPM", "Debian") module_ver = npm2deb_instance.upstream_version module_deb = _Mapper.get_instance()\ .get_debian_package(module_name)["repr"] _helper.print_formatted_dependency( "%s (%s)" % (module_name, module_ver), module_deb) _helper.search_for_dependencies(npm2deb_instance, args.recursive, args.force) print("") else: print("Module %s has no dependencies." % module_name) if args.builddeb: if 'devDependencies' in json and json['devDependencies']: print("Build dependencies:") _helper.print_formatted_dependency("NPM", "Debian") _helper.search_for_builddep(npm2deb_instance) print("") else: print("Module %s has no build dependencies." % module_name) _show_mapper_warnings()