正式回归 Node.js!
This commit is contained in:
14
.vscode/launch.json
vendored
Normal file
14
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
// 使用 IntelliSense 了解相关属性。
|
||||
// 悬停以查看现有属性的描述。
|
||||
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"command": "npm run build-client-and-server",
|
||||
"name": "Debug",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"deno.enable": true,
|
||||
"deno.enable": false,
|
||||
"deno.disablePaths": [
|
||||
"./thewhitesilk_data",
|
||||
"./client/mdui_patched"
|
||||
"./mdui_patched"
|
||||
]
|
||||
}
|
||||
@@ -8,29 +8,6 @@ import CallbackError from "./CallbackError.ts"
|
||||
|
||||
import Message from "./Message.ts"
|
||||
|
||||
import Chat from "./Chat.ts"
|
||||
import User from "./User.ts"
|
||||
import UserMySelf from "./UserMySelf.ts"
|
||||
import UserBean from "./bean/UserBean.ts"
|
||||
import ChatBean from "./bean/ChatBean.ts"
|
||||
import GroupSettingsBean from "./bean/GroupSettingsBean.ts"
|
||||
import JoinRequestBean from "./bean/JoinRequestBean.ts"
|
||||
import MessageBean from "./bean/MessageBean.ts"
|
||||
import RecentChatBean from "./bean/RecentChatBean.ts"
|
||||
|
||||
export {
|
||||
Chat,
|
||||
User,
|
||||
UserMySelf,
|
||||
|
||||
UserBean,
|
||||
ChatBean,
|
||||
MessageBean,
|
||||
RecentChatBean,
|
||||
JoinRequestBean,
|
||||
}
|
||||
export type { GroupSettingsBean }
|
||||
|
||||
export default class LingChairClient {
|
||||
declare client: Socket
|
||||
declare access_token: string
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"imports": {
|
||||
"socket.io-client": "npm:socket.io-client@4.8.1",
|
||||
"lingchair-internal-shared": "../internal-shared/mod.ts",
|
||||
"marked": "npm:marked@16.3.0"
|
||||
}
|
||||
}
|
||||
60
client-protocol/deno.lock
generated
60
client-protocol/deno.lock
generated
@@ -1,60 +0,0 @@
|
||||
{
|
||||
"version": "5",
|
||||
"specifiers": {
|
||||
"npm:socket.io-client@4.8.1": "4.8.1"
|
||||
},
|
||||
"npm": {
|
||||
"@socket.io/component-emitter@3.1.2": {
|
||||
"integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA=="
|
||||
},
|
||||
"debug@4.3.7": {
|
||||
"integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
|
||||
"dependencies": [
|
||||
"ms"
|
||||
]
|
||||
},
|
||||
"engine.io-client@6.6.3": {
|
||||
"integrity": "sha512-T0iLjnyNWahNyv/lcjS2y4oE358tVS/SYQNxYXGAJ9/GLgH4VCvOQ/mhTjqU88mLZCQgiG8RIegFHYCdVC+j5w==",
|
||||
"dependencies": [
|
||||
"@socket.io/component-emitter",
|
||||
"debug",
|
||||
"engine.io-parser",
|
||||
"ws",
|
||||
"xmlhttprequest-ssl"
|
||||
]
|
||||
},
|
||||
"engine.io-parser@5.2.3": {
|
||||
"integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q=="
|
||||
},
|
||||
"ms@2.1.3": {
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
||||
},
|
||||
"socket.io-client@4.8.1": {
|
||||
"integrity": "sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==",
|
||||
"dependencies": [
|
||||
"@socket.io/component-emitter",
|
||||
"debug",
|
||||
"engine.io-client",
|
||||
"socket.io-parser"
|
||||
]
|
||||
},
|
||||
"socket.io-parser@4.2.4": {
|
||||
"integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==",
|
||||
"dependencies": [
|
||||
"@socket.io/component-emitter",
|
||||
"debug"
|
||||
]
|
||||
},
|
||||
"ws@8.17.1": {
|
||||
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ=="
|
||||
},
|
||||
"xmlhttprequest-ssl@2.1.2": {
|
||||
"integrity": "sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ=="
|
||||
}
|
||||
},
|
||||
"workspace": {
|
||||
"dependencies": [
|
||||
"npm:socket.io-client@4.8.1"
|
||||
]
|
||||
}
|
||||
}
|
||||
25
client-protocol/main.ts
Normal file
25
client-protocol/main.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import Chat from "./Chat.ts"
|
||||
import User from "./User.ts"
|
||||
import UserMySelf from "./UserMySelf.ts"
|
||||
import UserBean from "./bean/UserBean.ts"
|
||||
import ChatBean from "./bean/ChatBean.ts"
|
||||
import GroupSettingsBean from "./bean/GroupSettingsBean.ts"
|
||||
import JoinRequestBean from "./bean/JoinRequestBean.ts"
|
||||
import MessageBean from "./bean/MessageBean.ts"
|
||||
import RecentChatBean from "./bean/RecentChatBean.ts"
|
||||
import LingChairClient from "./LingChairClient.ts"
|
||||
|
||||
export {
|
||||
LingChairClient,
|
||||
|
||||
Chat,
|
||||
User,
|
||||
UserMySelf,
|
||||
|
||||
UserBean,
|
||||
ChatBean,
|
||||
MessageBean,
|
||||
RecentChatBean,
|
||||
JoinRequestBean,
|
||||
}
|
||||
export type { GroupSettingsBean }
|
||||
10
client-protocol/package.json
Normal file
10
client-protocol/package.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "lingchair-client-protocol",
|
||||
"type": "module",
|
||||
"main": "./main.ts",
|
||||
"dependencies": {
|
||||
"lingchair-internal-shared": "*",
|
||||
"marked": "16.3.0",
|
||||
"socket.io-client": "4.8.1"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"name": "lingchair-client",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "npx vite build",
|
||||
@@ -14,7 +15,8 @@
|
||||
"marked": "16.3.0",
|
||||
"dompurify": "3.2.7",
|
||||
"pinch-zoom-element": "1.1.1",
|
||||
"ua-parser-js": "2.0.6"
|
||||
"ua-parser-js": "2.0.6",
|
||||
"lingchair-internal-shared": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "18.3.1",
|
||||
|
||||
5
internal-shared/package.json
Normal file
5
internal-shared/package.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "lingchair-internal-shared",
|
||||
"type": "module",
|
||||
"main": "./main.ts"
|
||||
}
|
||||
17
package.json
17
package.json
@@ -1,15 +1,24 @@
|
||||
{
|
||||
"name": "lingchair",
|
||||
"type": "module",
|
||||
"workspaces": [
|
||||
"./mdui_patched",
|
||||
"./client-protocol",
|
||||
"./internal-shared",
|
||||
"./client"
|
||||
],
|
||||
"scripts": {
|
||||
"build-client-and-server": "npm run build-client && npm run server",
|
||||
"server": "npx tsx ./server/main.ts",
|
||||
"build-client": "cd client && npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "5.4.1",
|
||||
"file-type": "21.0.0",
|
||||
"express": "5.1.0",
|
||||
"socket.io": "4.8.1",
|
||||
"cookie-parser": "1.4.7",
|
||||
"express-fileupload": "1.5.2"
|
||||
"express": "5.1.0",
|
||||
"express-fileupload": "1.5.2",
|
||||
"file-type": "21.0.0",
|
||||
"socket.io": "4.8.1",
|
||||
"lingchair-internal-shared": "*"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user