Socket
Socket
Sign inDemoInstall

asdfui

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asdfui - npm Package Compare versions

Comparing version 0.1.17 to 0.1.18

2

dist/cli.js

@@ -5,2 +5,4 @@ #!/usr/bin/env node

import App from "./App.js";
import { clearConsole } from "./utils/helpers.js";
clearConsole();
render(React.createElement(App, null));

14

dist/components/CommandInfo.js

@@ -1,13 +0,7 @@

import { Box, Text, useFocus } from "ink";
import Link from "ink-link";
import { getCommandInfo } from "../utils/index.js";
import { Box, Text } from "ink";
import React from "react";
import { getCommandInfo } from "../utils/index.js";
export function CommandInfo() {
useFocus({ isActive: false });
return (React.createElement(Box, { width: "100%", minHeight: 5, justifyContent: "space-between", flexWrap: "wrap" },
React.createElement(Box, { flexGrow: 3 },
React.createElement(Text, { color: "blue", bold: true }, getCommandInfo())),
React.createElement(Box, { flexGrow: 1 },
React.createElement(Link, { url: "https://github.com/rubiin/asdfui" },
React.createElement(Text, { color: "magenta" }, "Github")))));
return (React.createElement(Box, { width: "100%", minHeight: 5, marginTop: 1, justifyContent: "center", flexWrap: "wrap" },
React.createElement(Text, { color: "blue", bold: true }, getCommandInfo())));
}

@@ -76,4 +76,4 @@ import { Title } from "../components/index.js";

return (React.createElement(Box, { borderStyle: "double", borderColor: getBorderColorOnFocus(isFocused), flexDirection: "column", width: "70%", minHeight: 20, paddingLeft: 4 },
React.createElement(Title, { label: totalNumber("Versions", availableVersions.length), color: getBorderColorOnFocus(isFocused) }),
React.createElement(Title, { label: totalNumber("Versions", installedVersions.length, availableVersions.length), color: getBorderColorOnFocus(isFocused) }),
React.createElement(VersionsDisplay, { setSelectedVersion: handleState, isOnline: isOnline, isFocused: isFocused, isLoading: isLoading, isLocal: isLocal, versions: isLocal ? installedVersions : availableVersions, pluginName: currentlySelected.label })));
}

@@ -77,12 +77,9 @@ import { $ } from "execa";

const sanitizedData = sanitizeData(stdout);
const values = formatPluginData(sanitizedData.map((value) => value.trim().replace("*", ""))).reverse();
const globalVersion = await getGlobalVersionForTool(name);
if (globalVersion) {
return values.map((value) => {
if (value.label === globalVersion) {
value.label += " 🌎";
}
return value;
});
}
const values = formatPluginData(sanitizedData.map((value) => {
value = value.trim();
if (value.startsWith("*")) {
value = value.replace("*", "") + " 🌎";
}
return value;
})).reverse();
return values;

@@ -101,3 +98,3 @@ }

});
lineReader.on(`line`, function (line) {
lineReader.on("line", function (line) {
if (line.includes(searchTerm)) {

@@ -104,0 +101,0 @@ result = line.split(" ")[1];

@@ -14,4 +14,4 @@ import { BorderColor } from "../types.js";

}
export function totalNumber(start, total) {
return `${start} (${total})`;
export function totalNumber(start, installed, available) {
return available ? `${start} (${installed}/${available})` : `${start} (${installed})`;
}

@@ -21,1 +21,4 @@ export function getCommandInfo() {

}
export function clearConsole() {
process.stdout.write("\x1B[2J\x1B[3J\x1B[H\x1Bc");
}
{
"name": "asdfui",
"version": "0.1.17",
"version": "0.1.18",
"bin": "dist/cli.js",

@@ -45,3 +45,2 @@ "type": "module",

"ink": "^4.4.1",
"ink-link": "^3.0.0",
"ink-select-input": "^5.0.0",

@@ -48,0 +47,0 @@ "install": "^0.13.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc