@runcore-sh/runcore 0.5.1 → 0.5.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.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmXH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AA2qMD,iBAAe,KAAK,CAAC,IAAI,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,iBAAiB,EAAE,QAAQ,CAAA;CAAE,iBA6tBxE;AAED,8EAA8E;AAC9E,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkXH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AA2qMD,iBAAe,KAAK,CAAC,IAAI,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,iBAAiB,EAAE,QAAQ,CAAA;CAAE,iBA6tBxE;AAED,8EAA8E;AAC9E,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
package/dist/server.js CHANGED
@@ -134,7 +134,6 @@ let _webhooksTwilio = null;
134
134
  let _resendWebhooks = null;
135
135
  let _servicesWhatsapp = null;
136
136
  import { initLLMCache, shutdownLLMCache, getCacheDiagnostics } from "./cache/llm-cache.js";
137
- import { createWebhookRoute, verifyWebhookRequest } from "./webhooks/mount.js";
138
137
  let _webhooksMount = null;
139
138
  let _webhooksConfig = null;
140
139
  let _webhooksRegistry = null;
@@ -3070,7 +3069,7 @@ app.get("/api/slack/users/:id", async (c) => {
3070
3069
  });
3071
3070
  // Slack events: receive Events API webhooks from Slack
3072
3071
  // Routed through the generic webhook system with challenge response handling.
3073
- app.post("/api/slack/events", createWebhookRoute({
3072
+ app.post("/api/slack/events", _webhooksMount.createWebhookRoute({
3074
3073
  provider: "slack-events",
3075
3074
  transformResponse: (result, c) => {
3076
3075
  // Slack URL verification: return challenge for initial handshake
@@ -3082,14 +3081,14 @@ app.post("/api/slack/events", createWebhookRoute({
3082
3081
  }));
3083
3082
  // Slack slash commands: routed through the generic webhook system.
3084
3083
  // The slack-commands provider handles URL-encoded form → SlackSlashCommand mapping.
3085
- app.post("/api/slack/commands", createWebhookRoute({ provider: "slack-commands" }));
3084
+ app.post("/api/slack/commands", _webhooksMount.createWebhookRoute({ provider: "slack-commands" }));
3086
3085
  // Slack interactions: routed through the generic webhook system.
3087
3086
  // The slack-interactions provider handles extracting JSON from the form "payload" field.
3088
- app.post("/api/slack/interactions", createWebhookRoute({ provider: "slack-interactions" }));
3087
+ app.post("/api/slack/interactions", _webhooksMount.createWebhookRoute({ provider: "slack-interactions" }));
3089
3088
  // --- Resend inbound email ---
3090
3089
  // Resend webhook: receive inbound emails via Svix-signed webhooks (direct path).
3091
3090
  // Uses generic webhook route with Svix signature verification.
3092
- app.post("/api/resend/webhooks", createWebhookRoute({ provider: "resend" }));
3091
+ app.post("/api/resend/webhooks", _webhooksMount.createWebhookRoute({ provider: "resend" }));
3093
3092
  // Resend inbox: manually trigger inbox check (pulls from Worker KV).
3094
3093
  app.post("/api/resend/check-inbox", async (c) => {
3095
3094
  const sessionId = c.req.query("sessionId");
@@ -3121,7 +3120,7 @@ app.post("/api/twilio/whatsapp", async (c) => {
3121
3120
  const proto = headers["x-forwarded-proto"] ?? "https";
3122
3121
  const host = headers["host"] ?? "localhost";
3123
3122
  const url = `${proto}://${host}/api/twilio/whatsapp`;
3124
- const verification = verifyWebhookRequest("twilio", rawBody, headers, { url, params });
3123
+ const verification = _webhooksMount.verifyWebhookRequest("twilio", rawBody, headers, { url, params });
3125
3124
  if (!verification.valid) {
3126
3125
  return c.text(verification.error ?? "Invalid signature", 401);
3127
3126
  }