Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(nuxi): replace lazyHandle to defineLazyHandler (#8049)
Browse files Browse the repository at this point in the history
  • Loading branch information
valcosmos committed Oct 9, 2022
1 parent 6d90466 commit c905a23
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/nuxi/package.json
Expand Up @@ -35,6 +35,7 @@
"execa": "^6.1.0",
"flat": "^5.0.2",
"giget": "^0.1.7",
"h3": "^0.7.21",
"jiti": "^1.16.0",
"listhen": "^0.3.4",
"mlly": "^0.5.16",
Expand Down
4 changes: 2 additions & 2 deletions packages/nuxi/src/commands/analyze.ts
@@ -1,6 +1,6 @@
import { promises as fsp } from 'node:fs'
import { join, resolve } from 'pathe'
import { createApp, lazyHandle } from 'h3'
import { createApp, defineLazyHandler } from 'h3'
import { listen } from 'listhen'
import { writeTypes } from '../utils/prepare'
import { loadKit } from '../utils/kit'
Expand Down Expand Up @@ -37,7 +37,7 @@ export default defineNuxtCommand({

const app = createApp()

const serveFile = (filePath: string) => lazyHandle(async () => {
const serveFile = (filePath: string) => defineLazyHandler(async () => {
const contents = await fsp.readFile(filePath, 'utf-8')
return (_req, res) => { res.end(contents) }
})
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Expand Up @@ -10470,6 +10470,7 @@ __metadata:
flat: ^5.0.2
fsevents: ~2.3.2
giget: ^0.1.7
h3: ^0.7.21
jiti: ^1.16.0
listhen: ^0.3.4
mlly: ^0.5.16
Expand Down

0 comments on commit c905a23

Please sign in to comment.