chore: tree shake unused API methods from CLI (#6973)

This commit is contained in:
Ben McCann
2024-02-09 12:53:37 -08:00
committed by GitHub
parent 954c1c2ef4
commit aff71a10e5
200 changed files with 3337 additions and 22416 deletions

View File

@@ -2,10 +2,10 @@ import { BaseCommand } from './base-command';
export class ServerInfoCommand extends BaseCommand {
public async run() {
await this.connect();
const versionInfo = await this.immichApi.serverInfoApi.getServerVersion();
const mediaTypes = await this.immichApi.serverInfoApi.getSupportedMediaTypes();
const statistics = await this.immichApi.assetApi.getAssetStatistics();
const api = await this.connect();
const versionInfo = await api.getServerVersion();
const mediaTypes = await api.getSupportedMediaTypes();
const statistics = await api.getAssetStatistics();
console.log(`Server Version: ${versionInfo.major}.${versionInfo.minor}.${versionInfo.patch}`);
console.log(`Image Types: ${mediaTypes.image.map((extension) => extension.replace('.', ''))}`);