@@ -19,7 +19,7 @@ import generateETag from 'etag'
19
19
import getAvailablePort from 'get-port'
20
20
import httpProxy from 'http-proxy'
21
21
import { createProxyMiddleware } from 'http-proxy-middleware'
22
- import jwtDecode from 'jwt-decode'
22
+ import { jwtDecode } from 'jwt-decode'
23
23
import { locatePath } from 'locate-path'
24
24
import { Match } from 'netlify-redirector'
25
25
import pFilter from 'p-filter'
@@ -38,13 +38,13 @@ import { DEFAULT_FUNCTION_URL_EXPRESSION } from '../lib/functions/registry.js'
38
38
import { initializeProxy as initializeImageProxy , isImageRequest } from '../lib/images/proxy.js'
39
39
import renderErrorTemplate from '../lib/render-error-template.js'
40
40
41
- import { NETLIFYDEVLOG , NETLIFYDEVWARN , log , chalk } from './command-helpers.js'
41
+ import { NETLIFYDEVLOG , NETLIFYDEVWARN , chalk , log } from './command-helpers.js'
42
42
import createStreamPromise from './create-stream-promise.js'
43
- import { headersForPath , parseHeaders , NFFunctionName , NFRequestID , NFFunctionRoute } from './headers.js'
43
+ import { NFFunctionName , NFFunctionRoute , NFRequestID , headersForPath , parseHeaders } from './headers.js'
44
44
import { generateRequestID } from './request-id.js'
45
45
import { createRewriter , onChanges } from './rules-proxy.js'
46
46
import { signRedirect } from './sign-redirect.js'
47
- import { Rewriter , Request , ServerSettings } from './types.js'
47
+ import { Request , Rewriter , ServerSettings } from './types.js'
48
48
49
49
const gunzip = util . promisify ( zlib . gunzip )
50
50
const brotliDecompress = util . promisify ( zlib . brotliDecompress )
@@ -264,7 +264,6 @@ const serveRedirect = async function ({
264
264
if ( token ) {
265
265
let jwtValue = { }
266
266
try {
267
- // @ts -expect-error TS(2349) This expression is not callable
268
267
jwtValue = jwtDecode ( token ) || { }
269
268
} catch ( error ) {
270
269
// @ts -expect-error TS(2571) FIXME: Object is of type 'unknown'.
1 commit comments
github-actions[bot] commentedon May 16, 2024
📊 Benchmark results