Restructure the repository into a pnpm workspace under packages/ (core, webui, runtime). Move source files for core and webui into packages/*, add package manifests for @snowluma/core and @snowluma/runtime, and remove the old launcher package.json. Update root package.json to be a monorepo controller (scripts delegate to pnpm filters, set packageManager and Node engine). Configure build outputs to emit into the repo-root dist/ (vite config changes) so the existing release pipeline continues to work. Add .npmrc with mirrors, expand .gitignore for monorepo layout, add tsconfig base and package-level tsconfigs, and add vitest config for the core package. Adjust injector native search paths and update tests import paths to the new package layout. Small CI/workflow comment added to clarify build behavior and README updated with monorepo structure and common commands.
17 lines
663 B
TypeScript
17 lines
663 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { loadOneBotConfig, makeDefaultOneBotConfig } from '../src/onebot/config';
|
|
|
|
describe('makeDefaultOneBotConfig', () => {
|
|
it('returns default config structure', () => {
|
|
const config = makeDefaultOneBotConfig();
|
|
expect(config.httpServers).toHaveLength(1);
|
|
expect(config.httpServers[0].host).toBe('0.0.0.0');
|
|
expect(config.httpServers[0].port).toBe(3000);
|
|
expect(config.httpPostEndpoints).toEqual([]);
|
|
expect(config.wsServers).toHaveLength(1);
|
|
expect(config.wsServers[0].port).toBe(3001);
|
|
expect(config.wsClients).toEqual([]);
|
|
expect(config.musicSignUrl).toBe('');
|
|
});
|
|
});
|