@e280/hottie 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -16,7 +16,8 @@ serves `./x/` at `http://localhost:8080`, and refreshes the browser when files c
|
|
|
16
16
|
- **--debounce**
|
|
17
17
|
file watcher hesitation in milliseconds. *(default `250`)*
|
|
18
18
|
- **--proxy**
|
|
19
|
-
requests fallback to this proxy url.
|
|
19
|
+
requests fallback to this proxy url, works for http and websockets.
|
|
20
|
+
*(this feature is actually so cashmoney)*
|
|
20
21
|
- **--cold, -c**
|
|
21
22
|
actually don't do the hot-reloading, just be a server.
|
|
22
23
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e280/hottie",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "⚡ hot-reloading http server",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Chase Moskal <chasemoskal@gmail.com>",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@benev/argv": "^0.3.14",
|
|
24
|
-
"@e280/stz": "^0.
|
|
24
|
+
"@e280/stz": "^0.3.7",
|
|
25
25
|
"chokidar": "^5.0.0",
|
|
26
|
-
"http-proxy-3": "^1.23.
|
|
26
|
+
"http-proxy-3": "^1.23.3",
|
|
27
27
|
"sirv": "^3.0.2",
|
|
28
|
-
"ws": "^8.
|
|
28
|
+
"ws": "^8.21.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@types/node": "^
|
|
31
|
+
"@types/node": "^26.1.1",
|
|
32
32
|
"@types/ws": "^8.18.1",
|
|
33
|
-
"typescript": "^
|
|
33
|
+
"typescript": "^7.0.2"
|
|
34
34
|
},
|
|
35
35
|
"keywords": [
|
|
36
36
|
"http server",
|
|
@@ -3,8 +3,8 @@ import {Middleware} from "../types.js"
|
|
|
3
3
|
import {createProxyServer} from "http-proxy-3"
|
|
4
4
|
|
|
5
5
|
export function setupProxy(target: string) {
|
|
6
|
-
const server = createProxyServer()
|
|
7
|
-
const middleware: Middleware = async(req, res) => server.web(req, res
|
|
6
|
+
const server = createProxyServer({target})
|
|
7
|
+
const middleware: Middleware = async(req, res) => server.web(req, res)
|
|
8
8
|
return {server, middleware}
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createProxyServer } from "http-proxy-3";
|
|
2
2
|
export function setupProxy(target) {
|
|
3
|
-
const server = createProxyServer();
|
|
4
|
-
const middleware = async (req, res) => server.web(req, res
|
|
3
|
+
const server = createProxyServer({ target });
|
|
4
|
+
const middleware = async (req, res) => server.web(req, res);
|
|
5
5
|
return { server, middleware };
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=setup-proxy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-proxy.js","sourceRoot":"","sources":["../../../s/fns/parts/setup-proxy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAA;AAE9C,MAAM,UAAU,UAAU,CAAC,MAAc;IACxC,MAAM,MAAM,GAAG,iBAAiB,
|
|
1
|
+
{"version":3,"file":"setup-proxy.js","sourceRoot":"","sources":["../../../s/fns/parts/setup-proxy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAA;AAE9C,MAAM,UAAU,UAAU,CAAC,MAAc;IACxC,MAAM,MAAM,GAAG,iBAAiB,CAAC,EAAC,MAAM,EAAC,CAAC,CAAA;IAC1C,MAAM,UAAU,GAAe,KAAK,EAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IACtE,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,CAAA;AAC5B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare function serveWebsocket(): {
|
|
2
|
-
wss: import("ws").Server<typeof import("ws").
|
|
2
|
+
wss: import("ws").Server<typeof import("ws").WebSocket, typeof import("node:http").IncomingMessage>;
|
|
3
3
|
sendReload: () => void;
|
|
4
4
|
};
|