htmx-router 2.1.1 → 2.1.2

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/dist/cli/index.js CHANGED
File without changes
@@ -65,7 +65,7 @@ export class HtmxRouterServer {
65
65
  return;
66
66
  }
67
67
  async transform(ctx, res) {
68
- if (this.#binding.transform.length < 0)
68
+ if (this.#binding.transform.length < 1)
69
69
  return res;
70
70
  ctx.timer.checkpoint("transform");
71
71
  for (const process of this.#binding.transform) {
package/dist/router.js CHANGED
@@ -189,7 +189,6 @@ class RouteLeaf {
189
189
  return null;
190
190
  if (jsx instanceof Response)
191
191
  return jsx;
192
- ctx.timer.checkpoint("render");
193
192
  const res = ctx.render(jsx);
194
193
  return html(res, { headers: ctx.headers });
195
194
  }
@@ -200,10 +199,8 @@ class RouteLeaf {
200
199
  let caught;
201
200
  if (jsx instanceof Response)
202
201
  caught = jsx;
203
- else {
204
- ctx.timer.checkpoint("render");
202
+ else
205
203
  caught = ctx.render(jsx);
206
- }
207
204
  if (caught instanceof Response) {
208
205
  caught.headers.set("X-Caught", "true");
209
206
  return caught;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "htmx-router",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "A lightweight SSR framework with server+client islands",
5
5
  "keywords": [ "htmx", "router", "client islands", "ssr", "vite" ],
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "build": "tsc"
9
9
  },
10
- "main": "./index.js",
10
+ "main": "./dist/index.js",
11
11
  "exports": {
12
12
  ".": "./dist/index.js",
13
13
  "./cookies": "./dist/cookies.js",
@@ -30,7 +30,7 @@
30
30
  "./internal/mount": "./dist/internal/mount.js"
31
31
  },
32
32
  "bin": {
33
- "htmx-router": "cli/index.js"
33
+ "htmx-router": "dist/cli/index.js"
34
34
  },
35
35
  "repository": {
36
36
  "type": "git",