From c8b8cf4eba5f454d2d853e50faa3a8d8d3148443 Mon Sep 17 00:00:00 2001 From: Nick Randall Date: Wed, 3 Apr 2024 00:28:27 -0700 Subject: [PATCH] fix(jws): Only import necessary helper (not all helpers) (#2458) * Update jws.ts This prevents a bundler from pulling in all helpers, including the "ssg" adapter which is not compatible with Cloudflare workers as it creates a "Request" in the global scope. * denoify --- deno_dist/utils/jwt/jws.ts | 2 +- src/utils/jwt/jws.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deno_dist/utils/jwt/jws.ts b/deno_dist/utils/jwt/jws.ts index c49cae394..9578c68e2 100644 --- a/deno_dist/utils/jwt/jws.ts +++ b/deno_dist/utils/jwt/jws.ts @@ -1,4 +1,4 @@ -import { getRuntimeKey } from '../../helper.ts' +import { getRuntimeKey } from '../../helper/adapter/index.ts' import { decodeBase64 } from '../encode.ts' import type { SignatureAlgorithm } from './jwa.ts' import { JwtAlgorithmNotImplemented } from './types.ts' diff --git a/src/utils/jwt/jws.ts b/src/utils/jwt/jws.ts index 05f84ab81..2d130987a 100644 --- a/src/utils/jwt/jws.ts +++ b/src/utils/jwt/jws.ts @@ -1,4 +1,4 @@ -import { getRuntimeKey } from '../../helper' +import { getRuntimeKey } from '../../helper/adapter' import { decodeBase64 } from '../encode' import type { SignatureAlgorithm } from './jwa' import { JwtAlgorithmNotImplemented } from './types'