test-project-host.d.ts 1.1 KB

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