Implements the debugVisualizer.debugAdapterConfigurations configuration option.

This commit is contained in:
Henning Dieterichs
2020-03-02 10:52:19 +01:00
parent f6a554c897
commit f12ea19369
19 changed files with 338 additions and 118 deletions

View File

@@ -2,19 +2,19 @@ import { WebSocketStream } from "@hediet/typed-json-rpc-websocket";
import { AddressInfo } from "net";
import WebSocket = require("ws");
import { ConnectionHandler } from "./ConnectionHandler";
import { Sources } from "./DataSource";
import * as express from "express";
import * as http from "http";
import * as serveStatic from "serve-static";
import { Config } from "./Config";
import cryptoRandomString = require("crypto-random-string");
import { distPath } from "debug-visualizer-webview";
import { DataSource } from "./DataSource/DataSource";
export class Server {
private server: http.Server;
public readonly secret = cryptoRandomString({ length: 20 });
constructor(sources: Sources, config: Config) {
constructor(dataSource: DataSource, config: Config) {
const app = express();
app.use(serveStatic(distPath));
@@ -31,7 +31,7 @@ export class Server {
wss.on("connection", ws => {
const stream = new WebSocketStream(ws);
new ConnectionHandler(
sources.dataSource,
dataSource,
stream,
this,
config,