martinklepsch
martinklepsch
BABetter Auth
Created by Highlighted on 2/23/2025 in #help
Better-auth and e2e tests
Also trying to do e2e tests here - I think this would make a great addition to the docs. Unfortunately couldn't find much beyond this thread. What I'm specifically wondering: - I use GitHub auth, but probably don't want to do that in an e2e test. What are my options? - Do I need to seed the db outside of better-auth or is there some way to do it in one step using a better-auth API?
8 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workers-help
Error with Astro + Workflows
when running the astro build first and then running wrangler dev I get the following error:
✘ [ERROR] Your Worker depends on the following Workflows, which are not exported in your entrypoint file: MyWorkflow.

You should export these objects from your entrypoint, dist/_worker.js/index.js.
✘ [ERROR] Your Worker depends on the following Workflows, which are not exported in your entrypoint file: MyWorkflow.

You should export these objects from your entrypoint, dist/_worker.js/index.js.
5 replies
CDCloudflare Developers
Created by bkyerv on 2/13/2025 in #workers-help
Best practices for customizing Worker entry point in Astro + Cloudflare Workers static assets setup
Also wondering something similar bit around Workflows and exposing Workflow classes to the worker runtime
2 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workers-help
Error with Astro + Workflows
I realized I was missing this config:
"main": "./dist/_worker.js/index.js",
"assets": {
"binding": "ASSETS",
"directory": "./dist"
},
"main": "./dist/_worker.js/index.js",
"assets": {
"binding": "ASSETS",
"directory": "./dist"
},
The error message has gotten a lot more useful though:
Worker "workflows:workflows-starter"'s binding "USER_WORKFLOW" refers to service "core:user:ctxs-ai" with a named entrypoint "MyWorkflow", but "core:user:ctxs-ai" has no such named entrypoint.
Worker "workflows:workflows-starter"'s binding "USER_WORKFLOW" refers to service "core:user:ctxs-ai" with a named entrypoint "MyWorkflow", but "core:user:ctxs-ai" has no such named entrypoint.
So it looks like the issue is the missing MyWorkflow export in ./dist/_worker.js/index.js. Is that something that is possible with Astro?
5 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workers-help
Error with Astro + Workflows
Something similar was asked here, which was the only google result I could find, no anwer unfortunately: https://www.answeroverflow.com/m/1301257946075758602
5 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workflows
I'm running into a somewhat frustrating
Thanks @Matt Silverlock -- appreciate it!
16 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workflows
I'm running into a somewhat frustrating
ah, pass as apiToken:
const client = new Cloudflare({
apiToken: process.env.CLOUDFLARE_API_KEY!,
});
const client = new Cloudflare({
apiToken: process.env.CLOUDFLARE_API_KEY!,
});
16 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workflows
I'm running into a somewhat frustrating
And the docs don't mention the bearer auth
16 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workflows
I'm running into a somewhat frustrating
I tried the obvious of not passing an email but that didn't seem to work
16 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workflows
I'm running into a somewhat frustrating
That does work! thanks! Now I guess I'm still wondering, is there a way to use this with the cloudflare package?
16 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workflows
I'm running into a somewhat frustrating
I created an API token in the dashboard but can't seem to auth against any workflow APIs
16 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workflows
I'm running into a somewhat frustrating
@Matt Silverlock - hope you don't mind the ping — is there anything I'm missing here?
16 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workflows
I'm running into a somewhat frustrating
Same error:
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/workflows \
-H "X-Auth-Email: $CLOUDFLARE_EMAIL" \
-H "Authorization: Bearer $CLOUDFLARE_API_KEY"
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/workflows \
-H "X-Auth-Email: $CLOUDFLARE_EMAIL" \
-H "Authorization: Bearer $CLOUDFLARE_API_KEY"
also tried without the email
16 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workflows
I'm running into a somewhat frustrating
I double checked the values are present by printing them in the same script
16 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workflows
I'm running into a somewhat frustrating
but I keep ketting this 400 error:
{"success":false,"errors":[{"code":10001,"message":"Unable to authenticate request"}]}
{"success":false,"errors":[{"code":10001,"message":"Unable to authenticate request"}]}
16 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workflows
I'm running into a somewhat frustrating
I have the following permissions for the API KEY: Workers Tail:Read, Workers Scripts:Edit, Workers Scripts:Read
16 replies
CDCloudflare Developers
Created by martinklepsch on 4/9/2025 in #workflows
I'm running into a somewhat frustrating
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/workflows \
-H "X-Auth-Email: $CLOUDFLARE_EMAIL" \
-H "X-Auth-Key: $CLOUDFLARE_API_KEY"
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/workflows \
-H "X-Auth-Email: $CLOUDFLARE_EMAIL" \
-H "X-Auth-Key: $CLOUDFLARE_API_KEY"
16 replies
CDCloudflare Developers
Created by martinklepsch on 4/7/2025 in #d1-database
Hey all, I saw @yusukebe's recent Hono
in the link the prompt is for a "classifieds app" but that could be adjusted to anything (probably good to keep it simple for the initial setup step though)
1 replies