File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
packages/service-utils/src/cf-worker Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @thirdweb-dev/service-utils " : patch
3
+ ---
4
+
5
+ [ service-utils] remove unneeded cloudflare worker types
Original file line number Diff line number Diff line change 1
1
import type {
2
2
ExecutionContext ,
3
3
KVNamespace ,
4
+ Request ,
4
5
Response ,
5
6
} from "@cloudflare/workers-types" ;
6
- import type { Request } from "@cloudflare/workers-types" ;
7
7
import type { CoreServiceConfig , TeamAndProjectResponse } from "../core/api.js" ;
8
8
import { authorize } from "../core/authorize/index.js" ;
9
9
import type {
Original file line number Diff line number Diff line change 1
- import { Headers , type Request , fetch } from "@cloudflare/workers-types" ;
1
+ import type { Request } from "@cloudflare/workers-types" ;
2
2
import type { CoreAuthInput } from "../core/types.js" ;
3
3
import type {
4
4
ClientUsageV2Event ,
@@ -34,7 +34,7 @@ export async function sendUsageV2Events<T extends UsageV2Options>(
34
34
// Forward headers from the origin request.
35
35
// Determine endpoint and auth header based on provided credentials.
36
36
let url : string ;
37
- const headers = new Headers ( authInput . req . headers ) ;
37
+ const headers = new Headers ( Object . fromEntries ( authInput . req . headers ) ) ;
38
38
headers . set ( "Content-Type" , "application/json" ) ;
39
39
if ( serviceKey ) {
40
40
// If a service key is provided, call the non-public usage endpoint.
You can’t perform that action at this time.
0 commit comments