fix(web): keep Inbox out of project channels

This commit is contained in:
2026-07-22 15:44:41 +08:00
parent d576ad02c1
commit fecff65975
3 changed files with 9 additions and 1 deletions

View File

@@ -74,6 +74,11 @@ const projectsSource = readFileSync('src/api/projects.ts', 'utf8')
if (!projectsSource.includes("'/api/v1/projects'")) failures.push('project API must use /api/v1/projects')
if (/['"`]\/api\/(?!v1\/)/.test(apiSource)) failures.push('src/api paths must use the /api/v1 prefix')
const mappersSource = readFileSync('src/api/mappers.tsx', 'utf8')
if (!mappersSource.includes("filter((channel) => channel.type !== 'inbox')")) {
failures.push('project channels must hide the removed Inbox message stream')
}
for (const match of apiSource.matchAll(/export type (\w+DTO)\s*=\s*\{([\s\S]*?)\n\}/g)) {
const [, name, body] = match
if (/^\s*\w+\s*\?\s*:/m.test(body)) failures.push(`${name} fields must be required`)