mirror of
https://github.com/SrIzan10/hctv.git
synced 2026-06-06 00:56:56 +00:00
feat: websocket implementation
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
"dependencies": {
|
||||
"@hctv/auth": "*",
|
||||
"@hctv/db": "*",
|
||||
"@hctv/hono-ws": "*",
|
||||
"@hono/node-server": "^1.14.0",
|
||||
"@hono/node-ws": "^1.1.0",
|
||||
"@oslojs/encoding": "^1.1.0",
|
||||
|
||||
@@ -1,41 +1,116 @@
|
||||
import { serve } from '@hono/node-server'
|
||||
import { createNodeWebSocket } from '@hono/node-ws'
|
||||
import { Hono } from 'hono'
|
||||
import { readFile } from 'node:fs/promises'
|
||||
import { lucia } from '@hctv/auth'
|
||||
import { getCookie } from 'hono/cookie'
|
||||
import { serve } from '@hono/node-server';
|
||||
import { createNodeWebSocket, type ModifiedWebSocket } from '@hctv/hono-ws';
|
||||
import { Hono } from 'hono';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import { lucia } from '@hctv/auth';
|
||||
import { getCookie } from 'hono/cookie';
|
||||
import { getPersonalChannel } from './utils/personalChannel.js';
|
||||
import { prisma } from '@hctv/db';
|
||||
|
||||
const threed = await readFile('./src/3d.txt', 'utf-8')
|
||||
const threed = await readFile('./src/3d.txt', 'utf-8');
|
||||
|
||||
const app = new Hono()
|
||||
const { injectWebSocket, upgradeWebSocket } = createNodeWebSocket({ app })
|
||||
const app = new Hono();
|
||||
const { injectWebSocket, upgradeWebSocket } = createNodeWebSocket({ app });
|
||||
|
||||
app.get('/', async (c) => {
|
||||
return c.text(threed)
|
||||
})
|
||||
app.get('/', async (c) => {
|
||||
return c.text(threed);
|
||||
});
|
||||
|
||||
app.get(
|
||||
'/ws',
|
||||
'/ws/:username',
|
||||
upgradeWebSocket((c) => ({
|
||||
// https://hono.dev/helpers/websocket
|
||||
async onOpen(evt, ws) {
|
||||
const token = getCookie(c, 'auth_session');
|
||||
if (!token) {
|
||||
ws.close();
|
||||
return;
|
||||
}
|
||||
|
||||
const { user } = await lucia.validateSession(token);
|
||||
if (!user) {
|
||||
ws.close();
|
||||
return;
|
||||
}
|
||||
|
||||
const personalChannel = await getPersonalChannel(user.id);
|
||||
if (!personalChannel) {
|
||||
ws.close();
|
||||
return;
|
||||
}
|
||||
|
||||
const { username } = c.req.param();
|
||||
ws.targetUsername = username;
|
||||
ws.user = user;
|
||||
ws.personalChannel = personalChannel;
|
||||
if (ws.raw) {
|
||||
ws.raw.targetUsername = username;
|
||||
// @ts-ignore
|
||||
ws.raw.user = user;
|
||||
ws.raw.personalChannel = personalChannel;
|
||||
}
|
||||
|
||||
await prisma.streamInfo.update({
|
||||
where: {
|
||||
username,
|
||||
},
|
||||
data: {
|
||||
viewers: {
|
||||
increment: 1,
|
||||
},
|
||||
},
|
||||
});
|
||||
},
|
||||
async onClose(evt, ws) {
|
||||
console.log('client disconnected');
|
||||
const streamInfo = await prisma.streamInfo.findUnique({
|
||||
where: {
|
||||
username: ws.targetUsername,
|
||||
},
|
||||
select: {
|
||||
viewers: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!streamInfo) return;
|
||||
|
||||
await prisma.streamInfo.update({
|
||||
where: {
|
||||
username: ws.targetUsername,
|
||||
},
|
||||
data: {
|
||||
viewers: streamInfo.viewers === 0 ? { set: 0 } : { decrement: 1 },
|
||||
},
|
||||
});
|
||||
},
|
||||
onMessage(evt, ws) {
|
||||
const msg = evt.data.toString();
|
||||
ws.wss.clients.forEach((c) => {
|
||||
const client = c as ModifiedWebSocket;
|
||||
if (client.readyState === client.OPEN && client.targetUsername === ws.targetUsername) {
|
||||
c.send(
|
||||
JSON.stringify({
|
||||
user: {
|
||||
id: ws.user.id,
|
||||
username: ws.personalChannel.name,
|
||||
pfpUrl: ws.user.pfpUrl,
|
||||
},
|
||||
message: msg,
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
}))
|
||||
)
|
||||
);
|
||||
|
||||
app.get('/authed', async (c) => {
|
||||
const token = getCookie(c, 'auth_session')
|
||||
if (!token) {
|
||||
return c.text('Unauthorized', 401)
|
||||
const server = serve(
|
||||
{
|
||||
fetch: app.fetch,
|
||||
port: 8000,
|
||||
},
|
||||
(info) => {
|
||||
console.log(`Server is running on http://localhost:${info.port}`);
|
||||
}
|
||||
const { user } = await lucia.validateSession(token)
|
||||
if (!user) {
|
||||
return c.text('Unauthorized', 401)
|
||||
}
|
||||
return c.json(user)
|
||||
})
|
||||
|
||||
serve({
|
||||
fetch: app.fetch,
|
||||
port: 8000,
|
||||
}, (info) => {
|
||||
console.log(`Server is running on http://localhost:${info.port}`)
|
||||
})
|
||||
);
|
||||
injectWebSocket(server);
|
||||
|
||||
17
apps/chat/src/utils/personalChannel.ts
Normal file
17
apps/chat/src/utils/personalChannel.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { prisma } from "@hctv/db";
|
||||
|
||||
export async function getPersonalChannel(id: string) {
|
||||
const db = await prisma.user.findUnique({
|
||||
where: {
|
||||
id,
|
||||
},
|
||||
select: {
|
||||
personalChannel: true,
|
||||
},
|
||||
});
|
||||
if (!db) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return db.personalChannel;
|
||||
}
|
||||
@@ -28,7 +28,7 @@ const nextConfig = {
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/api/chat/:path*',
|
||||
source: '/api/stream/chat/:path*',
|
||||
destination: `http://localhost:8000/:path*`,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
import { lucia } from '@hctv/auth';
|
||||
import { prisma } from '@hctv/db';
|
||||
import { resolveUserPersonalChannel } from '@/lib/db/resolve';
|
||||
import type { WebSocket } from 'ws';
|
||||
|
||||
export async function SOCKET(
|
||||
client: ExtendedWebSocket,
|
||||
request: import('http').IncomingMessage,
|
||||
server: import('ws').WebSocketServer
|
||||
) {
|
||||
const cookies = parseCookieString(request.headers.cookie!);
|
||||
const { user } = await lucia.validateSession(cookies.auth_session);
|
||||
if (!user) {
|
||||
client.close();
|
||||
return;
|
||||
}
|
||||
|
||||
const personalChannel = await resolveUserPersonalChannel(user.id);
|
||||
if (!personalChannel) {
|
||||
client.close();
|
||||
return;
|
||||
}
|
||||
|
||||
const url = new URL(request.url!, `http://${request.headers.host}`);
|
||||
const username = url.pathname.split('/').at(-1);
|
||||
client.targetUsername = username!;
|
||||
|
||||
await prisma.streamInfo.update({
|
||||
where: {
|
||||
username,
|
||||
},
|
||||
data: {
|
||||
viewers: {
|
||||
increment: 1,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
client.on('message', (message) => {
|
||||
const msg = message.toString();
|
||||
server.clients.forEach((c) => {
|
||||
const client = c as ExtendedWebSocket;
|
||||
if (client.readyState === client.OPEN && client.targetUsername === username) {
|
||||
c.send(
|
||||
JSON.stringify({
|
||||
user: {
|
||||
id: user.id,
|
||||
username: personalChannel.name,
|
||||
pfpUrl: user.pfpUrl,
|
||||
},
|
||||
message: msg,
|
||||
})
|
||||
);
|
||||
/* if (msg === 'BOMB') {
|
||||
for (let i = 0; i < 10000; i++) {
|
||||
c.send(JSON.stringify({
|
||||
user: {
|
||||
id: user.id,
|
||||
username: personalChannel.name,
|
||||
pfpUrl: user.pfpUrl,
|
||||
},
|
||||
message: 'HIIIII',
|
||||
}));
|
||||
}
|
||||
} */
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
client.on('close', async () => {
|
||||
console.log('client disconnected');
|
||||
const streamInfo = await prisma.streamInfo.findUnique({
|
||||
where: {
|
||||
username,
|
||||
},
|
||||
select: {
|
||||
viewers: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!streamInfo) return;
|
||||
|
||||
await prisma.streamInfo.update({
|
||||
where: {
|
||||
username,
|
||||
},
|
||||
data: {
|
||||
viewers: streamInfo.viewers === 0 ? { set: 0 } : { decrement: 1 },
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function parseCookieString(cookie: string) {
|
||||
return cookie.split(';').reduce((acc, cookie) => {
|
||||
const [key, value] = cookie.split('=');
|
||||
acc[key.trim()] = value;
|
||||
return acc;
|
||||
}, {} as Record<string, string>);
|
||||
}
|
||||
|
||||
interface ExtendedWebSocket extends WebSocket {
|
||||
targetUsername: string;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
import db from '@hctv/db';
|
||||
import { prisma } from '@hctv/db';
|
||||
import { resolveChannelNameId } from '@/lib/db/resolve';
|
||||
|
||||
export async function GET(
|
||||
@@ -15,7 +15,7 @@ export async function GET(
|
||||
|
||||
const channelId = await resolveChannelNameId(channel);
|
||||
|
||||
const count = await db.follow.count({
|
||||
const count = await prisma.follow.count({
|
||||
where: {
|
||||
channelId,
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function ChatPanel() {
|
||||
const socket = new WebSocket(
|
||||
`ws${window.location.protocol === 'https:' ? 's' : ''}://${
|
||||
window.location.host
|
||||
}/api/stream/chat/${username}`
|
||||
}/api/stream/chat/ws/${username}`
|
||||
);
|
||||
socketRef.current = socket;
|
||||
|
||||
@@ -62,7 +62,7 @@ export default function ChatPanel() {
|
||||
const socket = new WebSocket(
|
||||
`ws${window.location.protocol === 'https:' ? 's' : ''}://${
|
||||
window.location.host
|
||||
}/api/stream/chat/${username}`
|
||||
}/api/stream/chat/ws/${username}`
|
||||
);
|
||||
socket.onopen = () => {
|
||||
socket.send(message);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import db from '@hctv/db';
|
||||
import { prisma } from '@hctv/db';
|
||||
|
||||
export async function resolveChannelNameId(channelName: string) {
|
||||
const channel = await db.channel.findUnique({
|
||||
const channel = await prisma.channel.findUnique({
|
||||
where: {
|
||||
name: channelName,
|
||||
},
|
||||
@@ -15,7 +15,7 @@ export async function resolveChannelNameId(channelName: string) {
|
||||
}
|
||||
|
||||
export async function resolveUserPersonalChannel(userId: string) {
|
||||
const channel = await db.channel.findFirst({
|
||||
const channel = await prisma.channel.findFirst({
|
||||
where: {
|
||||
personalFor: {
|
||||
id: userId,
|
||||
|
||||
35
packages/hono-ws/README.md
Normal file
35
packages/hono-ws/README.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# WebSocket helper for Node.js
|
||||
|
||||
[](https://codecov.io/github/honojs/middleware)
|
||||
|
||||
A WebSocket helper for Node.js
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
import { createNodeWebSocket } from '@hono/node-ws'
|
||||
import { Hono } from 'hono'
|
||||
import { serve } from '@hono/node-server'
|
||||
|
||||
const app = new Hono()
|
||||
|
||||
const { injectWebSocket, upgradeWebSocket } = createNodeWebSocket({ app })
|
||||
|
||||
app.get(
|
||||
'/ws',
|
||||
upgradeWebSocket((c) => ({
|
||||
// https://hono.dev/helpers/websocket
|
||||
}))
|
||||
)
|
||||
|
||||
const server = serve(app)
|
||||
injectWebSocket(server)
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
Shotaro Nakamura <https://github.com/nakasyou>
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
38
packages/hono-ws/package.json
Normal file
38
packages/hono-ws/package.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "@hctv/hono-ws",
|
||||
"version": "1.1.0",
|
||||
"description": "Hono WebSocket helper for Node.js (in-house fork)",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsup ./src/index.ts --format esm,cjs --dts"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/honojs/middleware",
|
||||
"devDependencies": {
|
||||
"@types/ws": "^8",
|
||||
"tsup": "^8.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ws": "^8.17.0",
|
||||
"@hctv/db": "*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@hono/node-server": "^1.11.1",
|
||||
"hono": "^4.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.14.1"
|
||||
}
|
||||
}
|
||||
262
packages/hono-ws/src/index.ts
Normal file
262
packages/hono-ws/src/index.ts
Normal file
@@ -0,0 +1,262 @@
|
||||
import type { Hono } from 'hono';
|
||||
import type { WebSocket } from 'ws';
|
||||
import { WebSocketServer } from 'ws';
|
||||
import type { IncomingMessage } from 'http';
|
||||
import type { Server } from 'node:http';
|
||||
import type { Http2SecureServer, Http2Server } from 'node:http2';
|
||||
import type { Duplex } from 'node:stream';
|
||||
import type { Channel, User } from '@hctv/db';
|
||||
|
||||
/**
|
||||
* @link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent
|
||||
*/
|
||||
export const CloseEvent =
|
||||
globalThis.CloseEvent ??
|
||||
class extends Event {
|
||||
#eventInitDict;
|
||||
|
||||
constructor(type: string, eventInitDict: CloseEventInit = {}) {
|
||||
super(type, eventInitDict);
|
||||
this.#eventInitDict = eventInitDict;
|
||||
}
|
||||
|
||||
get wasClean(): boolean {
|
||||
return this.#eventInitDict.wasClean ?? false;
|
||||
}
|
||||
|
||||
get code(): number {
|
||||
return this.#eventInitDict.code ?? 0;
|
||||
}
|
||||
|
||||
get reason(): string {
|
||||
return this.#eventInitDict.reason ?? '';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Create WebSockets for Node.js
|
||||
* @param init Options
|
||||
* @returns NodeWebSocket
|
||||
*/
|
||||
export const createNodeWebSocket = (init: NodeWebSocketInit): NodeWebSocket => {
|
||||
const wss = new WebSocketServer({ noServer: true });
|
||||
const waiterMap = new Map<
|
||||
IncomingMessage,
|
||||
{ resolve: (ws: ModifiedWebSocket) => void; response: Response }
|
||||
>();
|
||||
|
||||
wss.on('connection', (ws, request) => {
|
||||
const waiter = waiterMap.get(request);
|
||||
if (waiter) {
|
||||
waiter.resolve(ws);
|
||||
waiterMap.delete(request);
|
||||
}
|
||||
});
|
||||
|
||||
const nodeUpgradeWebSocket = (request: IncomingMessage, response: Response) => {
|
||||
return new Promise<ModifiedWebSocket>((resolve) => {
|
||||
waiterMap.set(request, { resolve, response });
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
injectWebSocket(server) {
|
||||
server.on('upgrade', async (request, socket: Duplex, head) => {
|
||||
const url = new URL(request.url ?? '/', init.baseUrl ?? 'http://localhost');
|
||||
const headers = new Headers();
|
||||
for (const key in request.headers) {
|
||||
const value = request.headers[key];
|
||||
if (!value) {
|
||||
continue;
|
||||
}
|
||||
headers.append(key, Array.isArray(value) ? value[0] : value);
|
||||
}
|
||||
|
||||
const response = await init.app.request(
|
||||
url,
|
||||
{ headers: headers },
|
||||
{ incoming: request, outgoing: undefined }
|
||||
);
|
||||
|
||||
const waiter = waiterMap.get(request);
|
||||
if (!waiter || waiter.response !== response) {
|
||||
socket.end(
|
||||
'HTTP/1.1 400 Bad Request\r\n' +
|
||||
'Connection: close\r\n' +
|
||||
'Content-Length: 0\r\n' +
|
||||
'\r\n'
|
||||
);
|
||||
waiterMap.delete(request);
|
||||
return;
|
||||
}
|
||||
|
||||
wss.handleUpgrade(request, socket, head, (ws) => {
|
||||
wss.emit('connection', ws, request);
|
||||
});
|
||||
});
|
||||
},
|
||||
upgradeWebSocket: (createEvents) =>
|
||||
async function upgradeWebSocket(c, next) {
|
||||
if (c.req.header('upgrade')?.toLowerCase() !== 'websocket') {
|
||||
// Not websocket
|
||||
await next();
|
||||
return;
|
||||
}
|
||||
|
||||
const response = new Response();
|
||||
(async () => {
|
||||
const ws = await nodeUpgradeWebSocket(c.env.incoming, response);
|
||||
const events = await createEvents(c);
|
||||
|
||||
const ctx: ModifiedWSContext = {
|
||||
binaryType: 'arraybuffer',
|
||||
close(code, reason) {
|
||||
ws.close(code, reason);
|
||||
},
|
||||
protocol: ws.protocol,
|
||||
raw: ws,
|
||||
get readyState() {
|
||||
return ws.readyState;
|
||||
},
|
||||
send(source, opts) {
|
||||
ws.send(source, {
|
||||
compress: opts?.compress,
|
||||
});
|
||||
},
|
||||
url: new URL(c.req.url),
|
||||
wss,
|
||||
};
|
||||
events.onOpen?.(new Event('open'), ctx);
|
||||
ws.on('message', (data, isBinary) => {
|
||||
const datas = Array.isArray(data) ? data : [data];
|
||||
for (const data of datas) {
|
||||
events.onMessage?.(
|
||||
new MessageEvent('message', {
|
||||
data: isBinary ? data : data.toString('utf-8'),
|
||||
}),
|
||||
ctx
|
||||
);
|
||||
}
|
||||
});
|
||||
ws.on('close', () => {
|
||||
events.onClose?.(new CloseEvent('close'), ctx);
|
||||
});
|
||||
ws.on('error', (error) => {
|
||||
events.onError?.(
|
||||
new ErrorEvent('error', {
|
||||
error: error,
|
||||
}),
|
||||
ctx
|
||||
);
|
||||
});
|
||||
})();
|
||||
|
||||
return response;
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
// hono types file
|
||||
import type { Context, MiddlewareHandler } from 'hono';
|
||||
/**
|
||||
* WebSocket Event Listeners type
|
||||
*/
|
||||
export interface WSEvents {
|
||||
onOpen?: (evt: Event, ws: ModifiedWSContext) => void;
|
||||
onMessage?: (evt: MessageEvent<WSMessageReceive>, ws: ModifiedWSContext) => void;
|
||||
onClose?: (evt: CloseEvent, ws: ModifiedWSContext) => void;
|
||||
onError?: (evt: Event, ws: ModifiedWSContext) => void;
|
||||
}
|
||||
/**
|
||||
* Upgrade WebSocket Type
|
||||
*/
|
||||
export type UpgradeWebSocket<U = any, _WSEvents = WSEvents> = (
|
||||
createEvents: (c: Context) => _WSEvents | Promise<_WSEvents>,
|
||||
options?: U
|
||||
) => MiddlewareHandler<
|
||||
any,
|
||||
string,
|
||||
{
|
||||
outputFormat: 'ws';
|
||||
}
|
||||
>;
|
||||
/**
|
||||
* ReadyState for WebSocket
|
||||
*/
|
||||
export type WSReadyState = 0 | 1 | 2 | 3;
|
||||
/**
|
||||
* An argument for WSContext class
|
||||
*/
|
||||
export interface WSContextInit<T = unknown> {
|
||||
send(data: string | ArrayBuffer | Uint8Array, options: SendOptions): void;
|
||||
close(code?: number, reason?: string): void;
|
||||
raw?: T;
|
||||
readyState: WSReadyState;
|
||||
url?: string | URL | null;
|
||||
protocol?: string | null;
|
||||
}
|
||||
/**
|
||||
* Options for sending message
|
||||
*/
|
||||
export interface SendOptions {
|
||||
compress?: boolean;
|
||||
}
|
||||
/**
|
||||
* A context for controlling WebSockets
|
||||
*/
|
||||
export declare class WSContext<T = unknown> {
|
||||
constructor(init: WSContextInit<T>);
|
||||
send(source: string | ArrayBuffer | Uint8Array, options?: SendOptions): void;
|
||||
raw?: T;
|
||||
binaryType: BinaryType;
|
||||
get readyState(): WSReadyState;
|
||||
url: URL | null;
|
||||
protocol: string | null;
|
||||
close(code?: number, reason?: string): void;
|
||||
}
|
||||
export type WSMessageReceive = string | Blob | ArrayBufferLike;
|
||||
export declare const createWSMessageEvent: (
|
||||
source: WSMessageReceive
|
||||
) => MessageEvent<WSMessageReceive>;
|
||||
export interface WebSocketHelperDefineContext {}
|
||||
export type WebSocketHelperDefineHandler<U> = (
|
||||
c: Context,
|
||||
events: WSEvents,
|
||||
options?: U
|
||||
) => Promise<Response | void> | Response | void;
|
||||
/**
|
||||
* Create a WebSocket adapter/helper
|
||||
*/
|
||||
export declare const defineWebSocketHelper: <T = unknown, U = any>(
|
||||
handler: WebSocketHelperDefineHandler<U>
|
||||
) => UpgradeWebSocket<T, U>;
|
||||
|
||||
export interface NodeWebSocket {
|
||||
upgradeWebSocket: UpgradeWebSocket<ModifiedWebSocket>;
|
||||
injectWebSocket(server: Server | Http2Server | Http2SecureServer): void;
|
||||
}
|
||||
|
||||
export interface NodeWebSocketInit {
|
||||
app: Hono<any, any, any>;
|
||||
baseUrl?: string | URL;
|
||||
}
|
||||
|
||||
// Define the extended WebSocket context
|
||||
interface ModifiedWSContext extends WSContext<ModifiedWebSocket> {
|
||||
wss: WebSocketServer;
|
||||
targetUsername?: string;
|
||||
user?: any;
|
||||
personalChannel?: any;
|
||||
}
|
||||
|
||||
export interface ModifiedWebSocket extends WebSocket {
|
||||
targetUsername?: string;
|
||||
user?: User;
|
||||
personalChannel?: Channel;
|
||||
}
|
||||
|
||||
interface CloseEventInit extends EventInit {
|
||||
code?: number;
|
||||
reason?: string;
|
||||
wasClean?: boolean;
|
||||
}
|
||||
19
packages/hono-ws/tsconfig.json
Normal file
19
packages/hono-ws/tsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"declaration": true,
|
||||
"moduleResolution": "nodenext",
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": true,
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
]
|
||||
}
|
||||
7
packages/hono-ws/vitest.config.ts
Normal file
7
packages/hono-ws/vitest.config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { defineProject } from 'vitest/config'
|
||||
|
||||
export default defineProject({
|
||||
test: {
|
||||
globals: true,
|
||||
},
|
||||
})
|
||||
252
yarn.lock
252
yarn.lock
@@ -1439,6 +1439,101 @@
|
||||
resolved "https://registry.yarnpkg.com/@radix-ui/rect/-/rect-1.1.0.tgz#f817d1d3265ac5415dadc67edab30ae196696438"
|
||||
integrity sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==
|
||||
|
||||
"@rollup/rollup-android-arm-eabi@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.36.0.tgz#6229c36cddc172c468f53107f2b7aebe2585609b"
|
||||
integrity sha512-jgrXjjcEwN6XpZXL0HUeOVGfjXhPyxAbbhD0BlXUB+abTOpbPiN5Wb3kOT7yb+uEtATNYF5x5gIfwutmuBA26w==
|
||||
|
||||
"@rollup/rollup-android-arm64@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.36.0.tgz#d38163692d0729bd64a026c13749ecac06f847e8"
|
||||
integrity sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==
|
||||
|
||||
"@rollup/rollup-darwin-arm64@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.36.0.tgz#82601b8ff81f3dbaef28017aa3d0e9709edc99c0"
|
||||
integrity sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==
|
||||
|
||||
"@rollup/rollup-darwin-x64@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.36.0.tgz#0e961354fb2bf26d691810ca61dc861d9a1e94b2"
|
||||
integrity sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==
|
||||
|
||||
"@rollup/rollup-freebsd-arm64@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.36.0.tgz#6aee296cd6b8c39158d377c89b7e0cd0851dd7c7"
|
||||
integrity sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==
|
||||
|
||||
"@rollup/rollup-freebsd-x64@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.36.0.tgz#432e49d93942225ac1b4d98254a6fb6ca0afcd17"
|
||||
integrity sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==
|
||||
|
||||
"@rollup/rollup-linux-arm-gnueabihf@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.36.0.tgz#a66910c6c63b46d45f239528ad5509097f8df885"
|
||||
integrity sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==
|
||||
|
||||
"@rollup/rollup-linux-arm-musleabihf@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.36.0.tgz#1cfadc70d44501b0a58615a460cf1b6ec8cfddf3"
|
||||
integrity sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==
|
||||
|
||||
"@rollup/rollup-linux-arm64-gnu@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.36.0.tgz#d32e42b25216472dfdc5cb7df6a37667766d3855"
|
||||
integrity sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==
|
||||
|
||||
"@rollup/rollup-linux-arm64-musl@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.36.0.tgz#d742917d61880941be26ff8d3352d935139188b9"
|
||||
integrity sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==
|
||||
|
||||
"@rollup/rollup-linux-loongarch64-gnu@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.36.0.tgz#9ad12d1a5d3abf4ecb90fbe1a49249608cee8cbb"
|
||||
integrity sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==
|
||||
|
||||
"@rollup/rollup-linux-powerpc64le-gnu@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.36.0.tgz#c3ca6f5ce4a8b785dd450113660d9529a75fdf2a"
|
||||
integrity sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==
|
||||
|
||||
"@rollup/rollup-linux-riscv64-gnu@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.36.0.tgz#05eb5e71db5b5b1d1a3428265a63c5f6f8a1e4b8"
|
||||
integrity sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==
|
||||
|
||||
"@rollup/rollup-linux-s390x-gnu@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.36.0.tgz#6fa895f181fa6804bc6ca27c0e9a6823355436dd"
|
||||
integrity sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==
|
||||
|
||||
"@rollup/rollup-linux-x64-gnu@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.36.0.tgz#d2e69f7598c71f03287b763fdbefce4163f07419"
|
||||
integrity sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==
|
||||
|
||||
"@rollup/rollup-linux-x64-musl@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.36.0.tgz#9eb0075deaabf5d88a9dc8b61bd7bd122ac64ef9"
|
||||
integrity sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==
|
||||
|
||||
"@rollup/rollup-win32-arm64-msvc@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.36.0.tgz#bfda7178ed8cb8fa8786474a02eae9fc8649a74d"
|
||||
integrity sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==
|
||||
|
||||
"@rollup/rollup-win32-ia32-msvc@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.36.0.tgz#8e12739b9c43de8f0690b280c676af3de571cee0"
|
||||
integrity sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==
|
||||
|
||||
"@rollup/rollup-win32-x64-msvc@4.36.0":
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.36.0.tgz#88b23fe29d28fa647030b36e912c1b5b50831b1d"
|
||||
integrity sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==
|
||||
|
||||
"@rtsao/scc@^1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8"
|
||||
@@ -1478,6 +1573,11 @@
|
||||
dependencies:
|
||||
tslib "^2.4.0"
|
||||
|
||||
"@types/estree@1.0.6":
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50"
|
||||
integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==
|
||||
|
||||
"@types/json5@^0.0.29":
|
||||
version "0.0.29"
|
||||
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
|
||||
@@ -1515,7 +1615,7 @@
|
||||
"@types/prop-types" "*"
|
||||
csstype "^3.0.2"
|
||||
|
||||
"@types/ws@^8.18.0":
|
||||
"@types/ws@^8", "@types/ws@^8.18.0":
|
||||
version "8.18.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.18.0.tgz#8a2ec491d6f0685ceaab9a9b7ff44146236993b5"
|
||||
integrity sha512-8svvI3hMyvN0kKCJMvTJP/x6Y/EoQbepff882wL+Sn5QsXb3etnamgrJq4isrBxSJj5L2AuXcI0+bgkoAXGUJw==
|
||||
@@ -1953,6 +2053,13 @@ buffer@^6.0.3:
|
||||
base64-js "^1.3.1"
|
||||
ieee754 "^1.2.1"
|
||||
|
||||
bundle-require@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/bundle-require/-/bundle-require-5.1.0.tgz#8db66f41950da3d77af1ef3322f4c3e04009faee"
|
||||
integrity sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==
|
||||
dependencies:
|
||||
load-tsconfig "^0.2.3"
|
||||
|
||||
busboy@1.6.0:
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893"
|
||||
@@ -1960,6 +2067,11 @@ busboy@1.6.0:
|
||||
dependencies:
|
||||
streamsearch "^1.1.0"
|
||||
|
||||
cac@^6.7.14:
|
||||
version "6.7.14"
|
||||
resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959"
|
||||
integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==
|
||||
|
||||
call-bind-apply-helpers@^1.0.0, call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6"
|
||||
@@ -2078,6 +2190,13 @@ chokidar@^3.6.0:
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
chokidar@^4.0.3:
|
||||
version "4.0.3"
|
||||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-4.0.3.tgz#7be37a4c03c9aee1ecfe862a4a23b2c70c205d30"
|
||||
integrity sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==
|
||||
dependencies:
|
||||
readdirp "^4.0.1"
|
||||
|
||||
class-variance-authority@^0.7.1:
|
||||
version "0.7.1"
|
||||
resolved "https://registry.yarnpkg.com/class-variance-authority/-/class-variance-authority-0.7.1.tgz#4008a798a0e4553a781a57ac5177c9fb5d043787"
|
||||
@@ -2168,6 +2287,11 @@ concat-map@0.0.1:
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
|
||||
|
||||
consola@^3.4.0:
|
||||
version "3.4.2"
|
||||
resolved "https://registry.yarnpkg.com/consola/-/consola-3.4.2.tgz#5af110145397bb67afdab77013fdc34cae590ea7"
|
||||
integrity sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==
|
||||
|
||||
convert-source-map@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a"
|
||||
@@ -2561,7 +2685,7 @@ esbuild-register@3.6.0:
|
||||
dependencies:
|
||||
debug "^4.3.4"
|
||||
|
||||
"esbuild@>=0.12 <1", esbuild@~0.25.0:
|
||||
"esbuild@>=0.12 <1", esbuild@^0.25.0, esbuild@~0.25.0:
|
||||
version "0.25.1"
|
||||
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.1.tgz#a16b8d070b6ad4871935277bda6ccfe852e3fa2f"
|
||||
integrity sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==
|
||||
@@ -3545,6 +3669,11 @@ jose@^5.1.2:
|
||||
resolved "https://registry.yarnpkg.com/jose/-/jose-5.10.0.tgz#c37346a099d6467c401351a9a0c2161e0f52c4be"
|
||||
integrity sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==
|
||||
|
||||
joycon@^3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03"
|
||||
integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==
|
||||
|
||||
"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
@@ -3650,7 +3779,7 @@ levn@^0.4.1:
|
||||
prelude-ls "^1.2.1"
|
||||
type-check "~0.4.0"
|
||||
|
||||
lilconfig@^3.0.0, lilconfig@^3.1.3:
|
||||
lilconfig@^3.0.0, lilconfig@^3.1.1, lilconfig@^3.1.3:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.3.tgz#a1bcfd6257f9585bf5ae14ceeebb7b559025e4c4"
|
||||
integrity sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==
|
||||
@@ -3685,6 +3814,11 @@ livekit-server-sdk@^2.9.7:
|
||||
camelcase-keys "^9.0.0"
|
||||
jose "^5.1.2"
|
||||
|
||||
load-tsconfig@^0.2.3:
|
||||
version "0.2.5"
|
||||
resolved "https://registry.yarnpkg.com/load-tsconfig/-/load-tsconfig-0.2.5.tgz#453b8cd8961bfb912dea77eb6c168fe8cca3d3a1"
|
||||
integrity sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==
|
||||
|
||||
locate-path@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
|
||||
@@ -3702,6 +3836,11 @@ lodash.merge@^4.6.2:
|
||||
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
|
||||
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
|
||||
|
||||
lodash.sortby@^4.7.0:
|
||||
version "4.7.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
|
||||
integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==
|
||||
|
||||
log-symbols@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-5.1.0.tgz#a20e3b9a5f53fac6aeb8e2bb22c07cf2c8f16d93"
|
||||
@@ -4216,6 +4355,13 @@ postcss-load-config@^4.0.2:
|
||||
lilconfig "^3.0.0"
|
||||
yaml "^2.3.4"
|
||||
|
||||
postcss-load-config@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-6.0.1.tgz#6fd7dcd8ae89badcf1b2d644489cbabf83aa8096"
|
||||
integrity sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==
|
||||
dependencies:
|
||||
lilconfig "^3.1.1"
|
||||
|
||||
postcss-nested@^6.2.0:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-6.2.0.tgz#4c2d22ab5f20b9cb61e2c5c5915950784d068131"
|
||||
@@ -4382,6 +4528,11 @@ readable-stream@^3.4.0:
|
||||
string_decoder "^1.1.1"
|
||||
util-deprecate "^1.0.1"
|
||||
|
||||
readdirp@^4.0.1:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-4.1.2.tgz#eb85801435fbf2a7ee58f19e0921b068fc69948d"
|
||||
integrity sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==
|
||||
|
||||
readdirp@~3.6.0:
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
|
||||
@@ -4436,6 +4587,11 @@ resolve-from@^4.0.0:
|
||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
|
||||
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
|
||||
|
||||
resolve-from@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
|
||||
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
|
||||
|
||||
resolve-pkg-maps@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f"
|
||||
@@ -4479,6 +4635,34 @@ rimraf@^3.0.2:
|
||||
dependencies:
|
||||
glob "^7.1.3"
|
||||
|
||||
rollup@^4.34.8:
|
||||
version "4.36.0"
|
||||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.36.0.tgz#f40f4db47ba3b4f5846d32a47e580c0ed7cd8f02"
|
||||
integrity sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q==
|
||||
dependencies:
|
||||
"@types/estree" "1.0.6"
|
||||
optionalDependencies:
|
||||
"@rollup/rollup-android-arm-eabi" "4.36.0"
|
||||
"@rollup/rollup-android-arm64" "4.36.0"
|
||||
"@rollup/rollup-darwin-arm64" "4.36.0"
|
||||
"@rollup/rollup-darwin-x64" "4.36.0"
|
||||
"@rollup/rollup-freebsd-arm64" "4.36.0"
|
||||
"@rollup/rollup-freebsd-x64" "4.36.0"
|
||||
"@rollup/rollup-linux-arm-gnueabihf" "4.36.0"
|
||||
"@rollup/rollup-linux-arm-musleabihf" "4.36.0"
|
||||
"@rollup/rollup-linux-arm64-gnu" "4.36.0"
|
||||
"@rollup/rollup-linux-arm64-musl" "4.36.0"
|
||||
"@rollup/rollup-linux-loongarch64-gnu" "4.36.0"
|
||||
"@rollup/rollup-linux-powerpc64le-gnu" "4.36.0"
|
||||
"@rollup/rollup-linux-riscv64-gnu" "4.36.0"
|
||||
"@rollup/rollup-linux-s390x-gnu" "4.36.0"
|
||||
"@rollup/rollup-linux-x64-gnu" "4.36.0"
|
||||
"@rollup/rollup-linux-x64-musl" "4.36.0"
|
||||
"@rollup/rollup-win32-arm64-msvc" "4.36.0"
|
||||
"@rollup/rollup-win32-ia32-msvc" "4.36.0"
|
||||
"@rollup/rollup-win32-x64-msvc" "4.36.0"
|
||||
fsevents "~2.3.2"
|
||||
|
||||
rspack-resolver@^1.1.0:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/rspack-resolver/-/rspack-resolver-1.2.2.tgz#f4f8f740246c59bc83525f830aca628b71843e8a"
|
||||
@@ -4752,6 +4936,13 @@ source-map-js@^1.0.2, source-map-js@^1.2.1:
|
||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46"
|
||||
integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==
|
||||
|
||||
source-map@0.8.0-beta.0:
|
||||
version "0.8.0-beta.0"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.8.0-beta.0.tgz#d4c1bb42c3f7ee925f005927ba10709e0d1d1f11"
|
||||
integrity sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==
|
||||
dependencies:
|
||||
whatwg-url "^7.0.0"
|
||||
|
||||
source-map@~0.6.1:
|
||||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||
@@ -5023,7 +5214,12 @@ tiny-invariant@^1.3.3:
|
||||
resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz#46680b7a873a0d5d10005995eb90a70d74d60127"
|
||||
integrity sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==
|
||||
|
||||
tinyglobby@^0.2.12:
|
||||
tinyexec@^0.3.2:
|
||||
version "0.3.2"
|
||||
resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.2.tgz#941794e657a85e496577995c6eef66f53f42b3d2"
|
||||
integrity sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==
|
||||
|
||||
tinyglobby@^0.2.11, tinyglobby@^0.2.12:
|
||||
version "0.2.12"
|
||||
resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.12.tgz#ac941a42e0c5773bd0b5d08f32de82e74a1a61b5"
|
||||
integrity sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==
|
||||
@@ -5038,6 +5234,18 @@ to-regex-range@^5.0.1:
|
||||
dependencies:
|
||||
is-number "^7.0.0"
|
||||
|
||||
tr46@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09"
|
||||
integrity sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==
|
||||
dependencies:
|
||||
punycode "^2.1.0"
|
||||
|
||||
tree-kill@^1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc"
|
||||
integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==
|
||||
|
||||
ts-api-utils@^2.0.1:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.1.0.tgz#595f7094e46eed364c13fd23e75f9513d29baf91"
|
||||
@@ -5085,6 +5293,28 @@ tslib@2.8.1, tslib@^2.0.0, tslib@^2.0.1, tslib@^2.1.0, tslib@^2.4.0, tslib@^2.8.
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
|
||||
integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
|
||||
|
||||
tsup@^8.0.1:
|
||||
version "8.4.0"
|
||||
resolved "https://registry.yarnpkg.com/tsup/-/tsup-8.4.0.tgz#2fdf537e7abc8f1ccbbbfe4228f16831457d4395"
|
||||
integrity sha512-b+eZbPCjz10fRryaAA7C8xlIHnf8VnsaRqydheLIqwG/Mcpfk8Z5zp3HayX7GaTygkigHl5cBUs+IhcySiIexQ==
|
||||
dependencies:
|
||||
bundle-require "^5.1.0"
|
||||
cac "^6.7.14"
|
||||
chokidar "^4.0.3"
|
||||
consola "^3.4.0"
|
||||
debug "^4.4.0"
|
||||
esbuild "^0.25.0"
|
||||
joycon "^3.1.1"
|
||||
picocolors "^1.1.1"
|
||||
postcss-load-config "^6.0.1"
|
||||
resolve-from "^5.0.0"
|
||||
rollup "^4.34.8"
|
||||
source-map "0.8.0-beta.0"
|
||||
sucrase "^3.35.0"
|
||||
tinyexec "^0.3.2"
|
||||
tinyglobby "^0.2.11"
|
||||
tree-kill "^1.2.2"
|
||||
|
||||
tsx@^4.7.1:
|
||||
version "4.19.3"
|
||||
resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.19.3.tgz#2bdbcb87089374d933596f8645615142ed727666"
|
||||
@@ -5312,6 +5542,11 @@ web-streams-polyfill@^3.0.3:
|
||||
resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b"
|
||||
integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==
|
||||
|
||||
webidl-conversions@^4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
|
||||
integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==
|
||||
|
||||
webrtc-adapter@^9.0.1:
|
||||
version "9.0.1"
|
||||
resolved "https://registry.yarnpkg.com/webrtc-adapter/-/webrtc-adapter-9.0.1.tgz#d4efa22ca9604cb2c8cdb9e492815ba37acfa0b2"
|
||||
@@ -5331,6 +5566,15 @@ whatwg-mimetype@^4.0.0:
|
||||
resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz#bc1bf94a985dc50388d54a9258ac405c3ca2fc0a"
|
||||
integrity sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==
|
||||
|
||||
whatwg-url@^7.0.0:
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06"
|
||||
integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==
|
||||
dependencies:
|
||||
lodash.sortby "^4.7.0"
|
||||
tr46 "^1.0.1"
|
||||
webidl-conversions "^4.0.2"
|
||||
|
||||
which-boxed-primitive@^1.1.0, which-boxed-primitive@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz#d76ec27df7fa165f18d5808374a5fe23c29b176e"
|
||||
|
||||
Reference in New Issue
Block a user