@e280/hottie 0.1.2 → 0.1.4

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,15 +16,14 @@ 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
 
23
24
 
24
25
 
25
- <br/>
26
+ <br/><br/>
26
27
 
27
- ## 🧑‍💻 by e280
28
- reward us with github stars
29
- build with us at https://e280.org/ but only if you're cool
28
+ 🧑‍💻 *https://e280.org/*
30
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e280/hottie",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
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.3.1",
24
+ "@e280/stz": "^0.3.9",
25
25
  "chokidar": "^5.0.0",
26
26
  "http-proxy-3": "^1.23.3",
27
27
  "sirv": "^3.0.2",
28
- "ws": "^8.21.0"
28
+ "ws": "^8.21.1"
29
29
  },
30
30
  "devDependencies": {
31
- "@types/node": "^26.1.0",
31
+ "@types/node": "^26.1.2",
32
32
  "@types/ws": "^8.18.1",
33
- "typescript": "^6.0.3"
33
+ "typescript": "^7.0.2"
34
34
  },
35
35
  "keywords": [
36
36
  "http server",
@@ -20,7 +20,7 @@ export const logIntro = (options: Options) => {
20
20
  ].join(" "))
21
21
 
22
22
  console.log(
23
- pipe(`https://localhost:${options.port}/`)
23
+ pipe(`http://localhost:${options.port}/`)
24
24
  .to(color.cyan)
25
25
  .done(),
26
26
  )
@@ -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, {target})
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
 
@@ -12,7 +12,7 @@ export const logIntro = (options) => {
12
12
  .to(color.dim)
13
13
  .done(),
14
14
  ].join(" "));
15
- console.log(pipe(`https://localhost:${options.port}/`)
15
+ console.log(pipe(`http://localhost:${options.port}/`)
16
16
  .to(color.cyan)
17
17
  .done());
18
18
  const info = options.cold
@@ -1 +1 @@
1
- {"version":3,"file":"intro.js","sourceRoot":"","sources":["../../../s/fns/log/intro.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAGjC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,OAAgB,EAAE,EAAE;IAE5C,OAAO,CAAC,GAAG,CAAC;QACX,IAAI;QAEJ,IAAI,CAAC,QAAQ,CAAC;aACZ,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC;aACvB,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;aACd,IAAI,EAAE;QAER,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;aAChB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;aACjB,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC;aACb,IAAI,EAAE;KACR,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;IAEZ,OAAO,CAAC,GAAG,CACV,IAAI,CAAC,qBAAqB,OAAO,CAAC,IAAI,GAAG,CAAC;SACxC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;SACd,IAAI,EAAE,CACR,CAAA;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SACb,IAAI,EAAE,CACR,CAAA;IAED,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;AAChB,CAAC,CAAA"}
@@ -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, { target });
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,EAAE,CAAA;IAClC,MAAM,UAAU,GAAe,KAAK,EAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAC,MAAM,EAAC,CAAC,CAAA;IAChF,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,CAAA;AAC5B,CAAC"}
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").default, typeof import("node:http").IncomingMessage>;
2
+ wss: import("ws").Server<typeof import("ws").WebSocket, typeof import("node:http").IncomingMessage>;
3
3
  sendReload: () => void;
4
4
  };