test-project-host.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * @license
  3. * Copyright Google LLC All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.dev/license
  7. */
  8. import { Path, PathFragment, virtualFs } from '@angular-devkit/core';
  9. import { NodeJsSyncHost } from '@angular-devkit/core/node';
  10. import { Stats } from 'node:fs';
  11. import { Observable } from 'rxjs';
  12. /**
  13. * @deprecated
  14. */
  15. export declare class TestProjectHost extends NodeJsSyncHost {
  16. protected _templateRoot: Path;
  17. private _currentRoot;
  18. private _scopedSyncHost;
  19. constructor(_templateRoot: Path);
  20. root(): Path;
  21. scopedSync(): virtualFs.SyncDelegateHost<Stats>;
  22. initialize(): Observable<void>;
  23. restore(): Observable<void>;
  24. writeMultipleFiles(files: {
  25. [path: string]: string | ArrayBufferLike | Buffer;
  26. }): void;
  27. replaceInFile(path: string, match: RegExp | string, replacement: string): void;
  28. appendToFile(path: string, str: string): void;
  29. fileMatchExists(dir: string, regex: RegExp): PathFragment | undefined;
  30. copyFile(from: string, to: string): void;
  31. private findUniqueFolderPath;
  32. }