* feat: pnpm new * Refactor build and release workflows, update dependencies Switch build scripts and workflows from npm to pnpm, update build and artifact paths, and simplify release workflow by removing version detection and changelog steps. Add new dependencies (silk-wasm, express, ws, node-pty-prebuilt-multiarch), update exports in package.json files, and add vite config for napcat-framework. Also, rename manifest.json for framework package and fix static asset copying in shell build config.
26 lines
1.2 KiB
TypeScript
26 lines
1.2 KiB
TypeScript
import { PacketHighwayContext } from '@/napcat-core/packet/highway/highwayContext';
|
|
import { NapCatCore } from '@/napcat-core';
|
|
import { PacketLogger } from '@/napcat-core/packet/context/loggerContext';
|
|
import { NapCoreContext } from '@/napcat-core/packet/context/napCoreContext';
|
|
import { PacketClientContext } from '@/napcat-core/packet/context/clientContext';
|
|
import { PacketOperationContext } from '@/napcat-core/packet/context/operationContext';
|
|
import { PacketMsgConverter } from '@/napcat-core/packet/message/converter';
|
|
|
|
export class PacketContext {
|
|
readonly msgConverter: PacketMsgConverter;
|
|
readonly napcore: NapCoreContext;
|
|
readonly logger: PacketLogger;
|
|
readonly client: PacketClientContext;
|
|
readonly highway: PacketHighwayContext;
|
|
readonly operation: PacketOperationContext;
|
|
|
|
constructor (core: NapCatCore) {
|
|
this.msgConverter = new PacketMsgConverter();
|
|
this.napcore = new NapCoreContext(core);
|
|
this.logger = new PacketLogger(this.napcore);
|
|
this.client = new PacketClientContext(this.napcore, this.logger);
|
|
this.highway = new PacketHighwayContext(this.napcore, this.logger, this.client);
|
|
this.operation = new PacketOperationContext(this);
|
|
}
|
|
}
|