fix(web): keep Inbox out of project channels
This commit is contained in:
@@ -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`)
|
||||
|
||||
Reference in New Issue
Block a user