test-project-host.d.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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.io/license
  7. */
  8. /// <reference types="node" />
  9. /// <reference types="node" />
  10. import { Path, PathFragment, virtualFs } from '@angular-devkit/core';
  11. import { NodeJsSyncHost } from '@angular-devkit/core/node';
  12. import { Stats } from 'fs';
  13. import { Observable } from 'rxjs';
  14. /**
  15. * @deprecated
  16. */
  17. export declare class TestProjectHost extends NodeJsSyncHost {
  18. protected _templateRoot: Path;
  19. private _currentRoot;
  20. private _scopedSyncHost;
  21. constructor(_templateRoot: Path);
  22. root(): Path;
  23. scopedSync(): virtualFs.SyncDelegateHost<Stats>;
  24. initialize(): Observable<void>;
  25. restore(): Observable<void>;
  26. writeMultipleFiles(files: {
  27. [path: string]: string | ArrayBufferLike | Buffer;
  28. }): void;
  29. replaceInFile(path: string, match: RegExp | string, replacement: string): void;
  30. appendToFile(path: string, str: string): void;
  31. fileMatchExists(dir: string, regex: RegExp): PathFragment | undefined;
  32. copyFile(from: string, to: string): void;
  33. private findUniqueFolderPath;
  34. }