Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

chrome-launcher.d.ts 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /// <reference types="node" />
  2. import * as childProcess from 'child_process';
  3. import * as fs from 'fs';
  4. import { ChildProcess } from 'child_process';
  5. export declare type RimrafModule = (path: string, callback: (error: Error) => void) => void;
  6. export interface Options {
  7. startingUrl?: string;
  8. chromeFlags?: Array<string>;
  9. port?: number;
  10. handleSIGINT?: boolean;
  11. chromePath?: string;
  12. userDataDir?: string | boolean;
  13. logLevel?: 'verbose' | 'info' | 'error' | 'silent';
  14. ignoreDefaultFlags?: boolean;
  15. connectionPollInterval?: number;
  16. maxConnectionRetries?: number;
  17. envVars?: {
  18. [key: string]: string | undefined;
  19. };
  20. }
  21. export interface LaunchedChrome {
  22. pid: number;
  23. port: number;
  24. process: ChildProcess;
  25. kill: () => Promise<{}>;
  26. }
  27. export interface ModuleOverrides {
  28. fs?: typeof fs;
  29. rimraf?: RimrafModule;
  30. spawn?: typeof childProcess.spawn;
  31. }
  32. declare function launch(opts?: Options): Promise<LaunchedChrome>;
  33. declare function killAll(): Promise<Array<Error>>;
  34. declare class Launcher {
  35. private opts;
  36. private tmpDirandPidFileReady;
  37. private pidFile;
  38. private startingUrl;
  39. private outFile?;
  40. private errFile?;
  41. private chromePath?;
  42. private ignoreDefaultFlags?;
  43. private chromeFlags;
  44. private requestedPort?;
  45. private connectionPollInterval;
  46. private maxConnectionRetries;
  47. private fs;
  48. private rimraf;
  49. private spawn;
  50. private useDefaultProfile;
  51. private envVars;
  52. chrome?: childProcess.ChildProcess;
  53. userDataDir?: string;
  54. port?: number;
  55. pid?: number;
  56. constructor(opts?: Options, moduleOverrides?: ModuleOverrides);
  57. private get flags();
  58. static defaultFlags(): string[];
  59. /** Returns the highest priority chrome installation. */
  60. static getFirstInstallation(): string | undefined;
  61. /** Returns all available chrome installations in decreasing priority order. */
  62. static getInstallations(): string[];
  63. makeTmpDir(): string;
  64. prepare(): void;
  65. launch(): Promise<void | {}>;
  66. private spawnProcess;
  67. private cleanup;
  68. private isDebuggerReady;
  69. waitUntilReady(): Promise<unknown>;
  70. kill(): Promise<{}>;
  71. destroyTmp(): Promise<unknown>;
  72. }
  73. export default Launcher;
  74. export { Launcher, launch, killAll };