/
githubmirror
/
angular-cli
Обзор
Документация
Войти
/
githubmirror
/
angular-cli
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/angular/cli/src/commands/cache/clean/cli.ts
37 строк
954 B
Charles Lyding
refactor(@angular/cli): import from `node:fs/promises` where appropriate
15 мар 2025, 01:19
15 мар 2025, 01:19
0948dde
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { rm } from 'node:fs/promises'; import { Argv } from 'yargs'; import { CommandModule, CommandModuleImplementation, CommandScope, } from '../../../command-builder/command-module'; import { getCacheConfig } from '../utilities'; export class CacheCleanModule extends CommandModule implements CommandModuleImplementation { command = 'clean'; describe = 'Deletes persistent disk cache from disk.'; longDescriptionPath: string | undefined; override scope = CommandScope.In; builder(localYargs: Argv): Argv { return localYargs.strict(); } run(): Promise<void> { const { path } = getCacheConfig(this.context.workspace); return rm(path, { force: true, recursive: true, maxRetries: 3, }); } }