Skip to content

Commit

Permalink
fix: 当前源标记白色主题不明显
Browse files Browse the repository at this point in the history
  • Loading branch information
kinfuy committed Mar 19, 2023
1 parent 568f86b commit b5f6f79
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions dist/gnrm.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ const getRegistrys = async (pkgs = defaultPackageManager) => {
cnpm: "",
yarn: ""
};
console.time("test");
const list = pkgs.map(async (pkg) => {
return {
pkg,
Expand All @@ -287,7 +286,6 @@ const getRegistrys = async (pkgs = defaultPackageManager) => {
const itme = await iterator;
registrys[itme.pkg] = itme.handle || "";
}
console.timeEnd("test");
return registrys;
};
const useLs = async (cmd) => {
Expand Down Expand Up @@ -338,19 +336,19 @@ const useLs = async (cmd) => {
npm: kolorist.green,
cnpm: kolorist.red,
yarn: kolorist.blue,
pnpm: kolorist.yellow
pnpm: kolorist.lightYellow
};
const currentTip = `current: ${Object.keys(currectRegistry).map((key) => {
if (currectRegistry[key])
return `${key}: ${colorMap[key]("*")}`;
return `${key}: ${colorMap[key]("\u25A0")}`;
return "";
}).filter((i) => i).join(" ")}
`;
const messages = registryList.map((item) => {
const currect = Object.keys(currectRegistry).map((key) => {
if (currectRegistry[key] && item.registry.includes(currectRegistry[key]))
return colorMap[key]("*");
return colorMap[key]("\u25A0");
return "";
}).filter((x) => x);
const isSame = item.alias === item.name;
Expand Down
2 changes: 1 addition & 1 deletion dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
"kolorist": "^1.5.1",
"prompts": "^2.4.2"
}
}
}
4 changes: 2 additions & 2 deletions package/commands/gnrm/useLs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ export const useLs = async (cmd: NrmCmd) => {

const currentTip = `current: ${Object.keys(currectRegistry).map((key) => {
if (currectRegistry[key as PackageManagertype])
return `${key}: ${colorMap[key]('*')}`;
return `${key}: ${colorMap[key]('')}`;
return '';
}).filter(i => i).join(' ')}\n\n`;

const messages = registryList.map((item) => {
const currect = Object.keys(currectRegistry).map((key) => {
if (currectRegistry[key as PackageManagertype] && item.registry.includes(currectRegistry[key as PackageManagertype]))
return colorMap[key]('*');
return colorMap[key]('');
return '';
}).filter(x => x);

Expand Down

0 comments on commit b5f6f79

Please sign in to comment.