Skip to content

Commit 83a56d5

Browse files
chore(deps): update all non-major dependencies (#121)
1 parent 9e5d85b commit 83a56d5

File tree

5 files changed

+1979
-3672
lines changed

5 files changed

+1979
-3672
lines changed

Diff for: Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG NODE=node:20.14.0-alpine
1+
ARG NODE=node:20.15.1-alpine
22

33
FROM $NODE as build
44

Diff for: package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,30 @@
2828
"zod": "^3.23.8"
2929
},
3030
"devDependencies": {
31-
"@antfu/eslint-config": "^2.21.1",
31+
"@antfu/eslint-config": "^2.22.0",
3232
"@commitlint/cli": "^19.3.0",
3333
"@commitlint/config-conventional": "^19.2.2",
3434
"@hywax/vitepress-yandex-metrika": "^0.4.0",
3535
"@nuxt/devtools": "latest",
36-
"@nuxtjs/color-mode": "^3.4.1",
36+
"@nuxtjs/color-mode": "^3.4.2",
3737
"@nuxtjs/i18n": "^8.3.1",
38-
"@nuxtjs/tailwindcss": "^6.12.0",
39-
"@types/node": "^20.14.2",
40-
"@vite-pwa/nuxt": "^0.8.0",
38+
"@nuxtjs/tailwindcss": "^6.12.1",
39+
"@types/node": "^20.14.10",
40+
"@vite-pwa/nuxt": "^0.9.1",
4141
"changelogen": "^0.5.5",
42-
"eslint": "^9.5.0",
42+
"eslint": "^9.6.0",
4343
"husky": "^9.0.11",
4444
"lint-staged": "^15.2.7",
45-
"nuxt": "^3.12.2",
45+
"nuxt": "^3.12.3",
4646
"nuxt-icon": "^0.6.10",
47-
"typescript": "^5.4.5",
48-
"vitepress": "^1.2.3",
49-
"vue-tsc": "^2.0.21"
47+
"typescript": "^5.5.3",
48+
"vitepress": "^1.3.0",
49+
"vue-tsc": "^2.0.26"
5050
},
5151
"resolutions": {
5252
"rollup": "npm:@rollup/wasm-node"
5353
},
5454
"lint-staged": {
5555
"*.ts": "yarn run lint"
5656
}
57-
}
57+
}

Diff for: src/composables/useWebsocket.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ export type WsClientReturn = Pick<UseWebSocketReturn<string>, 'open' | 'close' |
66
off: SendHook
77
send: ReceiveHook
88
}
9-
export type SendHook = <E extends SendMessage['event']>(event: E, handler: (data: Omit<SendMessageMap[E], 'event'>) => any) => void
9+
type SendHandler = <E extends SendMessage['event']>(data: Omit<SendMessageMap[E], 'event'>) => any
10+
11+
export type SendHook = <E extends SendMessage['event']>(event: E, handler: SendHandler) => void
1012
export type ReceiveHook = <E extends ReceivedMessage['event']>(event: E, handler: (data: Omit<ReceivedMessageMap[E], 'event'>) => any) => void
1113

1214
function createEventMessage<E extends SendMessage['event'] | ReceivedMessage['event']>(event: E, data: Record<string, any> = {}): string {
@@ -17,7 +19,7 @@ export function wsClient(): WsClientReturn {
1719
const url = useRequestURL()
1820
const isSecure = url.protocol === 'https:'
1921
const endpoint = `${(isSecure ? 'wss://' : 'ws://') + url.host}/api/websocket`
20-
const sendHandlers = new Map<SendMessage['event'], Set<Function>>()
22+
const sendHandlers = new Map<SendMessage['event'], Set<SendHandler>>()
2123
const { status, open, close, send: _send } = useWebSocket(endpoint, {
2224
heartbeat: {
2325
message: createEventMessage('ping'),
@@ -33,13 +35,13 @@ export function wsClient(): WsClientReturn {
3335
},
3436
})
3537

36-
const off: SendHook = (event, handler) => {
38+
const off: SendHook = (event, handler: SendHandler) => {
3739
if (sendHandlers.has(event)) {
3840
sendHandlers.get(event)?.delete(handler)
3941
}
4042
}
4143

42-
const on: SendHook = (event, handler) => {
44+
const on: SendHook = (event, handler: SendHandler) => {
4345
if (!sendHandlers.has(event)) {
4446
sendHandlers.set(event, new Set())
4547
}

Diff for: src/utils/validation.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ export function isUrl(ur: string) {
33
const _url = new URL(ur)
44
return true
55
} catch (_) {
6-
return false
6+
console.error('Invalid URL:', _)
77
}
8+
9+
return false
810
}

0 commit comments

Comments
 (0)