Skip to content

Commit

Permalink
chore: moved entry point
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Dec 2, 2024
1 parent 8161d7e commit 1334073
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 102 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/development-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:

- uses: oven-sh/setup-bun@v2

# bun run jest:test
- name: 'Resolve Project Dependencies Using Bun'
shell: pwsh
run: |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
bun install --frozen-lockfile
bun run jest:test
bun run build
bun rimraf node_modules
bun install --frozen-lockfile --production
Expand Down
Binary file modified bun.lockb
Binary file not shown.
98 changes: 0 additions & 98 deletions src/app.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/functions/http-trigger.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { app } from "@azure/functions";
import { azureHonoHandler } from "@marplex/hono-azurefunc-adapter";
import honoApp from "../app";
import { app as honoApp } from "../kernel";

app.http("http-trigger", {
methods: ["GET", "POST"],
Expand Down
3 changes: 1 addition & 2 deletions src/kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ app.post("/", async (ctx: Context) => {

// if running in Cloudflare Worker, handle the webhook in the background and return a response immediately
if (getRuntimeKey() === "workerd") {
const waitUntil = ctx.executionCtx.waitUntil;
waitUntil(eventHandler.webhooks.verifyAndReceive({ id, name: eventName, payload: await request.text(), signature: signatureSha256 }));
ctx.executionCtx.waitUntil(eventHandler.webhooks.verifyAndReceive({ id, name: eventName, payload: await request.text(), signature: signatureSha256 }));
} else {
await eventHandler.webhooks.verifyAndReceive({ id, name: eventName, payload: await request.text(), signature: signatureSha256 });
}
Expand Down

0 comments on commit 1334073

Please sign in to comment.