charon-hooks 0.1.6 → 0.1.7

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.
@@ -1,5 +1,7 @@
1
1
  // src/server/app.ts
2
2
  import { Hono as Hono7 } from "hono";
3
+ import { dirname as dirname2, resolve as resolve3 } from "path";
4
+ import { fileURLToPath } from "url";
3
5
 
4
6
  // src/server/middleware/logger.ts
5
7
  import { createMiddleware } from "hono/factory";
@@ -736,7 +738,7 @@ async function startTunnel(config, port = 3e3) {
736
738
  }
737
739
  try {
738
740
  await ngrok.disconnect();
739
- await new Promise((resolve3) => setTimeout(resolve3, 1e3));
741
+ await new Promise((resolve4) => setTimeout(resolve4, 1e3));
740
742
  } catch {
741
743
  }
742
744
  listener = null;
@@ -1587,6 +1589,8 @@ async function tunnelProxyMiddleware(c, next) {
1587
1589
  }
1588
1590
 
1589
1591
  // src/server/app.ts
1592
+ var __dirname = dirname2(fileURLToPath(import.meta.url));
1593
+ var clientDir = resolve3(__dirname, "../client");
1590
1594
  var app = new Hono7();
1591
1595
  app.use("*", quietLogger);
1592
1596
  app.use("*", tunnelProxyMiddleware);
@@ -1596,8 +1600,8 @@ app.route("/api/sanitizers", sanitizersRoutes);
1596
1600
  app.route("/api/tunnel", tunnelRoutes);
1597
1601
  app.route("/api/webhook", webhookRoutes);
1598
1602
  app.route("/api/task", taskRoutes);
1599
- app.use("/*", serveStatic({ root: "./dist/client" }));
1600
- app.get("*", serveStatic({ path: "./dist/client/index.html" }));
1603
+ app.use("/*", serveStatic({ root: clientDir }));
1604
+ app.get("*", serveStatic({ path: resolve3(clientDir, "index.html") }));
1601
1605
 
1602
1606
  // src/server/init.ts
1603
1607
  async function initializeServices() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "charon-hooks",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Autonomous task triggering service - webhooks and cron to AI agents",
5
5
  "type": "module",
6
6
  "bin": {