Skip to content

chore: make req optional when calling usage from cloudflare #6556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

arcoraven
Copy link
Contributor

@arcoraven arcoraven commented Mar 26, 2025

PR-Codex overview

This PR focuses on modifying the handling of the authInput parameter in the sendUsageV2Events function, allowing for an optional req property and updating how clientId and secretKey are extracted from authInput.

Detailed summary

  • Changed authInput to make req optional.
  • Updated extraction of clientId and secretKey to handle cases where req is provided.
  • Added a conditional check for authInput.req before extracting authorization data.
  • Adjusted header creation to account for the presence of req.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@arcoraven arcoraven requested a review from a team as a code owner March 26, 2025 03:53
Copy link

changeset-bot bot commented Mar 26, 2025

⚠️ No Changeset found

Latest commit: 80d0766

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Mar 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www 🔄 Building (Inspect) Visit Preview 💬 Add feedback Mar 26, 2025 3:53am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Mar 26, 2025 3:53am
login ⬜️ Skipped (Inspect) Mar 26, 2025 3:53am
thirdweb_playground ⬜️ Skipped (Inspect) Mar 26, 2025 3:53am
wallet-ui ⬜️ Skipped (Inspect) Mar 26, 2025 3:53am

Copy link
Contributor

graphite-app bot commented Mar 26, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@arcoraven arcoraven merged commit e0e3182 into main Mar 26, 2025
28 of 29 checks passed
@arcoraven arcoraven deleted the ph/optional-cfworker-req branch March 26, 2025 03:57
Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 47.56 KB (0%) 952 ms (0%) 150 ms (+121.53% 🔺) 1.2 s
thirdweb (cjs) 127.31 KB (0%) 2.6 s (0%) 216 ms (+32.67% 🔺) 2.8 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 113 ms (0%) 74 ms (+1515.94% 🔺) 186 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 39 ms (+2338.3% 🔺) 49 ms
thirdweb/react (minimal + tree-shaking) 19.34 KB (+0.18% 🔺) 387 ms (+0.18% 🔺) 104 ms (+714.01% 🔺) 491 ms

Copy link

codecov bot commented Mar 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.07%. Comparing base (fe8b3ce) to head (80d0766).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6556   +/-   ##
=======================================
  Coverage   55.07%   55.07%           
=======================================
  Files         883      883           
  Lines       55362    55362           
  Branches     3789     3789           
=======================================
  Hits        30491    30491           
  Misses      24776    24776           
  Partials       95       95           
Flag Coverage Δ
packages 55.07% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant