webxdc-dev
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -7,2 +7,4 @@ import express, { Express } from "express"; | ||
const SIMULATOR_PATHS = ["/webxdc.js", "/webxdc", "/webxdc/.websocket"]; | ||
export type WebXdcDescription = { | ||
@@ -57,5 +59,9 @@ name: string; | ||
// serve webxdc project from URL by proxying | ||
const filter = (pathname: string) => { | ||
// make sure we don't proxy any path to do with the simulator | ||
return !SIMULATOR_PATHS.includes(pathname); | ||
}; | ||
wsInstance.app.use( | ||
"/", | ||
createProxyMiddleware(["**", "!/webxdc.js"], { | ||
createProxyMiddleware(filter, { | ||
target: location, | ||
@@ -62,0 +68,0 @@ ws: false, |
@@ -10,2 +10,10 @@ # Changelog | ||
## [0.5.1][] - 2022-06-22 | ||
### Fixed | ||
- There was a problem of applications breaking when running against a dev | ||
server on a URL. The websocket at /webxdc/.socket is now properly filtered | ||
out so that the applications start up correctly again. | ||
## [0.5.0][] - 2022-06-21 | ||
@@ -92,5 +100,7 @@ | ||
[0.4.0]: https://github.com/webxdc/webxdc-dev/tree/v0.4.0 | ||
[unreleased]: https://github.com/webxdc/webxdc-dev/compare/v0.5.0...HEAD | ||
[0.5.0]: https://github.com/webxdc/webxdc-dev/tree/v0.5.0 | ||
[Unreleased]: https://github.com/webxdc/webxdc-dev/compare/v0.5.0...HEAD | ||
[0.5.0]: https://github.com/webxdc/webxdc-dev/tree/v0.5.0 | ||
[Unreleased]: https://github.com/webxdc/webxdc-dev/compare/v0.5.1...HEAD | ||
[0.5.1]: https://github.com/webxdc/webxdc-dev/tree/v0.5.1 |
@@ -11,2 +11,3 @@ "use strict"; | ||
const http_proxy_middleware_1 = require("http-proxy-middleware"); | ||
const SIMULATOR_PATHS = ["/webxdc.js", "/webxdc", "/webxdc/.websocket"]; | ||
function createFrontend(instances, injectFrontend) { | ||
@@ -42,3 +43,7 @@ const app = (0, express_1.default)(); | ||
// serve webxdc project from URL by proxying | ||
wsInstance.app.use("/", (0, http_proxy_middleware_1.createProxyMiddleware)(["**", "!/webxdc.js"], { | ||
const filter = (pathname) => { | ||
// make sure we don't proxy any path to do with the simulator | ||
return !SIMULATOR_PATHS.includes(pathname); | ||
}; | ||
wsInstance.app.use("/", (0, http_proxy_middleware_1.createProxyMiddleware)(filter, { | ||
target: location, | ||
@@ -45,0 +50,0 @@ ws: false, |
{ | ||
"name": "webxdc-dev", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "A dev tool for Webxdc", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/webxdc/webxdc-dev#readme", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71803
1298