Skip to content

Commit

Permalink
use node LTS
Browse files Browse the repository at this point in the history
  • Loading branch information
krisselden committed May 6, 2017
1 parent cb2e5d1 commit 6660ca8
Show file tree
Hide file tree
Showing 20 changed files with 539 additions and 606 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- "4.1"
- "6"

before_install:
- export CHROME_BIN=chromium-browser
Expand Down
105 changes: 0 additions & 105 deletions lib/browser-resolver.ts

This file was deleted.

184 changes: 0 additions & 184 deletions lib/browser-spawner.ts

This file was deleted.

40 changes: 3 additions & 37 deletions lib/api-client-factory.ts → lib/create-api-client.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,9 @@
import { IHTTPClient } from "./http-client-factory";
import { IAPIClient, IHTTPClient, ITab, IVersionInfo } from "./types";

export interface IAPIClientFactory {
create(httpClient: IHTTPClient): IAPIClient;
export default function createAPIClient(httpClient: IHTTPClient): IAPIClient {
return new APIClient(httpClient);
}

export interface IAPIClient {
version(): Promise<IVersionInfo>;
listTabs(): Promise<ITab[]>;
newTab(url?: string): Promise<ITab>;
activateTab(tabId: string): Promise<void>;
closeTab(tabId: string): Promise<void>;
}

export interface ITab {
id: string;
webSocketDebuggerUrl?: string;
description?: string;
devtoolsFrontendUrl?: string;
faviconUrl?: string;
title?: string;
type?: string;
url?: string;
}

export interface IVersionInfo {
"Browser": string;
"Protocol-Version": string;
"User-Agent": string;
"WebKit-Version": string;
}

export default class APIClientFactory implements IAPIClientFactory {
public create(httpClient: IHTTPClient): IAPIClient {
return new APIClient(httpClient);
}
}

/* tslint:disable:max-classes-per-file */

class APIClient implements IAPIClient {
private httpClient: IHTTPClient;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
import { EventEmitter } from "events";
import { IEventNotifier } from "./common";
import { IWebSocketConnection, IWebSocketDelegate } from "./web-socket-opener";

export interface IDebuggingProtocolClientFactory {
create(): IDebuggingProtocolClient;
}

export interface IDebuggingProtocolClient extends IEventNotifier, IWebSocketDelegate {
send<T>(command: string, params?: any): Promise<T>;
send(command: string, params?: any): Promise<any>;
}
import { IDebuggingProtocolClient, IWebSocketConnection } from "./types";

interface ICommandRequest {
id: number;
Expand Down Expand Up @@ -41,10 +31,8 @@ interface IMessage extends IEventMessage, ISuccessResponseMessage, IErrorRespons

interface ICommandResponseMessage extends ISuccessResponseMessage, IErrorResponseMessage {}

export default class DebuggingProtocolFactory implements IDebuggingProtocolClientFactory {
public create(): IDebuggingProtocolClient {
return new DebuggingProtocol();
}
export default function createDebuggingProtocolClient(): IDebuggingProtocolClient {
return new DebuggingProtocol();
}

/* tslint:disable:max-classes-per-file */
Expand Down
Loading

0 comments on commit 6660ca8

Please sign in to comment.