Archived
1
0

Remove URI factory

It's not actually used anymore.
This commit is contained in:
Asher
2019-02-06 10:38:58 -06:00
parent 1b0a962c0d
commit 670b13798a
6 changed files with 8 additions and 36 deletions

View File

@ -6,7 +6,6 @@ import { upload } from "./upload";
import { client } from "./fill/client";
import { clipboard } from "./fill/clipboard";
import { INotificationService, IProgressService } from "./fill/notification";
import { IURIFactory } from "./fill/uri";
/**
* A general abstraction of an IDE client.
@ -19,7 +18,6 @@ import { IURIFactory } from "./fill/uri";
export abstract class IdeClient {
public readonly retry = retry;
public readonly clipboard = clipboard;
public readonly uriFactory: IURIFactory;
public readonly upload = upload;
private start: Time | undefined;
@ -47,8 +45,6 @@ export abstract class IdeClient {
logger.info("Unloaded");
});
this.uriFactory = this.createUriFactory();
this.initialize().then(() => {
logger.info("Load completed", field("duration", this.loadTime));
}).catch((error) => {
@ -134,9 +130,4 @@ export abstract class IdeClient {
* Initialize the IDE.
*/
protected abstract initialize(): Promise<void>;
/**
* Create URI factory.
*/
protected abstract createUriFactory(): IURIFactory;
}

View File

@ -1,14 +0,0 @@
export interface IURI {
readonly path: string;
readonly fsPath: string;
readonly scheme: string;
}
export interface IURIFactory {
/**
* Convert the object to an instance of a real URI.
*/
create<T extends IURI>(uri: IURI): T;
file(path: string): IURI;
parse(raw: string): IURI;
}

View File

@ -1,6 +1,5 @@
export * from "./client";
export * from "./fill/clipboard";
export * from "./fill/notification";
export * from "./fill/uri";
export * from "./retry";
export * from "./upload";

View File

@ -3,9 +3,14 @@ import { appendFile } from "fs";
import { promisify } from "util";
import { logger, Logger } from "@coder/logger";
import { escapePath } from "@coder/protocol";
import { IURI } from "./fill/uri";
import { NotificationService, INotificationService, ProgressService, IProgressService, IProgress, Severity } from "./fill/notification";
export interface IURI {
readonly path: string;
readonly fsPath: string;
readonly scheme: string;
}
/**
* Represents an uploadable directory, so we can query for existing files once.
*/