Version 2.2.0.

* Adds support for custom injected scripts with automatic reload
* Refactors extension
This commit is contained in:
Henning Dieterichs
2021-06-18 20:26:51 +02:00
parent 6ce5d666a3
commit d22e5d4111
46 changed files with 1421 additions and 716 deletions

View File

@@ -8,7 +8,7 @@ import * as serveStatic from "serve-static";
import { Config } from "../Config";
import cryptoRandomString = require("crypto-random-string");
import { distPath } from "debug-visualizer-webview";
import { EvaluationWatchService } from "../EvaluationWatchService/EvaluationWatchService";
import { VisualizationWatchModel } from "../VisualizationWatchModel/VisualizationWatchModel";
import { URLSearchParams } from "url";
import { autorun, reaction } from "mobx";
@@ -19,7 +19,7 @@ export class WebviewServer {
public readonly connections = new Set<WebviewConnection>();
constructor(
dataSource: EvaluationWatchService,
dataSource: VisualizationWatchModel,
private readonly config: Config
) {
const app = express();
@@ -28,11 +28,13 @@ export class WebviewServer {
this.server = app.listen();
/*
console.log(
`Serving "${distPath}" on port ${
(this.server.address() as AddressInfo).port
}`
);
*/
const wss = new WebSocket.Server({ server: this.server });
wss.on("connection", async ws => {