mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 01:44:13 +00:00
style: format server and shared with prettier
A mechanical prettier --write over server/src, server/tests, server/scripts and shared/src with the workspaces' .prettierrc; nothing but layout and import order changes, and every file keeps the same set of imports. shared is formatted throughout and its format baseline is empty. The server baseline keeps the 35 files that Prettier would grow past their lint:size limit (they need a split first, which is not a formatting change), and the generated entity files stay as their generator writes them.
This commit is contained in:
@@ -3,6 +3,14 @@
|
||||
* whole dispatch runs under, and one log line per call. A refused call comes
|
||||
* back as `{ ok: false }` rather than a throw, so that is what the line says.
|
||||
*/
|
||||
import { currentCorrelation, type Correlation } from '../../../src/nest/common/request-correlation';
|
||||
import { RpcRateLimiter, DEFAULT_RPC_LIMIT } from '../../../src/nest/plugins/host/rate-limit';
|
||||
import type { PluginRpcHost } from '../../../src/nest/plugins/host/rpc-host';
|
||||
import type { RpcRequest, RpcResponse, RpcError } from '../../../src/nest/plugins/protocol/envelope';
|
||||
import { PluginSupervisor } from '../../../src/nest/plugins/supervisor/plugin-supervisor';
|
||||
import { createSnapshotTestDb } from '../../helpers/db-mock';
|
||||
import { createTestOrm, type TestOrm } from '../../helpers/test-orm';
|
||||
|
||||
import { describe, it, expect, vi, beforeAll, afterAll, beforeEach } from 'vitest';
|
||||
|
||||
const log = vi.hoisted(() => ({
|
||||
@@ -14,14 +22,6 @@ const log = vi.hoisted(() => ({
|
||||
}));
|
||||
vi.mock('../../../src/nest/audit/audit-log.logger', () => log);
|
||||
|
||||
import { createSnapshotTestDb } from '../../helpers/db-mock';
|
||||
import { createTestOrm, type TestOrm } from '../../helpers/test-orm';
|
||||
import { PluginSupervisor } from '../../../src/nest/plugins/supervisor/plugin-supervisor';
|
||||
import { RpcRateLimiter, DEFAULT_RPC_LIMIT } from '../../../src/nest/plugins/host/rate-limit';
|
||||
import { currentCorrelation, type Correlation } from '../../../src/nest/common/request-correlation';
|
||||
import type { PluginRpcHost } from '../../../src/nest/plugins/host/rpc-host';
|
||||
import type { RpcRequest, RpcResponse, RpcError } from '../../../src/nest/plugins/protocol/envelope';
|
||||
|
||||
interface DispatchEntry {
|
||||
id: string;
|
||||
rpcHost: Pick<PluginRpcHost, 'dispatch'>;
|
||||
@@ -54,7 +54,12 @@ function makeSupervisor(answer: (req: RpcRequest) => RpcResponse | RpcError) {
|
||||
seen.push(currentCorrelation());
|
||||
return answer(req);
|
||||
};
|
||||
const supervisor = new PluginSupervisor(() => ({ dispatch }) as unknown as PluginRpcHost, {}, {}, () => t.orm) as unknown as SupervisorPrivate;
|
||||
const supervisor = new PluginSupervisor(
|
||||
() => ({ dispatch }) as unknown as PluginRpcHost,
|
||||
{},
|
||||
{},
|
||||
() => t.orm,
|
||||
) as unknown as SupervisorPrivate;
|
||||
const sup: DispatchEntry = {
|
||||
id: 'weather-plugin',
|
||||
rpcHost: { dispatch },
|
||||
|
||||
Reference in New Issue
Block a user