fix: improve the dialog and drawer scrollbar experience, fix internal click failure problems and warnings (#4391)

* fix: improve the dialog and drawer scrollbar experience, fix internal click failure problems and warnings

* chore: remove test code
This commit is contained in:
Vben
2024-09-13 21:46:56 +08:00
committed by GitHub
parent bd6b724aaf
commit d27e5eeef7
20 changed files with 186 additions and 42 deletions

View File

@@ -23,30 +23,32 @@ export async function run(options: RunOptions) {
return (pkg?.packageJson as Record<string, any>)?.scripts?.[command];
});
const selectPkg = await select<any, string>({
message: `Select the app you need to run [${command}]:`,
options: selectPkgs.map((item) => ({
label: item?.packageJson.name,
value: item?.packageJson.name,
})),
});
let selectPkg: string | symbol;
if (selectPkgs.length > 1) {
selectPkg = await select<any, string>({
message: `Select the app you need to run [${command}]:`,
options: selectPkgs.map((item) => ({
label: item?.packageJson.name,
value: item?.packageJson.name,
})),
});
if (isCancel(selectPkg) || !selectPkg) {
cancel('👋 Has cancelled');
process.exit(0);
if (isCancel(selectPkg) || !selectPkg) {
cancel('👋 Has cancelled');
process.exit(0);
}
} else {
selectPkg = selectPkgs[0]?.packageJson?.name ?? '';
}
if (!selectPkg) {
console.error('No app found');
process.exit(1);
}
execaCommand(`pnpm --filter=${selectPkg} run ${command}`, {
stdio: 'inherit',
});
// const filters = [];
// for (const app of selectApps) {
// filters.push(`--filter=${app}`);
// }
// $.verbose = true;
// execaCommand(`turbo run ${command} ${filters}`, {
// stdio: 'inherit',
// });
}
/**