mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
caa3dc23f9
* refactor: dissolve caller-side replay ownership * fix: remove replay test-only export * fix: restore replay loader promise boundary
18 lines
632 B
TypeScript
18 lines
632 B
TypeScript
import type { LayeringViolation } from './model.ts';
|
|
|
|
const RETIRED_REPLAY_ROOT = 'src/replay/';
|
|
export const REPLAY_OWNERSHIP_RULE = 'R71 replay-ownership';
|
|
|
|
export function replayOwnershipViolations(sourceFiles: readonly string[]): LayeringViolation[] {
|
|
return sourceFiles
|
|
.filter((file) => file.startsWith(RETIRED_REPLAY_ROOT))
|
|
.map((file) => ({
|
|
rule: REPLAY_OWNERSHIP_RULE,
|
|
file,
|
|
line: 1,
|
|
message:
|
|
`${RETIRED_REPLAY_ROOT} is retired; caller source acquisition belongs under ` +
|
|
'src/commands/replay/ and replay-test presentation belongs under src/cli/replay-test/.',
|
|
}));
|
|
}
|