Archived
1
0

Terminal pasting

This commit is contained in:
Asher
2019-01-30 17:46:17 -06:00
committed by Kyle Carberry
parent bef46391fa
commit 6c4e2f9251
6 changed files with 125 additions and 27 deletions

View File

@ -2,7 +2,7 @@ import { Event } from "@coder/events";
import { field, logger, time, Time } from "@coder/logger";
import { InitData, ISharedProcessData } from "@coder/protocol";
import { retry } from "./retry";
import { Upload } from "./upload";
import { upload } from "./upload";
import { client } from "./fill/client";
import { clipboard } from "./fill/clipboard";
import { INotificationService, NotificationService, IProgressService, ProgressService } from "./fill/notification";
@ -21,7 +21,8 @@ export abstract class Client {
public readonly retry = retry;
public readonly clipboard = clipboard;
public readonly uriFactory: IURIFactory;
public readonly upload = new Upload(new NotificationService(), new ProgressService());
public readonly upload = upload;
private start: Time | undefined;
private readonly progressElement: HTMLElement | undefined;
private tasks: string[] = [];

View File

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

View File

@ -4,7 +4,7 @@ import { promisify } from "util";
import { logger, Logger } from "@coder/logger";
import { escapePath } from "@coder/protocol";
import { IURI } from "./fill/uri";
import { INotificationService, IProgressService, IProgress, Severity } from "./fill/notification";
import { NotificationService, INotificationService, ProgressService, IProgressService, IProgress, Severity } from "./fill/notification";
/**
* Represents an uploadable directory, so we can query for existing files once.
@ -355,3 +355,6 @@ export class Upload {
}
}
// Global instance.
export const upload = new Upload(new NotificationService(), new ProgressService());