example(cloudflare-worker-auth): use the real @alchemy.run/pr-package library#633
Closed
Mkassabov wants to merge 1 commit into
Closed
example(cloudflare-worker-auth): use the real @alchemy.run/pr-package library#633Mkassabov wants to merge 1 commit into
Mkassabov wants to merge 1 commit into
Conversation
Contributor
|
Install the packages built from this commit: alchemy bun add alchemy@https://pkg.ing/alchemy/2652a32@alchemy.run/better-auth bun add @alchemy.run/better-auth@https://pkg.ing/@alchemy.run/better-auth/2652a32@alchemy.run/pr-package bun add @alchemy.run/pr-package@https://pkg.ing/@alchemy.run/pr-package/2652a32 |
… library Replace the self-contained worker with `PrPackage.handler()` and source the bearer token from `PrPackage.AuthTokenValue`, so the example exercises the actual library code path the Redacted bearer-token fix lives in. The integ test drives the real bearer-protected routes (PUT /projects/:pkg/packages, DELETE .../tags/:tag): valid token -> 200, invalid / missing / "<redacted>" -> 401. Bumps the distilled submodule pin to include the Cloudflare error-class tree-shaking fix (distilled#352) — without it the Worker bundle keeps a dangling `import "@distilled.cloud/cloudflare/flagship"` and Cloudflare rejects the upload with ScriptModuleNotFound.
e94778d to
2652a32
Compare
Contributor
Author
|
Superseded by #638 — renamed the example from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Convert the
cloudflare-worker-authexample from a hand-rolled worker to the real@alchemy.run/pr-packagelibrary, so the integration test exercises the actual library code path (the worker bearer-token check + theAuthTokenValuestack output) rather than a copy of it.The integ test drives the real bearer-protected routes:
Distilled pin
Bumps the
distilledsubmodule to include the Cloudflare error-class tree-shaking fix (distilled#352). Without it the worker bundle keeps a danglingimport "@distilled.cloud/cloudflare/flagship"(pulled in transitively by thealchemy/Cloudflarebarrel) and Cloudflare rejects the upload withScriptModuleNotFound.The pin points at the merged commit on distilled
main, which is one commit ahead of thev0.25.2tag — it is not yet a published release. Re-pin to the tagged release once distilled cutsv0.25.3, before the nextalchemynpm publish.