Files
AFFiNE-Mirror/tools/cli/src/dev.ts
T
fengmk2 d6000ce70b chore(tools): add @affine/admin to available packages (#12507)
![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/hTwOityLamd4hitrae7M/52e2017b-cd59-4549-8c24-be84b7000d56.png)

<!-- 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 -->
2025-05-26 03:31:32 +00:00

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);
}
}