diff --git a/package.json b/package.json index 554edaf5..d6a61f72 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,8 @@ }, "devDependencies": { "@nuxt/eslint-config": "^0.2.0", - "@nuxt/kit": "npm:@nuxt/kit-edge@3.7.2-28242195.9892d5cd", - "@nuxt/schema": "npm:@nuxt/schema-edge@3.7.2-28242195.9892d5cd", + "@nuxt/kit": "npm:@nuxt/kit-edge@3.7.2-28242618.3e1ad3e2", + "@nuxt/schema": "npm:@nuxt/schema-edge@3.7.2-28242618.3e1ad3e2", "@types/clear": "^0.1.2", "@types/flat": "^5.0.2", "@types/http-proxy": "^1.17.11", @@ -63,12 +63,12 @@ "http-proxy": "^1.18.1", "httpxy": "^0.1.5", "jiti": "^1.20.0", - "listhen": "^1.5.0", + "listhen": "^1.5.1", "magicast": "^0.2.10", "mlly": "^1.4.2", "mri": "^1.2.0", "nitropack": "^2.6.3", - "nuxt": "^3.7.1", + "nuxt": "^3.7.3", "nypm": "^0.3.3", "ofetch": "^1.3.3", "pathe": "^1.1.1", diff --git a/playground/modules/ws.ts b/playground/modules/ws.ts index f85bfa25..54047eb4 100644 --- a/playground/modules/ws.ts +++ b/playground/modules/ws.ts @@ -33,8 +33,8 @@ export default defineNuxtModule({ nuxt.hook('listen', (server) => { server.on('upgrade', (req, socket, head) => { - console.log(`[server] WebSocket upgrade for path: ${req.url}`) if (req.url === '/api/ws') { + console.log(`[server] WebSocket upgrade for path: ${req.url}`) return wss.handleUpgrade(req, socket, head, (ws) => { wss.emit('connection', ws, req) }) diff --git a/playground/server/ws.ts b/playground/server/ws.ts deleted file mode 100644 index ddfab27b..00000000 --- a/playground/server/ws.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { WebSocketServer } from 'ws' - -// https://github.com/websockets/ws - -export const wss = new WebSocketServer({ - port: 8080, -}) - -wss.on('connection', (ws) => { - ws.on('error', console.error) - ws.on('message', (data) => { - console.log('[wss] received: %s', data) - }) - ws.send('🏓 pong') -}) - -wss.on('listening', () => { - const port = (wss.address() as { port: number }).port - console.log(` ➜ WSS: \`ws://localhost:${port}/ws\`\n`) -}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 067f4145..415bf115 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,11 +14,11 @@ devDependencies: specifier: ^0.2.0 version: 0.2.0(eslint@8.49.0) '@nuxt/kit': - specifier: npm:@nuxt/kit-edge@3.7.2-28242195.9892d5cd - version: /@nuxt/kit-edge@3.7.2-28242195.9892d5cd(rollup@3.29.1) + specifier: npm:@nuxt/kit-edge@3.7.2-28242618.3e1ad3e2 + version: /@nuxt/kit-edge@3.7.2-28242618.3e1ad3e2(rollup@3.29.1) '@nuxt/schema': - specifier: npm:@nuxt/schema-edge@3.7.2-28242195.9892d5cd - version: /@nuxt/schema-edge@3.7.2-28242195.9892d5cd(rollup@3.29.1) + specifier: npm:@nuxt/schema-edge@3.7.2-28242618.3e1ad3e2 + version: /@nuxt/schema-edge@3.7.2-28242618.3e1ad3e2(rollup@3.29.1) '@types/clear': specifier: ^0.1.2 version: 0.1.2 @@ -98,8 +98,8 @@ devDependencies: specifier: ^1.20.0 version: 1.20.0 listhen: - specifier: ^1.5.0 - version: 1.5.0 + specifier: ^1.5.1 + version: 1.5.1 magicast: specifier: ^0.2.10 version: 0.2.10 @@ -113,8 +113,8 @@ devDependencies: specifier: ^2.6.3 version: 2.6.3 nuxt: - specifier: ^3.7.1 - version: 3.7.1(@types/node@20.6.0)(eslint@8.49.0)(rollup@3.29.1)(typescript@5.2.2) + specifier: ^3.7.3 + version: 3.7.3(@types/node@20.6.0)(eslint@8.49.0)(rollup@3.29.1)(typescript@5.2.2) nypm: specifier: ^0.3.3 version: 0.3.3 @@ -869,8 +869,8 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@eslint-community/regexpp@4.8.0: - resolution: {integrity: sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==} + /@eslint-community/regexpp@4.8.1: + resolution: {integrity: sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true @@ -1027,8 +1027,8 @@ packages: eslint: ^8.48.0 dependencies: '@rushstack/eslint-patch': 1.3.3 - '@typescript-eslint/eslint-plugin': 6.6.0(@typescript-eslint/parser@6.6.0)(eslint@8.49.0)(typescript@5.2.2) - '@typescript-eslint/parser': 6.6.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/eslint-plugin': 6.7.0(@typescript-eslint/parser@6.7.0)(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.7.0(eslint@8.49.0)(typescript@5.2.2) eslint: 8.49.0 eslint-plugin-vue: 9.17.0(eslint@8.49.0) typescript: 5.2.2 @@ -1036,11 +1036,11 @@ packages: - supports-color dev: true - /@nuxt/kit-edge@3.7.2-28242195.9892d5cd(rollup@3.29.1): - resolution: {integrity: sha512-TAnhzAw8iMw+8OApisxA7pghAlkfXBoKo4aQJSquA7yxDIkGHsIm0vNKAFEciEzuHobgfO+oYeRmhnPBHn4+RQ==} + /@nuxt/kit-edge@3.7.2-28242618.3e1ad3e2(rollup@3.29.1): + resolution: {integrity: sha512-E0Ccw6RG0xDn72EjEyu9E6Q5tENn3nHrnkwxToThW6tkjv4qq43P0L8FSfA4SnkohejIOMyZxNglPtikUkAh/Q==} engines: {node: ^14.18.0 || >=16.10.0} dependencies: - '@nuxt/schema': /@nuxt/schema-edge@3.7.2-28242195.9892d5cd(rollup@3.29.1) + '@nuxt/schema': /@nuxt/schema-edge@3.7.2-28242618.3e1ad3e2(rollup@3.29.1) c12: 1.4.2 consola: 3.2.3 defu: 6.1.2 @@ -1063,11 +1063,11 @@ packages: - supports-color dev: true - /@nuxt/kit@3.7.1(rollup@3.29.1): - resolution: {integrity: sha512-8k4q+92qLz5z7RdSOKrEJIjM63xXBg0z/WhTtZgXv1R5ULZ77usdTMjQYhQ+Kgd1NMkpIXeKaAO6903xrSt53Q==} + /@nuxt/kit@3.7.3(rollup@3.29.1): + resolution: {integrity: sha512-bhP02i6CNti15Z4ix3LpR3fd1ANtTcpfS3CDSaCja24hDt3UxIasyp52mqD9LRC+OxrUVHJziB18EwUtS6RLDQ==} engines: {node: ^14.18.0 || >=16.10.0} dependencies: - '@nuxt/schema': 3.7.1(rollup@3.29.1) + '@nuxt/schema': 3.7.3(rollup@3.29.1) c12: 1.4.2 consola: 3.2.3 defu: 6.1.2 @@ -1090,8 +1090,8 @@ packages: - supports-color dev: true - /@nuxt/schema-edge@3.7.2-28242195.9892d5cd(rollup@3.29.1): - resolution: {integrity: sha512-ZwRLEb7Lwx2m0KippQAqjYWw+GGHIp9wZyy4o2NyFCoWMG36POjiafLmXc7XmvNglVoUIWwk67LT210hVsYoTA==} + /@nuxt/schema-edge@3.7.2-28242618.3e1ad3e2(rollup@3.29.1): + resolution: {integrity: sha512-neJcMby1aDiJl9GQhbziWME5KpTKScW+xolOujqyh8hNAcjNswhBZNlOsBTz+j6p3s0wbEzBpF9GWhfckQ/cjg==} engines: {node: ^14.18.0 || >=16.10.0} dependencies: '@nuxt/ui-templates': 1.3.1 @@ -1109,8 +1109,8 @@ packages: - supports-color dev: true - /@nuxt/schema@3.7.1(rollup@3.29.1): - resolution: {integrity: sha512-+0W/oos7Ktm3eTwQ/78PrcAObR0+yQzHIUzbQ7HgUnEEntRGVxp4hnfng5dmhvVjJqQvpuGZHa3yIS/g41vE6A==} + /@nuxt/schema@3.7.3(rollup@3.29.1): + resolution: {integrity: sha512-Uqe3Z9RnAROzv5owQo//PztD9d4csKK6ulwQO1hIAinCh34X7z2zrv9lhm14hlRYU1n7ISEi4S7UeHgL/r8d8A==} engines: {node: ^14.18.0 || >=16.10.0} dependencies: '@nuxt/ui-templates': 1.3.1 @@ -1132,7 +1132,7 @@ packages: resolution: {integrity: sha512-Cj+4sXjO5pZNW2sX7Y+djYpf4pZwgYF3rV/YHLWIOq9nAjo2UcDXjh1z7qnhkoUkvJN3lHnvhnCNhfAioe6k/A==} hasBin: true dependencies: - '@nuxt/kit': 3.7.1(rollup@3.29.1) + '@nuxt/kit': 3.7.3(rollup@3.29.1) chalk: 5.3.0 ci-info: 3.8.0 consola: 3.2.3 @@ -1161,13 +1161,13 @@ packages: resolution: {integrity: sha512-5gc02Pu1HycOVUWJ8aYsWeeXcSTPe8iX8+KIrhyEtEoOSkY0eMBuo0ssljB8wALuEmepv31DlYe5gpiRwkjESA==} dev: true - /@nuxt/vite-builder@3.7.1(@types/node@20.6.0)(eslint@8.49.0)(rollup@3.29.1)(typescript@5.2.2)(vue@3.3.4): - resolution: {integrity: sha512-/DJZNJ8al8P+O5GrmmgpUmtlaDKZfrm1bfGnjpsDR8VBN6dgxTvAYi5bCkxTLCbaJyXs4XcbYrAXCNSlsRrl3Q==} + /@nuxt/vite-builder@3.7.3(@types/node@20.6.0)(eslint@8.49.0)(rollup@3.29.1)(typescript@5.2.2)(vue@3.3.4): + resolution: {integrity: sha512-WbPYku1YKtdqLo5t3Vcs/2xOP8Es9K0OR0uGirdVMp74l4ZOMWBGSW9s4psiihjnNdHURdodD0cuE3tse9t7PA==} engines: {node: ^14.18.0 || >=16.10.0} peerDependencies: vue: ^3.3.4 dependencies: - '@nuxt/kit': 3.7.1(rollup@3.29.1) + '@nuxt/kit': 3.7.3(rollup@3.29.1) '@rollup/plugin-replace': 5.0.2(rollup@3.29.1) '@vitejs/plugin-vue': 4.3.4(vite@4.4.9)(vue@3.3.4) '@vitejs/plugin-vue-jsx': 3.0.2(vite@4.4.9)(vue@3.3.4) @@ -1559,8 +1559,8 @@ packages: '@types/node': 20.6.0 dev: true - /@typescript-eslint/eslint-plugin@6.6.0(@typescript-eslint/parser@6.6.0)(eslint@8.49.0)(typescript@5.2.2): - resolution: {integrity: sha512-CW9YDGTQnNYMIo5lMeuiIG08p4E0cXrXTbcZ2saT/ETE7dWUrNxlijsQeU04qAAKkILiLzdQz+cGFxCJjaZUmA==} + /@typescript-eslint/eslint-plugin@6.7.0(@typescript-eslint/parser@6.7.0)(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-gUqtknHm0TDs1LhY12K2NA3Rmlmp88jK9Tx8vGZMfHeNMLE3GH2e9TRub+y+SOjuYgtOmok+wt1AyDPZqxbNag==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -1570,12 +1570,12 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.8.0 - '@typescript-eslint/parser': 6.6.0(eslint@8.49.0)(typescript@5.2.2) - '@typescript-eslint/scope-manager': 6.6.0 - '@typescript-eslint/type-utils': 6.6.0(eslint@8.49.0)(typescript@5.2.2) - '@typescript-eslint/utils': 6.6.0(eslint@8.49.0)(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.6.0 + '@eslint-community/regexpp': 4.8.1 + '@typescript-eslint/parser': 6.7.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.7.0 + '@typescript-eslint/type-utils': 6.7.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.7.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.7.0 debug: 4.3.4 eslint: 8.49.0 graphemer: 1.4.0 @@ -1588,8 +1588,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.6.0(eslint@8.49.0)(typescript@5.2.2): - resolution: {integrity: sha512-setq5aJgUwtzGrhW177/i+DMLqBaJbdwGj2CPIVFFLE0NCliy5ujIdLHd2D1ysmlmsjdL2GWW+hR85neEfc12w==} + /@typescript-eslint/parser@6.7.0(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-jZKYwqNpNm5kzPVP5z1JXAuxjtl2uG+5NpaMocFPTNC2EdYIgbXIPImObOkhbONxtFTTdoZstLZefbaK+wXZng==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1598,10 +1598,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.6.0 - '@typescript-eslint/types': 6.6.0 - '@typescript-eslint/typescript-estree': 6.6.0(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.6.0 + '@typescript-eslint/scope-manager': 6.7.0 + '@typescript-eslint/types': 6.7.0 + '@typescript-eslint/typescript-estree': 6.7.0(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.7.0 debug: 4.3.4 eslint: 8.49.0 typescript: 5.2.2 @@ -1609,16 +1609,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager@6.6.0: - resolution: {integrity: sha512-pT08u5W/GT4KjPUmEtc2kSYvrH8x89cVzkA0Sy2aaOUIw6YxOIjA8ilwLr/1fLjOedX1QAuBpG9XggWqIIfERw==} + /@typescript-eslint/scope-manager@6.7.0: + resolution: {integrity: sha512-lAT1Uau20lQyjoLUQ5FUMSX/dS07qux9rYd5FGzKz/Kf8W8ccuvMyldb8hadHdK/qOI7aikvQWqulnEq2nCEYA==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.6.0 - '@typescript-eslint/visitor-keys': 6.6.0 + '@typescript-eslint/types': 6.7.0 + '@typescript-eslint/visitor-keys': 6.7.0 dev: true - /@typescript-eslint/type-utils@6.6.0(eslint@8.49.0)(typescript@5.2.2): - resolution: {integrity: sha512-8m16fwAcEnQc69IpeDyokNO+D5spo0w1jepWWY2Q6y5ZKNuj5EhVQXjtVAeDDqvW6Yg7dhclbsz6rTtOvcwpHg==} + /@typescript-eslint/type-utils@6.7.0(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-f/QabJgDAlpSz3qduCyQT0Fw7hHpmhOzY/Rv6zO3yO+HVIdPfIWhrQoAyG+uZVtWAIS85zAyzgAFfyEr+MgBpg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1627,8 +1627,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.6.0(typescript@5.2.2) - '@typescript-eslint/utils': 6.6.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/typescript-estree': 6.7.0(typescript@5.2.2) + '@typescript-eslint/utils': 6.7.0(eslint@8.49.0)(typescript@5.2.2) debug: 4.3.4 eslint: 8.49.0 ts-api-utils: 1.0.3(typescript@5.2.2) @@ -1637,13 +1637,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types@6.6.0: - resolution: {integrity: sha512-CB6QpJQ6BAHlJXdwUmiaXDBmTqIE2bzGTDLADgvqtHWuhfNP3rAOK7kAgRMAET5rDRr9Utt+qAzRBdu3AhR3sg==} + /@typescript-eslint/types@6.7.0: + resolution: {integrity: sha512-ihPfvOp7pOcN/ysoj0RpBPOx3HQTJTrIN8UZK+WFd3/iDeFHHqeyYxa4hQk4rMhsz9H9mXpR61IzwlBVGXtl9Q==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.6.0(typescript@5.2.2): - resolution: {integrity: sha512-hMcTQ6Al8MP2E6JKBAaSxSVw5bDhdmbCEhGW/V8QXkb9oNsFkA4SBuOMYVPxD3jbtQ4R/vSODBsr76R6fP3tbA==} + /@typescript-eslint/typescript-estree@6.7.0(typescript@5.2.2): + resolution: {integrity: sha512-dPvkXj3n6e9yd/0LfojNU8VMUGHWiLuBZvbM6V6QYD+2qxqInE7J+J/ieY2iGwR9ivf/R/haWGkIj04WVUeiSQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -1651,8 +1651,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.6.0 - '@typescript-eslint/visitor-keys': 6.6.0 + '@typescript-eslint/types': 6.7.0 + '@typescript-eslint/visitor-keys': 6.7.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -1663,8 +1663,8 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@6.6.0(eslint@8.49.0)(typescript@5.2.2): - resolution: {integrity: sha512-mPHFoNa2bPIWWglWYdR0QfY9GN0CfvvXX1Sv6DlSTive3jlMTUy+an67//Gysc+0Me9pjitrq0LJp0nGtLgftw==} + /@typescript-eslint/utils@6.7.0(eslint@8.49.0)(typescript@5.2.2): + resolution: {integrity: sha512-MfCq3cM0vh2slSikQYqK2Gq52gvOhe57vD2RM3V4gQRZYX4rDPnKLu5p6cm89+LJiGlwEXU8hkYxhqqEC/V3qA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1672,9 +1672,9 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.1 - '@typescript-eslint/scope-manager': 6.6.0 - '@typescript-eslint/types': 6.6.0 - '@typescript-eslint/typescript-estree': 6.6.0(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.7.0 + '@typescript-eslint/types': 6.7.0 + '@typescript-eslint/typescript-estree': 6.7.0(typescript@5.2.2) eslint: 8.49.0 semver: 7.5.4 transitivePeerDependencies: @@ -1682,50 +1682,50 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys@6.6.0: - resolution: {integrity: sha512-L61uJT26cMOfFQ+lMZKoJNbAEckLe539VhTxiGHrWl5XSKQgA0RTBZJW2HFPy5T0ZvPVSD93QsrTKDkfNwJGyQ==} + /@typescript-eslint/visitor-keys@6.7.0: + resolution: {integrity: sha512-/C1RVgKFDmGMcVGeD8HjKv2bd72oI1KxQDeY8uc66gw9R0OK0eMq48cA+jv9/2Ag6cdrsUGySm1yzYmfz0hxwQ==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.6.0 + '@typescript-eslint/types': 6.7.0 eslint-visitor-keys: 3.4.3 dev: true - /@unhead/dom@1.6.2: - resolution: {integrity: sha512-xOFZx0kAYdgXn17G1eNpGXPbClKGuzeFP40LHZG9PDxe8W2OVTAVlhPnamaPumwSYPcif0au6libawtp1bTvxA==} + /@unhead/dom@1.7.2: + resolution: {integrity: sha512-XQTBmVRP53170/YqdRTzuw/cs2lD2eoaFd28FZC2hLBpnrHsYZ8Wb0HSdHUF+HsKMT2ePANIB27HJNn08VjuXg==} dependencies: - '@unhead/schema': 1.6.2 - '@unhead/shared': 1.6.2 + '@unhead/schema': 1.7.2 + '@unhead/shared': 1.7.2 dev: true - /@unhead/schema@1.6.2: - resolution: {integrity: sha512-yOjL4i1nm7xQ8XWOhRnO/Uf66lIJP48D4lT+Fl1tPTw3isYzopKGqkyHRrVL5PqunC37jQnwBb/ZRqZr5uGLAg==} + /@unhead/schema@1.7.2: + resolution: {integrity: sha512-3KraAvRF14T/tLVJblDa91+L4VqjYK0GnvCUwo9ZHuRYoqK7fplZ7DYlvflC5rNS0vtsLHrFw7QFltczvIx75A==} dependencies: hookable: 5.5.3 zhead: 2.1.1 dev: true - /@unhead/shared@1.6.2: - resolution: {integrity: sha512-4+tvNwulccD1f4NOOU1SEpfJ1YepOsetaogZzPhwdHiUud/LV7YI37FAUx4dKfr3pn1/BeFzj4BH/aPOABRdyg==} + /@unhead/shared@1.7.2: + resolution: {integrity: sha512-txvsqfzqxqsFGjYai5PKIVErKlGPZUaTHugvpeH+syhqKnVbcc9DGOI3A5Tyh2Wsr8Hn63hZq6O2JZnab9Sj4Q==} dependencies: - '@unhead/schema': 1.6.2 + '@unhead/schema': 1.7.2 dev: true - /@unhead/ssr@1.6.2: - resolution: {integrity: sha512-LDdYpHADtjdUQpuBZ8rDoLunhqmQupv8CdDV9ibyz+axmSdNp42IhzL6BHw4Oi0j++PhCoZIbpVu425aMQ14pA==} + /@unhead/ssr@1.7.2: + resolution: {integrity: sha512-J38E7lpwJPVjbF9OU9GWMd5t4+sJhyIoUfdzXtclIpnKxpFRyyxf/pWIHI9vnEClpafNYCJe7rJ2rHLAudnNiQ==} dependencies: - '@unhead/schema': 1.6.2 - '@unhead/shared': 1.6.2 + '@unhead/schema': 1.7.2 + '@unhead/shared': 1.7.2 dev: true - /@unhead/vue@1.6.2(vue@3.3.4): - resolution: {integrity: sha512-EpcwH+90rLUfYudKYBOphfGoVSzPa2513+I5pAl+OYhZpzSkcvyLUonw+iN0KAKxbl9ELuK0Yu/MAaeOeD2C7g==} + /@unhead/vue@1.7.2(vue@3.3.4): + resolution: {integrity: sha512-TxIQe5IoeaIxN6pV8Rve7zi8Myw1DBoOIU74Tr7rLGVkgkoeVKS+gHYg4h85/R8uey0qfvyKSEX00OMt1gPSxg==} peerDependencies: vue: '>=2.7 || >=3' dependencies: - '@unhead/schema': 1.6.2 - '@unhead/shared': 1.6.2 + '@unhead/schema': 1.7.2 + '@unhead/shared': 1.7.2 hookable: 5.5.3 - unhead: 1.6.2 + unhead: 1.7.2 vue: 3.3.4 dev: true @@ -2085,7 +2085,7 @@ packages: postcss: ^8.1.0 dependencies: browserslist: 4.21.10 - caniuse-lite: 1.0.30001532 + caniuse-lite: 1.0.30001534 fraction.js: 4.3.6 normalize-range: 0.1.2 picocolors: 1.0.0 @@ -2158,8 +2158,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001532 - electron-to-chromium: 1.4.513 + caniuse-lite: 1.0.30001534 + electron-to-chromium: 1.4.520 node-releases: 2.0.13 update-browserslist-db: 1.0.11(browserslist@4.21.10) dev: true @@ -2235,13 +2235,13 @@ packages: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} dependencies: browserslist: 4.21.10 - caniuse-lite: 1.0.30001532 + caniuse-lite: 1.0.30001534 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 dev: true - /caniuse-lite@1.0.30001532: - resolution: {integrity: sha512-FbDFnNat3nMnrROzqrsg314zhqN5LGQ1kyyMk2opcrwGbVGpHRhgCWtAgD5YJUqNAiQ+dklreil/c3Qf1dfCTw==} + /caniuse-lite@1.0.30001534: + resolution: {integrity: sha512-vlPVrhsCS7XaSh2VvWluIQEzVhefrUQcEsQWSS5A5V+dM07uv1qHeQzAOTGIMy9i3e9bH15+muvI/UHojVgS/Q==} dev: true /chalk@2.4.2: @@ -2646,6 +2646,15 @@ packages: titleize: 3.0.0 dev: true + /define-data-property@1.1.0: + resolution: {integrity: sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.1 + gopd: 1.0.1 + has-property-descriptors: 1.0.0 + dev: true + /define-lazy-prop@2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} @@ -2656,10 +2665,11 @@ packages: engines: {node: '>=12'} dev: true - /define-properties@1.2.0: - resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} + /define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} dependencies: + define-data-property: 1.1.0 has-property-descriptors: 1.0.0 object-keys: 1.1.1 dev: true @@ -2767,8 +2777,8 @@ packages: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: true - /electron-to-chromium@1.4.513: - resolution: {integrity: sha512-cOB0xcInjm+E5qIssHeXJ29BaUyWpMyFKT5RB3bsLENDheCja0wMkHJyiPl0NBE/VzDI7JDuNEQWhe6RitEUcw==} + /electron-to-chromium@1.4.520: + resolution: {integrity: sha512-Frfus2VpYADsrh1lB3v/ft/WVFlVzOIm+Q0p7U7VqHI6qr7NWHYKe+Wif3W50n7JAFoBsWVsoU0+qDks6WQ60g==} dev: true /emoji-regex@8.0.0: @@ -2931,7 +2941,7 @@ packages: hasBin: true dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0) - '@eslint-community/regexpp': 4.8.0 + '@eslint-community/regexpp': 4.8.1 '@eslint/eslintrc': 2.1.2 '@eslint/js': 8.49.0 '@humanwhocodes/config-array': 0.11.11 @@ -3676,7 +3686,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 + define-properties: 1.2.1 dev: true /is-number@7.0.0: @@ -3835,8 +3845,8 @@ packages: engines: {node: '>=10'} dev: true - /listhen@1.5.0: - resolution: {integrity: sha512-qiCsszmva2NnayRCNV7G5TZz0AUQcCfJOhwlEDL58TXebt9nEHxYamsW0qvg88hTDwO/zm0YlU0YOzOx/FMW5w==} + /listhen@1.5.1: + resolution: {integrity: sha512-w4gfu76ibnSZBqPCqYORE4ewufHevXe6s39iQhPrOxSl/HzujP9pM9i/oHqzGm2L776djMm5wSE/5kR75RNcbA==} hasBin: true dependencies: '@parcel/watcher': 2.3.0 @@ -4177,7 +4187,7 @@ packages: jiti: 1.20.0 klona: 2.0.6 knitwork: 1.0.0 - listhen: 1.5.0 + listhen: 1.5.1 magic-string: 0.30.3 mime: 3.0.0 mlly: 1.4.2 @@ -4185,7 +4195,7 @@ packages: node-fetch-native: 1.4.0 ofetch: 1.3.3 ohash: 1.1.3 - openapi-typescript: 6.5.5 + openapi-typescript: 6.6.1 pathe: 1.1.1 perfect-debounce: 1.0.0 pkg-types: 1.0.3 @@ -4315,16 +4325,16 @@ packages: boolbase: 1.0.0 dev: true - /nuxi@3.8.1: - resolution: {integrity: sha512-rR3QSdA8LK8hXn1wUkz8OjyNxT2LBCNDRj2RX29SpC68Gtwe5+m5n67OP3/aTGUbqRNvNmoBiDJ0vvuVaLUvHA==} + /nuxi@3.8.3: + resolution: {integrity: sha512-LS1KlxQhQDt+WREENAG44zfO91uiPYDcorQ7xlcaV0ejV65v7Eub94FTmJ6JNXL2boHhc+raODtJBClW2uYyJw==} engines: {node: ^14.18.0 || >=16.10.0} hasBin: true optionalDependencies: fsevents: 2.3.3 dev: true - /nuxt@3.7.1(@types/node@20.6.0)(eslint@8.49.0)(rollup@3.29.1)(typescript@5.2.2): - resolution: {integrity: sha512-y8so6b11dDnuOkjqls3WZToyKODmHFaEYVB/RitjMrkNCez68qGDBFtG+VLaO34I2IdsbugTzByXktEk4dbs9w==} + /nuxt@3.7.3(@types/node@20.6.0)(eslint@8.49.0)(rollup@3.29.1)(typescript@5.2.2): + resolution: {integrity: sha512-fh3l3PhL79pHJckHVGebTFYlqXDq1jHAXUcNmS3RTfmJRb1s4qi5kSRgmYUWEI5I4Iu+S0u8wWh2ChvnZMQRog==} engines: {node: ^14.18.0 || >=16.10.0} hasBin: true peerDependencies: @@ -4337,15 +4347,15 @@ packages: optional: true dependencies: '@nuxt/devalue': 2.0.2 - '@nuxt/kit': 3.7.1(rollup@3.29.1) - '@nuxt/schema': 3.7.1(rollup@3.29.1) + '@nuxt/kit': 3.7.3(rollup@3.29.1) + '@nuxt/schema': 3.7.3(rollup@3.29.1) '@nuxt/telemetry': 2.4.1(rollup@3.29.1) '@nuxt/ui-templates': 1.3.1 - '@nuxt/vite-builder': 3.7.1(@types/node@20.6.0)(eslint@8.49.0)(rollup@3.29.1)(typescript@5.2.2)(vue@3.3.4) + '@nuxt/vite-builder': 3.7.3(@types/node@20.6.0)(eslint@8.49.0)(rollup@3.29.1)(typescript@5.2.2)(vue@3.3.4) '@types/node': 20.6.0 - '@unhead/dom': 1.6.2 - '@unhead/ssr': 1.6.2 - '@unhead/vue': 1.6.2(vue@3.3.4) + '@unhead/dom': 1.7.2 + '@unhead/ssr': 1.7.2 + '@unhead/vue': 1.7.2(vue@3.3.4) '@vue/shared': 3.3.4 acorn: 8.10.0 c12: 1.4.2 @@ -4367,7 +4377,7 @@ packages: magic-string: 0.30.3 mlly: 1.4.2 nitropack: 2.6.3 - nuxi: 3.8.1 + nuxi: 3.8.3 nypm: 0.3.3 ofetch: 1.3.3 ohash: 1.1.3 @@ -4379,7 +4389,7 @@ packages: std-env: 3.4.3 strip-literal: 1.3.0 ufo: 1.3.0 - ultrahtml: 1.5.0 + ultrahtml: 1.5.2 uncrypto: 0.1.3 unctx: 2.3.1 unenv: 1.7.4 @@ -4444,7 +4454,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 + define-properties: 1.2.1 dev: true /object-keys@1.1.1: @@ -4457,7 +4467,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.2.0 + define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 dev: true @@ -4520,8 +4530,8 @@ packages: is-wsl: 2.2.0 dev: true - /openapi-typescript@6.5.5: - resolution: {integrity: sha512-pMsA8GrMQKtNOPPjKnJbDotA2UpKsIcTHecMw2Bl3M/2eWTVs8zAYBm/cgaE9Qz5GrcVCDIru9GQX/P9vxtUFg==} + /openapi-typescript@6.6.1: + resolution: {integrity: sha512-jx7bzR6FfkG21icjikrF0k6K8moNg93PuZlfc+zo4Enxwmyw6vAUh4Rl064JN35um/RV8ZX7ANnMrQW8gRsGsQ==} hasBin: true dependencies: ansi-colors: 4.1.3 @@ -5596,8 +5606,8 @@ packages: resolution: {integrity: sha512-bRn3CsoojyNStCZe0BG0Mt4Nr/4KF+rhFlnNXybgqt5pXHNFRlqinSoQaTrGyzE4X8aHplSb+TorH+COin9Yxw==} dev: true - /ultrahtml@1.5.0: - resolution: {integrity: sha512-f+Ogu3PdKlAAkNQf8esSxlyXzHmK+S6ewuxvJV5qCcZqN7uTFaFIxQY8hoCfPD1zYaSrNZIj8dGr2+DZH355OQ==} + /ultrahtml@1.5.2: + resolution: {integrity: sha512-qh4mBffhlkiXwDAOxvSGxhL0QEQsTbnP9BozOK3OYPEGvPvdWzvAUaXNtUSMdNsKDtuyjEbyVUPFZ52SSLhLqw==} dev: true /unbuild@2.0.0(typescript@5.2.2): @@ -5669,12 +5679,12 @@ packages: pathe: 1.1.1 dev: true - /unhead@1.6.2: - resolution: {integrity: sha512-vAkjsjs6SPq/LHzuxOgyNvR4LsGau3CRKke9A6ErQEFm8mNKf50WIyd//ZNEBx8Zg+Iyn7FHyYZdgzpdPwC+Mw==} + /unhead@1.7.2: + resolution: {integrity: sha512-dyfo7TIVk/uu0/yM34VH4vif7GUCWQwUho5TqQiEtHo7yycT0cZz0Xa51thlc8DHV/TsJ42fAqUhhkMgfj6Gaw==} dependencies: - '@unhead/dom': 1.6.2 - '@unhead/schema': 1.6.2 - '@unhead/shared': 1.6.2 + '@unhead/dom': 1.7.2 + '@unhead/schema': 1.7.2 + '@unhead/shared': 1.7.2 hookable: 5.5.3 dev: true @@ -5780,7 +5790,7 @@ packages: destr: 2.0.1 h3: 1.8.1 ioredis: 5.3.2 - listhen: 1.5.0 + listhen: 1.5.1 lru-cache: 10.0.1 mri: 1.2.0 node-fetch-native: 1.4.0 diff --git a/src/commands/dev.ts b/src/commands/dev.ts index 0aa1aad5..96bf02bb 100644 --- a/src/commands/dev.ts +++ b/src/commands/dev.ts @@ -225,17 +225,13 @@ function _resolveListenOptions( nuxtOptions: NuxtOptions, args: ParsedArgs, ): Partial { - // TODO: Default host in schema should be undefined - const _devServerConfig = - nuxtOptions._layers?.[0].config?.devServer || nuxtOptions.devServer || {} - const _port = args.port ?? args.p ?? process.env.NUXT_PORT ?? process.env.NITRO_PORT ?? process.env.PORT ?? - _devServerConfig.port + nuxtOptions.devServer.port const _hostname = typeof args.host === 'string' @@ -244,7 +240,9 @@ function _resolveListenOptions( process.env.NUXT_HOST ?? process.env.NITRO_HOST ?? process.env.HOST ?? - _devServerConfig.host + // TODO: Default host in schema should be undefined instead of '' + nuxtOptions._layers?.[0].config?.devServer?.host ?? + undefined const _public: boolean | undefined = args.public ?? @@ -257,8 +255,8 @@ function _resolveListenOptions( (args.sslCert as string) || process.env.NUXT_SSL_CERT || process.env.NITRO_SSL_CERT || - (typeof _devServerConfig.https !== 'boolean' && - _devServerConfig.https?.cert) || + (typeof nuxtOptions.devServer.https !== 'boolean' && + nuxtOptions.devServer.https?.cert) || '' const _httpsKey = @@ -266,12 +264,13 @@ function _resolveListenOptions( (args.sslKey as string) || process.env.NUXT_SSL_KEY || process.env.NITRO_SSL_KEY || - (typeof _devServerConfig.https !== 'boolean' && - _devServerConfig.https?.key) || + (typeof nuxtOptions.devServer.https !== 'boolean' && + nuxtOptions.devServer.https?.key) || '' const httpsEnabled = - args.https == true || (args.https === undefined && !!_devServerConfig.https) + args.https == true || + (args.https === undefined && !!nuxtOptions.devServer.https) const _listhenOptions = parseListhenArgs({ ...args, @@ -282,7 +281,7 @@ function _resolveListenOptions( }) const httpsOptions = httpsEnabled && { - ...(_devServerConfig.https as HTTPSOptions), + ...(nuxtOptions.devServer.https as HTTPSOptions), ...(_listhenOptions.https as HTTPSOptions), }