[mod] 拔掉別名
This commit is contained in:
parent
1d0ad3fd99
commit
a22640bd2b
@ -1,7 +1,7 @@
|
|||||||
import { INetRequest } from "@/script/Engine/CatanEngine/NetManagerV2/Core/INetRequest";
|
import { INetRequest } from "../../script/Engine/CatanEngine/NetManagerV2/Core/INetRequest";
|
||||||
import { INetResponse } from "@/script/Engine/CatanEngine/NetManagerV2/Core/INetResponse";
|
import { INetResponse } from "../../script/Engine/CatanEngine/NetManagerV2/Core/INetResponse";
|
||||||
import { RpcAccountLoginRequest, RpcAccountLoginResponse } from "@/shared/protocols/AccountRequest";
|
import { RpcAccountLoginRequest, RpcAccountLoginResponse } from "../../shared/protocols/AccountRequest";
|
||||||
import { ClientData } from "@/shared/protocols/define/interface";
|
import { ClientData } from "../../shared/protocols/define/interface";
|
||||||
|
|
||||||
export default function* (clientData: ClientData, req: INetRequest<RpcAccountLoginRequest>): IterableIterator<any> {
|
export default function* (clientData: ClientData, req: INetRequest<RpcAccountLoginRequest>): IterableIterator<any> {
|
||||||
const data: RpcAccountLoginRequest = req.Data
|
const data: RpcAccountLoginRequest = req.Data
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { INetRequest } from "@/script/Engine/CatanEngine/NetManagerV2/Core/INetRequest";
|
import { INetRequest } from "../../script/Engine/CatanEngine/NetManagerV2/Core/INetRequest";
|
||||||
import { ClientData } from "@/shared/protocols/define/interface";
|
import { ClientData } from "../../shared/protocols/define/interface";
|
||||||
|
|
||||||
export default function* (clientData: ClientData, req: INetRequest<any>): IterableIterator<any> {
|
export default function* (clientData: ClientData, req: INetRequest<any>): IterableIterator<any> {
|
||||||
const data = req.Data
|
const data = req.Data
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { INetRequest } from "@/script/Engine/CatanEngine/NetManagerV2/Core/INetRequest";
|
import { INetRequest } from "../../script/Engine/CatanEngine/NetManagerV2/Core/INetRequest";
|
||||||
import { INetResponse } from "@/script/Engine/CatanEngine/NetManagerV2/Core/INetResponse";
|
import { INetResponse } from "../../script/Engine/CatanEngine/NetManagerV2/Core/INetResponse";
|
||||||
import { ClientData } from "@/shared/protocols/define/interface";
|
import { ClientData } from "../../shared/protocols/define/interface";
|
||||||
import { RpcSlotInRequest, RpcSlotInResponse } from "@/shared/protocols/SlotRequest";
|
import { RpcSlotInRequest, RpcSlotInResponse } from "../../shared/protocols/SlotRequest";
|
||||||
|
|
||||||
export default function* (clientData: ClientData, req: INetRequest<RpcSlotInRequest>): IterableIterator<any> {
|
export default function* (clientData: ClientData, req: INetRequest<RpcSlotInRequest>): IterableIterator<any> {
|
||||||
const data: RpcSlotInRequest = req.Data
|
const data: RpcSlotInRequest = req.Data
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { INetRequest } from "@/script/Engine/CatanEngine/NetManagerV2/Core/INetRequest";
|
import { INetRequest } from "../../script/Engine/CatanEngine/NetManagerV2/Core/INetRequest";
|
||||||
import { INetResponse } from "@/script/Engine/CatanEngine/NetManagerV2/Core/INetResponse";
|
import { INetResponse } from "../../script/Engine/CatanEngine/NetManagerV2/Core/INetResponse";
|
||||||
import { ClientData } from "@/shared/protocols/define/interface";
|
import { ClientData } from "../../shared/protocols/define/interface";
|
||||||
import { RpcSlot1SpinRequest, RpcSlot1SpinResponse } from "@/shared/protocols/Slot1Request";
|
import { RpcSlot1SpinRequest, RpcSlot1SpinResponse } from "../../shared/protocols/Slot1Request";
|
||||||
import { RandomEx } from "@/Utils/Number/RandomEx";
|
import { RandomEx } from "../../Utils/Number/RandomEx";
|
||||||
|
|
||||||
export default function* (clientData: ClientData, req: INetRequest<RpcSlot1SpinRequest>): IterableIterator<any> {
|
export default function* (clientData: ClientData, req: INetRequest<RpcSlot1SpinRequest>): IterableIterator<any> {
|
||||||
const data: RpcSlot1SpinRequest = req.Data
|
const data: RpcSlot1SpinRequest = req.Data
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { INetRequest } from "@/script/Engine/CatanEngine/NetManagerV2/Core/INetRequest";
|
import { INetRequest } from "../../script/Engine/CatanEngine/NetManagerV2/Core/INetRequest";
|
||||||
import { INetResponse } from "@/script/Engine/CatanEngine/NetManagerV2/Core/INetResponse";
|
import { INetResponse } from "../../script/Engine/CatanEngine/NetManagerV2/Core/INetResponse";
|
||||||
import { ClientData } from "@/shared/protocols/define/interface";
|
import { ClientData } from "../../shared/protocols/define/interface";
|
||||||
import { RpcSlot1SpinRequest, RpcSlot1SpinResponse } from "@/shared/protocols/Slot1Request";
|
import { RpcSlot1SpinRequest, RpcSlot1SpinResponse } from "../../shared/protocols/Slot1Request";
|
||||||
import { RandomEx } from "@/Utils/Number/RandomEx";
|
import { RandomEx } from "../../Utils/Number/RandomEx";
|
||||||
|
|
||||||
export default function* (clientData: ClientData, req: INetRequest<RpcSlot1SpinRequest>): IterableIterator<any> {
|
export default function* (clientData: ClientData, req: INetRequest<RpcSlot1SpinRequest>): IterableIterator<any> {
|
||||||
const data: RpcSlot1SpinRequest = req.Data
|
const data: RpcSlot1SpinRequest = req.Data
|
||||||
|
@ -5,12 +5,12 @@ import "module-alias/register";
|
|||||||
// // 必載入
|
// // 必載入
|
||||||
// import "../Utils/catan.ts";
|
// import "../Utils/catan.ts";
|
||||||
|
|
||||||
import { BaseEnumerator } from "@/CatanEngine/CoroutineV2/Core/BaseEnumerator";
|
|
||||||
import { NetConnector } from "@/script/Engine/CatanEngine/NetManagerV2/NetConnector";
|
|
||||||
import dotenv from 'dotenv';
|
import dotenv from 'dotenv';
|
||||||
import { app, BrowserWindow, ipcMain } from 'electron';
|
import { app, BrowserWindow, ipcMain } from 'electron';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import { WebSocketServer } from 'ws';
|
import { WebSocketServer } from 'ws';
|
||||||
|
import { BaseEnumerator } from "../CatanEngine/CoroutineV2/Core/BaseEnumerator";
|
||||||
|
import { NetConnector } from "../script/Engine/CatanEngine/NetManagerV2/NetConnector";
|
||||||
|
|
||||||
onload();
|
onload();
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { CoroutineV2 } from "@/CatanEngine/CoroutineV2/CoroutineV2";
|
|
||||||
import { Encoding } from "@/CatanEngine/CSharp/System/Text/Encoding";
|
|
||||||
import { ClientData } from "@/shared/protocols/define/interface";
|
|
||||||
import { IncomingMessage } from "http";
|
import { IncomingMessage } from "http";
|
||||||
import { WebSocket } from "ws";
|
import { WebSocket } from "ws";
|
||||||
|
import { CoroutineV2 } from "../../../../CatanEngine/CoroutineV2/CoroutineV2";
|
||||||
import { Action } from "../../../../CatanEngine/CSharp/System/Action";
|
import { Action } from "../../../../CatanEngine/CSharp/System/Action";
|
||||||
|
import { Encoding } from "../../../../CatanEngine/CSharp/System/Text/Encoding";
|
||||||
|
import { ClientData } from "../../../../shared/protocols/define/interface";
|
||||||
import { INetRequest } from "./Core/INetRequest";
|
import { INetRequest } from "./Core/INetRequest";
|
||||||
import { INetResponse } from "./Core/INetResponse";
|
import { INetResponse } from "./Core/INetResponse";
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ export class NetConnector {
|
|||||||
// 动态导入处理函数
|
// 动态导入处理函数
|
||||||
try {
|
try {
|
||||||
// 动态导入文件
|
// 动态导入文件
|
||||||
const module = await import(`@/api/${req.Method.replace(".", "/")}`);
|
const module = await import(`../../../../api/${req.Method.replace(".", "/")}`);
|
||||||
|
|
||||||
// 调用导入模块中的处理函数
|
// 调用导入模块中的处理函数
|
||||||
if (module.default) {
|
if (module.default) {
|
||||||
@ -82,28 +82,6 @@ export class NetConnector {
|
|||||||
};
|
};
|
||||||
NetConnector.Send(socket, response);
|
NetConnector.Send(socket, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
// const module = await import(`@/api/${req.Method.replace(".", "/")}`);
|
|
||||||
// if (module) {
|
|
||||||
// let AsyncFunction: () => IterableIterator<any> = function* (): IterableIterator<any> {
|
|
||||||
// const response: INetResponse<any> = yield* module.default(req);
|
|
||||||
// NetConnector.Send(socket, response);
|
|
||||||
// };
|
|
||||||
// CoroutineV2.Single(AsyncFunction()).Start();
|
|
||||||
// } else {
|
|
||||||
// const response: INetResponse<any> = {
|
|
||||||
// Status: -1,
|
|
||||||
// Method: req.Method,
|
|
||||||
// Data: null,
|
|
||||||
// IsValid: false
|
|
||||||
// };
|
|
||||||
// NetConnector.Send(socket, response);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// } catch (e) {
|
|
||||||
// console.error(e);
|
|
||||||
// throw new Error(`[RPC] 無法解析Server回應: ${str}`);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,25 +1,23 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "commonjs", // 使用 CommonJS 模块系统
|
|
||||||
"target": "es2015", // 编译为 ES2015
|
"target": "es2015", // 编译为 ES2015
|
||||||
|
"module": "commonjs", // 使用 CommonJS 模块系统
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"strict": false, // 启用严格模式
|
"strict": false, // 启用严格模式
|
||||||
"esModuleInterop": true, // 启用 ES 模块的兼容性
|
"esModuleInterop": true, // 启用 ES 模块的兼容性
|
||||||
"skipLibCheck": true, // 跳过库的类型检查
|
"skipLibCheck": true, // 跳过库的类型检查
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"baseUrl": ".",
|
// "baseUrl": ".",
|
||||||
"paths": {
|
// "paths": {
|
||||||
"@/*": ["src/*"]
|
// "@/*": ["src/*"]
|
||||||
},
|
// },
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*.ts"
|
"src/**/*.ts"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": ["node_modules", "dist"]
|
||||||
"node_modules" // 排除 node_modules 目录
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user