mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-02 10:10:42 +08:00
d6000ce70b
 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added '@affine/admin' to the list of selectable packages for development commands. - **Enhancements** - Improved package selection prompt by displaying up to 10 choices at a time for easier navigation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
36 lines
780 B
TypeScript
36 lines
780 B
TypeScript
import type { PackageName } from '@affine-tools/utils/workspace';
|
|
|
|
import { Option, PackageSelectorCommand } from './command';
|
|
|
|
export class DevCommand extends PackageSelectorCommand {
|
|
static override paths = [['dev'], ['d']];
|
|
|
|
protected override availablePackages: PackageName[] = [
|
|
'@affine/web',
|
|
'@affine/server',
|
|
'@affine/electron',
|
|
'@affine/electron-renderer',
|
|
'@affine/mobile',
|
|
'@affine/ios',
|
|
'@affine/android',
|
|
'@affine/admin',
|
|
];
|
|
|
|
protected deps = Option.Boolean('--deps', {
|
|
description: 'Run dev with dependencies',
|
|
});
|
|
|
|
async execute() {
|
|
const name = await this.getPackage();
|
|
const args = [];
|
|
|
|
if (this.deps) {
|
|
args.push('--deps');
|
|
}
|
|
|
|
args.push(name, 'dev');
|
|
|
|
await this.cli.run(args);
|
|
}
|
|
}
|