Skip to content

Commit 1fdea43

Browse files
committed
refactor(preview):
1. update version of dependencies 2. refactor on start function and on stop function
1 parent 5f98449 commit 1fdea43

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed

bun.lockb

-1.24 KB
Binary file not shown.

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "elysiajs-nuxt",
3-
"version": "0.3.10",
3+
"version": "0.3.11",
44
"license": "MIT",
55
"author": "CHANG, TZU-YEN <try_love_tom@alljoint.tw> (https://github.com/trylovetom)",
66
"homepage": "https://github.com/trylovetom/elysiajs-nuxt",
@@ -20,22 +20,22 @@
2020
"tool:lint": "prettier '**/*' --check --ignore-unknown && eslint '**/*.{js,jsx,ts,tsx,vue}'"
2121
},
2222
"peerDependencies": {
23-
"elysia": "^0.8.8",
24-
"nuxt": "^3.9.1",
23+
"elysia": "^0.8.9",
24+
"nuxt": "^3.9.3",
2525
"typescript": "^5.3.3"
2626
},
2727
"devDependencies": {
2828
"@nuxtjs/eslint-config-typescript": "^12.1.0",
2929
"@types/bun": "latest",
30-
"@typescript-eslint/eslint-plugin": "^6.17.0",
31-
"@typescript-eslint/parser": "^6.17.0",
32-
"elysia": "^0.8.8",
30+
"@typescript-eslint/eslint-plugin": "^6.19.1",
31+
"@typescript-eslint/parser": "^6.19.1",
32+
"elysia": "^0.8.9",
3333
"eslint": "^8.56.0",
3434
"eslint-config-prettier": "^9.1.0",
35-
"eslint-plugin-prettier": "^5.1.2",
35+
"eslint-plugin-prettier": "^5.1.3",
3636
"nitropack": "^2.8.1",
37-
"nuxt": "^3.9.1",
38-
"prettier": "^3.1.1",
37+
"nuxt": "^3.9.3",
38+
"prettier": "^3.2.4",
3939
"prettier-package-json": "^2.8.0",
4040
"typescript": "^5.3.3"
4141
},

preview/bun.lockb

-17 KB
Binary file not shown.

preview/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212
"tool:lint": "prettier '**/*' --check --ignore-unknown && eslint '**/*.{js,jsx,ts,tsx,vue}'"
1313
},
1414
"dependencies": {
15-
"elysia": "^0.8.8",
15+
"elysia": "^0.8.9",
1616
"elysiajs-nuxt": "link:elysiajs-nuxt"
1717
},
1818
"devDependencies": {
19-
"@elysiajs/eden": "^0.8.0",
20-
"@nuxt/devtools": "^1.0.6",
19+
"@elysiajs/eden": "^0.8.1",
20+
"@nuxt/devtools": "^1.0.8",
2121
"@nuxtjs/eslint-config-typescript": "^12.1.0",
22-
"@typescript-eslint/eslint-plugin": "^6.17.0",
23-
"@typescript-eslint/parser": "^6.17.0",
22+
"@typescript-eslint/eslint-plugin": "^6.19.1",
23+
"@typescript-eslint/parser": "^6.19.1",
2424
"eslint": "^8.56.0",
2525
"eslint-config-prettier": "^9.1.0",
26-
"eslint-plugin-prettier": "^5.1.2",
27-
"nuxt": "^3.9.1",
26+
"eslint-plugin-prettier": "^5.1.3",
27+
"nuxt": "^3.9.3",
2828
"prettier-package-json": "^2.8.0",
2929
"typescript": "^5.3.3"
3030
}

preview/src-server/index.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
import { Elysia } from 'elysia'
22
import elysiaNuxt from 'elysiajs-nuxt'
33

4+
const detail = `[${import.meta.file}]:`
45
const application = new Elysia()
5-
.onStart(function onStart(app) {
6+
.onStart(function onStart({ server }) {
67
const startAt = new Date()
78
console.info(
8-
`[${import.meta.file}]: server started at ${startAt.toISOString()} (${app
9-
.server?.hostname}:${app.server?.port}).`
9+
`${detail} server started at ${startAt.toISOString()} (${server?.url}).`
1010
)
1111
})
1212
.onStop(function onStop() {
1313
const startAt = new Date()
14-
console.info(
15-
`[${import.meta.file}]: server stop at ${startAt.toISOString()}.`
16-
)
14+
console.info(`${detail} server stop at ${startAt.toISOString()}.`)
1715
})
1816
.use(elysiaNuxt)
1917
.get('/api/message', () => ({ message: 'THIS IS THE WAY!' }))

0 commit comments

Comments
 (0)