{"id":480733,"date":"2026-05-23T09:23:59","date_gmt":"2026-05-23T09:23:59","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=480733"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=480733","title":{"rendered":"Feature Based Clean Architecture. \u0427\u0430\u0441\u0442\u044c 3: \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0440\u0438\u0441\u043a \u0446\u0438\u043a\u043b\u043e\u0432 \u0432 NestJS: ROI \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0435 \u043f\u044f\u0442\u0438 \u043b\u0435\u0442"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<blockquote>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u0430\u044f \u0434\u043e\u043a\u0442\u0440\u0438\u043d\u0430 \u0434\u043b\u044f NestJS-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432: \u0440\u0430\u0437\u0431\u043e\u0440 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0434\u0435\u0433\u0440\u0430\u0434\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0435\u0451 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u0438 \u0440\u043e\u0441\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430.<\/p>\n<\/blockquote>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0435\u0433\u043e \u044d\u0442\u0430 \u00ab\u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u044b\u00bb \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0435 \u0447\u0443\u0442\u044c \u0434\u043b\u0438\u043d\u043d\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043f\u0440\u0438\u043d\u0442\u0430. \u0423 \u043d\u0430\u0441 \u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c <code>FollowsService<\/code> \u2014 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0436\u0438\u0432\u0451\u0442 \u0432 \u0441\u0432\u043e\u0451\u043c \u043c\u043e\u0434\u0443\u043b\u0435, \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u0438 \u00abfollowerId \u2192 targetUserId\u00bb \u0432 \u0441\u0432\u043e\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442. \u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u2014 <code>UsersModule<\/code> \u0441 \u0440\u0430\u0437\u043d\u0435\u0441\u0451\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043a\u0443\u0441\u043e\u0447\u043a\u0430\u043c\u0438: <code>UserPrivacyService<\/code> \u0438 <code>UserSettingsService<\/code>. \u041a\u0430\u0436\u0434\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u0432\u043e\u044e \u0433\u0440\u0430\u043d\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. Single responsibility, \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0447\u0438\u0441\u0442\u0430\u044f, \u0440\u0435\u0432\u044c\u044e \u2014 \u043f\u0440\u0430\u0437\u0434\u043d\u0438\u043a.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0430\u043f\u043f\u043e\u0440\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0438\u0434\u0442\u0438 \u0436\u0430\u043b\u043e\u0431\u044b: \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u0446\u044b \u043f\u0438\u0448\u0443\u0442 \u0432 \u043b\u0438\u0447\u043a\u0443 \u0432\u0441\u044f\u043a\u0443\u044e \u0433\u0430\u0434\u043e\u0441\u0442\u044c, \u044e\u0437\u0435\u0440\u044b \u0445\u043e\u0442\u044f\u0442 \u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0433\u043b\u0430\u0437. \u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439, \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0439 \u2014 \u043f\u0440\u043e\u0434\u0430\u043a\u0442 \u0435\u0433\u043e \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442: \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b. \u041d\u0430 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0448\u044c follow request, \u0432\u043b\u0430\u0434\u0435\u043b\u0435\u0446 \u043e\u0434\u043e\u0431\u0440\u044f\u0435\u0442 \u0438\u043b\u0438 \u043d\u0435\u0442. \u041b\u043e\u0433\u0438\u043a\u0430 \u043d\u0430 \u043f\u043e\u043b\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432 Notion. \u0418\u0434\u0435\u044f \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f, \u0434\u0435\u043d\u044c \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u0443, \u0434\u0432\u0430.<\/p>\n<h4>\u041a\u0435\u0439\u0441: \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438<\/h4>\n<p>\u0422\u0438\u043a\u0435\u0442 \u043f\u0440\u0438\u0437\u0435\u043c\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0431\u044d\u043a\u0435\u043d\u0434. \u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c? \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a <code>FollowsService<\/code> \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 <code>follows<\/code>, \u043d\u0430\u0434\u043e \u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0438 \u0443\u0437\u043d\u0430\u0442\u044c, \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043b\u0438 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0443 \u0442\u043e\u0433\u043e, \u043d\u0430 \u043a\u043e\u0433\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u0434\u0430 \u2014 \u043a\u043b\u0430\u0434\u0451\u043c \u0437\u0430\u044f\u0432\u043a\u0443 \u0432 <code>follow_requests<\/code> \u0438 \u0436\u0434\u0451\u043c \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u0438\u044f \u043e\u0442 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u2014 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e. \u0417\u043d\u0430\u043d\u0438\u0435 \u043e \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0441\u0442\u0438 \u0436\u0438\u0432\u0451\u0442 \u0432 <code>UsersModule<\/code> (\u0433\u0434\u0435 \u0435\u043c\u0443 \u0435\u0449\u0451 \u0436\u0438\u0442\u044c?), \u0437\u043d\u0430\u0447\u0438\u0442 <code>FollowsService<\/code> \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 <code>UserPrivacyService<\/code>. \u041d\u0430 \u0440\u0435\u0432\u044c\u044e \u0442\u0430\u043a\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0439\u0434\u0451\u0442 \u0437\u0430 \u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044c \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<pre><code class=\"typescript\">@Injectable()export class FollowsService {  constructor(private readonly userPrivacyService: UserPrivacyService) {}  async follow(    followerId: string,    targetUserId: string,  ): Promise&lt;FollowResponse&gt; {    const isPrivateResult =      await this.userPrivacyService.isPrivate(targetUserId);    if (isPrivateResult.isErr()) {      throw new InternalServerErrorException(isPrivateResult.error);    }    if (isPrivateResult.value) {      return this.createFollowRequest(followerId, targetUserId);    }    return this.createFollow(followerId, targetUserId);  }  private async createFollowRequest(    followerId: string,    targetUserId: string,  ): Promise&lt;FollowResponse&gt; {    \/\/ \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u044f\u0432\u043a\u0443 \u043d\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443  }  private async createFollow(    followerId: string,    targetUserId: string,  ): Promise&lt;FollowResponse&gt; {    \/\/ \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443  }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0432\u0441\u0451 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435. <code>FollowsService<\/code> \u0441\u043f\u0440\u043e\u0441\u0438\u043b \u0443 <code>UsersModule<\/code>: \u00ab\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u0438\u043b\u0438 \u043d\u0435\u0442?\u00bb \u2014 \u0438 \u043f\u043e\u0448\u0451\u043b \u0434\u0430\u043b\u044c\u0448\u0435. \u0421\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0434\u043d\u0430, \u0438\u0434\u0451\u0442 \u0432 \u043e\u0434\u043d\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u043d\u0430 \u0441\u0445\u0435\u043c\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440\u0430 \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u043f\u0435\u0442\u0435\u043b\u044c. \u0415\u0441\u043b\u0438 \u0431\u044b \u0444\u0438\u0447\u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u0438 \u043a\u043e\u043d\u0447\u0438\u043b\u0438\u0441\u044c \u2014 \u0443 \u043d\u0430\u0441 \u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0438 \u0441\u0442\u0430\u0442\u044c\u0438, \u043d\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u041d\u043e \u0444\u0438\u0447\u0438, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043d\u0435 \u043a\u043e\u043d\u0447\u0430\u044e\u0442\u0441\u044f.<\/p>\n<p>\u0427\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443 \u0441\u043f\u0440\u0438\u043d\u0442\u043e\u0432 \u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439: viewer \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0447\u0443\u0436\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c. \u0418 \u0442\u0443\u0442 \u0432\u044b\u043b\u0435\u0437\u0430\u0435\u0442 \u0446\u0435\u043b\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u00ab\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u0438\u043b\u0438 \u043d\u0435\u0442\u00bb \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442. \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c? \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432\u0438\u0434\u0435\u0442\u044c \u0442\u0432\u0438\u0442\u044b? \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432\u0438\u0434\u0435\u0442\u044c \u043b\u0430\u0439\u043a\u0438, \u0438\u0441\u0442\u043e\u0440\u0438\u0438, \u0447\u0443\u0436\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438? \u041b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442\u0441\u044f: \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u2014 \u0441\u0432\u043e\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0445 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432 \u2014 \u0441\u0432\u043e\u0438, \u0434\u043b\u044f \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u2014 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435. \u0421\u0442\u0430\u0440\u044b\u0439 <code>UserPrivacyService<\/code> \u0441 \u044d\u0442\u0438\u043c \u0443\u0436\u0435 \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f (\u043e\u043d \u0443\u043c\u0435\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u0438\u043b\u0438 \u043d\u0435\u0442\u00bb), \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u0432\u043e\u0434\u0438\u0442 \u0440\u044f\u0434\u043e\u043c \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u2014 <code>UserAccessService<\/code>. \u041f\u043e \u0432\u0441\u0435\u043c \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u0430\u043c \u2014 single responsibility, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0432\u0441\u0451 \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<\/p>\n<p>\u0418 \u0440\u043e\u0432\u043d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 <code>UserAccessService<\/code> \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441. \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u00ab\u043c\u043e\u0436\u0435\u0442 \u043b\u0438 viewer \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0432\u0438\u0442\u044b owner-\u0430\u00bb, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u043d\u0430\u0442\u044c, \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d \u043b\u0438 viewer \u043d\u0430 owner. \u0410 \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0436\u0438\u0432\u0451\u0442 \u0432 <code>FollowsService<\/code>. \u0417\u043d\u0430\u0447\u0438\u0442, <code>UserAccessService<\/code> \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 <code>FollowsService<\/code>.<\/p>\n<pre><code class=\"typescript\">@Injectable()export class UserAccessService {  constructor(    private readonly followsService: FollowsService,    private readonly userPrivacyService: UserPrivacyService,  ) {}  async canViewProfile(    viewerId: string,    ownerId: string,  ): Promise&lt;Result&lt;boolean, UserAccessErrorCode&gt;&gt; {    const isPrivateResult = await this.userPrivacyService.isPrivate(ownerId);    if (isPrivateResult.isErr()) {      return err(isPrivateResult.error);    }    if (!isPrivateResult.value) {      return ok(true);    }    const isFollowingResult = await this.followsService.isFollowing(      viewerId,      ownerId,    );    if (isFollowingResult.isErr()) {      return err(isFollowingResult.error);    }    return ok(isFollowingResult.value);  }  async canViewTweets(    viewerId: string,    ownerId: string,  ): Promise&lt;Result&lt;boolean, UserAccessErrorCode&gt;&gt; {    const isPrivateResult = await this.userPrivacyService.isPrivate(ownerId);    if (isPrivateResult.isErr()) {      return err(isPrivateResult.error);    }    if (!isPrivateResult.value) {      return ok(true);    }    const isFollowingResult = await this.followsService.isFollowing(      viewerId,      ownerId,    );    if (isFollowingResult.isErr()) {      return err(isFollowingResult.error);    }    return ok(isFollowingResult.value);  }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0423 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u0439 \u0446\u0438\u043a\u043b. \u0421 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0437\u0433\u043b\u044f\u0434\u0430 \u2014 \u0431\u0435\u0437\u043e\u0431\u0438\u0434\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043e\u043d \u0435\u0449\u0451 \u043f\u0440\u044f\u0447\u0435\u0442\u0441\u044f \u0437\u0430 \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<pre><code class=\"bash\">UserAccessService:  \u2192 FollowsService  \u2192 UserPrivacyServiceFollowsService:  \u2192 UserPrivacyService<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u0441\u0435 \u0441\u0442\u0440\u0435\u043b\u043a\u0438 \u0438\u0434\u0443\u0442 \u0432\u043f\u0435\u0440\u0451\u0434, \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u2014 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u0410 \u0432\u043e\u0442 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u0443\u0436\u0435 \u0437\u0435\u0440\u043a\u0430\u043b\u044c\u043d\u0430\u044f:<\/p>\n<pre><code class=\"bash\">FollowsModule  \u21c4  UsersModule<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><code>FollowsModule<\/code> \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 <code>UsersModule<\/code> \u0440\u0430\u0434\u0438 <code>UserPrivacyService<\/code>. <code>UsersModule<\/code> \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 <code>FollowsModule<\/code> \u0440\u0430\u0434\u0438 <code>FollowsService<\/code>. \u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d \u2014 \u043b\u044e\u0431\u043e\u0439 \u0440\u0435\u0432\u044c\u044e\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u043e\u0434\u043e\u0431\u0440\u0438\u0442\u044c. \u041d\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u043e\u043d\u0438 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u043b\u043e\u0432\u0443\u0448\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0445\u043b\u043e\u043f\u043d\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0438 \u043d\u0435 \u0437\u0430\u0432\u0442\u0440\u0430 \u2014 \u0430 \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0430-\u0442\u0440\u0438 \u0441\u043f\u0440\u0438\u043d\u0442\u0430, \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0447\u0435\u0442\u0432\u0435\u0440\u0433, \u043d\u0430 \u0447\u044c\u0451\u043c-\u0442\u043e PR, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a \u0441\u0430\u043c\u0438\u043c \u044d\u0442\u0438\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0430\u043c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442.<\/p>\n<h3>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0432 \u043a\u043e\u0434\u0435<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0451 \u0432 \u043f\u043b\u043e\u0441\u043a\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 <code>@Module<\/code>-\u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0431\u043c\u0430\u043d\u0447\u0438\u0432\u043e \u043f\u0440\u043e\u0441\u0442\u043e. <code>FollowsModule<\/code> \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442 \u00ab\u043c\u043d\u0435 \u043d\u0443\u0436\u0435\u043d <code>UsersModule<\/code>\u00bb, <code>UsersModule<\/code> \u2014 \u00ab\u043c\u043d\u0435 \u043d\u0443\u0436\u0435\u043d <code>FollowsModule<\/code>\u00bb:<\/p>\n<pre><code class=\"typescript\">@Module({  imports: [UsersModule],  providers: [FollowsService],  exports: [FollowsService],})export class FollowsModule {}@Module({  imports: [FollowsModule],  providers: [UserPrivacyService, UserAccessService],  exports: [UserPrivacyService, UserAccessService],})export class UsersModule {}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0427\u0435\u0442\u044b\u0440\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0430, \u0434\u0432\u0430 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430, \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e <code>forwardRef<\/code>, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0440\u044e\u043a\u043e\u0432. \u041d\u0438 \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u2014 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 approve \u0437\u0430 \u0434\u0435\u0441\u044f\u0442\u044c \u0441\u0435\u043a\u0443\u043d\u0434. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0439 \u043f\u0430\u0440\u044b <code>imports<\/code> \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b NestJS \u0448\u0432\u044b\u0440\u043d\u0443\u043b <strong>\u0442\u043e \u0441\u0430\u043c\u043e\u0435<\/strong> <code>Nest can't resolve dependencies<\/code>.<\/p>\n<p>\u041b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u043e Nest \u0434\u0430\u0451\u0442 \u0441\u0430\u043c, \u043f\u0440\u044f\u043c\u043e \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u2014 <code>forwardRef<\/code>. \u041e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0448\u044c \u0438\u043c\u043f\u043e\u0440\u0442 \u0432 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0438 DI \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043b\u0435\u043d\u0438\u0432\u043e, \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0430 \u043d\u0435 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0431\u043e\u0440\u043a\u0438. \u0417\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0432\u044b\u0448\u0435: \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442, \u043e\u043d \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0447\u0438\u0442\u0430\u0435\u0442, \u043a\u0438\u0432\u0430\u0435\u0442, \u043f\u0430\u0442\u0447\u0438\u0442 \u043e\u0431\u0430 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430:<\/p>\n<pre><code class=\"typescript\">@Module({  imports: [forwardRef(() =&gt; UsersModule)],  providers: [FollowsService],  exports: [FollowsService],})export class FollowsModule {}@Module({  imports: [forwardRef(() =&gt; FollowsModule)],  providers: [UserPrivacyService, UserAccessService],  exports: [UserPrivacyService, UserAccessService],})export class UsersModule {}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418 \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u0432\u0441\u0451 \u0441\u043d\u043e\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0411\u0438\u043b\u0434 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f, \u0442\u0435\u0441\u0442\u044b \u0438\u0434\u0443\u0442, \u0432 \u043b\u043e\u0433\u0430\u0445 \u0442\u0438\u0445\u043e. \u041d\u0430 \u0440\u0435\u0432\u044c\u044e \u0434\u0432\u0430 \u0441\u043b\u043e\u0432\u0430 <code>forwardRef<\/code> \u043f\u0440\u043e\u0439\u0434\u0443\u0442 \u0442\u0430\u043a \u0436\u0435 \u043b\u0435\u0433\u043a\u043e, \u043a\u0430\u043a \u0438 \u0441\u0430\u043c\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u2014 \u044d\u0442\u043e \u0436\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 API, \u0432\u0441\u0451 \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u043e. PR \u043c\u0435\u0440\u0434\u0436\u0438\u0442\u0441\u044f \u2014 \u0438 \u043d\u0430 \u043f\u043e\u043b\u0433\u043e\u0434\u0430 \u043e \u0446\u0438\u043a\u043b\u0435 \u0432\u0441\u0435 \u0434\u0440\u0443\u0436\u043d\u043e \u0437\u0430\u0431\u044b\u0432\u0430\u044e\u0442.<\/p>\n<hr\/>\n<h4>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u2014 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 forwardRef \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043c\u0441\u0442\u0438\u0442\u044c<\/h4>\n<p>\u041f\u043e\u043b\u0433\u043e\u0434\u0430 \u0441\u043f\u0443\u0441\u0442\u044f \u043f\u0440\u043e \u0446\u0438\u043a\u043b <code>Users \u2194 Follows<\/code> \u0443\u0436\u0435 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043f\u043e\u043c\u043d\u0438\u0442. \u0416\u0438\u0437\u043d\u044c \u0438\u0434\u0451\u0442, \u0444\u0438\u0447\u0438 \u0432\u044b\u043a\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f, CI \u0437\u0435\u043b\u0451\u043d\u044b\u0439, \u043d\u043e\u0432\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432\u0438\u0434\u044f\u0442 <code>forwardRef<\/code> \u0432 <code>imports<\/code> \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0435\u0433\u043e \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0438\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u2014 \u0440\u0430\u0437 \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u044e\u0442 \u0432\u0435\u0437\u0434\u0435, \u0437\u043d\u0430\u0447\u0438\u0442, \u0442\u0430\u043a \u0438 \u043d\u0430\u0434\u043e.<\/p>\n<p>\u0418 \u0442\u0443\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u0430\u0434\u0438\u0442\u0441\u044f \u0437\u0430 \u043d\u043e\u0432\u0443\u044e \u0444\u0438\u0447\u0443 \u2014 \u043b\u0435\u043d\u0442\u0443 \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u043c\u0438. \u0423 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c <code>CommentsModule<\/code> \u0438 <code>ModerationModule<\/code>. \u0423\u0433\u0430\u0434\u0430\u0439\u0442\u0435, \u0432 \u043a\u0430\u043a\u0438\u0445 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f\u0445. <code>CommentsService<\/code> \u0445\u043e\u0434\u0438\u0442 \u0432 <code>ModerationService<\/code> \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u00ab\u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442?\u00bb (\u0430\u043d\u0442\u0438-\u0441\u043f\u0430\u043c, \u0431\u0430\u043d, \u0440\u0435\u0439\u0442-\u043b\u0438\u043c\u0438\u0442). <code>ModerationService<\/code> \u0445\u043e\u0434\u0438\u0442 \u0432 <code>CommentsService<\/code> \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c\u0438 N \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u044e\u0437\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043f\u0430\u043c-\u0441\u043a\u043e\u0440. \u0426\u0438\u043a\u043b? \u0426\u0438\u043a\u043b. <code>forwardRef<\/code>? <code>forwardRef<\/code>.<\/p>\n<pre><code class=\"typescript\">@Module({  imports: [forwardRef(() =&gt; ModerationModule)],  providers: [CommentsService],  exports: [CommentsService],})export class CommentsModule {}@Module({  imports: [forwardRef(() =&gt; CommentsModule)],  providers: [ModerationService],  exports: [ModerationService],})export class ModerationModule {}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>FeedModule<\/code>. \u041b\u0435\u043d\u0442\u0430 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0438\u0437 \u043f\u043e\u0441\u0442\u043e\u0432, \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u043f\u043e\u0441\u0442\u043e\u043c \u2014 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u044b, \u0438 <strong>\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u044b \u043e\u0442 \u0437\u0430\u0431\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u044e\u0437\u0435\u0440\u043e\u0432 \u043d\u0430\u0434\u043e \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c<\/strong>. \u041f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0430 \u043c\u043e\u0434\u0443\u043b\u044f:<\/p>\n<pre><code class=\"typescript\">@Module({  imports: [CommentsModule, ModerationModule],  providers: [FeedService],})export class FeedModule {}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418 \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f. \u041d\u043e \u0442\u0443\u0442 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e <strong>\u0437\u0434\u043e\u0440\u043e\u0432\u044b\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0438\u043d\u043a\u0442<\/strong>:<\/p>\n<blockquote>\n<p>\u00ab\u0421\u0442\u043e\u043f, \u0430 \u043f\u043e\u0447\u0435\u043c\u0443 <code>Feed<\/code> \u0432\u043e\u043e\u0431\u0449\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u043d\u0430\u0442\u044c \u043f\u0440\u043e <code>Moderation<\/code>? \u041c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u044f \u2014 \u044d\u0442\u043e \u0434\u0435\u0442\u0430\u043b\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <code>Comments<\/code>. \u0415\u0441\u043b\u0438 \u0437\u0430\u0432\u0442\u0440\u0430 \u043c\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0435\u0451 \u043d\u0430 ML-\u043c\u043e\u0434\u0435\u043b\u044c, <code>Feed<\/code> \u043e\u0431 \u044d\u0442\u043e\u043c \u0443\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d. \u0421\u0434\u0435\u043b\u0430\u0435\u043c <code>CommentsModule<\/code> \u0444\u0430\u0441\u0430\u0434\u043e\u043c \u0438 \u0440\u0435\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u043d\u0451\u043c <code>ModerationService<\/code> \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e\u00bb.<\/p>\n<\/blockquote>\n<p>\u042d\u0442\u043e <strong>\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435<\/strong>. \u041f\u043e \u0432\u0441\u0435\u043c \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u0430\u043c \u2014 \u0444\u0430\u0441\u0430\u0434\u044b, \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f, \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0437\u043d\u0430\u043d\u0438\u0439 \u0443 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f. \u041b\u044e\u0431\u043e\u0439 \u0448\u0430\u0440\u044f\u0449\u0438\u0439 \u0440\u0435\u0432\u044c\u044e\u0435\u0440 \u0442\u0430\u043a\u043e\u0439 PR \u043e\u0434\u043e\u0431\u0440\u0438\u0442.<\/p>\n<pre><code class=\"typescript\">@Module({  imports: [forwardRef(() =&gt; ModerationModule)],  providers: [CommentsService],  exports: [CommentsService, ModerationService], \/\/ \u0444\u0430\u0441\u0430\u0434\u0438\u043c})export class CommentsModule {}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418 \u0442\u0443\u0442 Nest \u043d\u0430\u043c \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442:<\/p>\n<pre><code>Nest can't resolve dependencies of the FeedService (?).Please make sure that the argument ModerationService at index [0] is available in the FeedModule context.<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u0438\u043a\u0430\u043a\u043e\u0439 <code>forwardRef<\/code> \u0442\u0443\u0442 \u043d\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <code>forwardRef<\/code> \u2014 \u044d\u0442\u043e <strong>\u043d\u0435 \u043c\u043e\u0434\u0443\u043b\u044c, \u044d\u0442\u043e \u043f\u0440\u043e\u043a\u0441\u0438-\u043f\u043b\u0435\u0439\u0441\u0445\u043e\u043b\u0434\u0435\u0440<\/strong>, \u0438 \u0435\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0442\u0430\u0449\u0438\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u0438\u0432\u043d\u043e \u0447\u0435\u0440\u0435\u0437 <code>exports<\/code>. \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0431\u043e\u0440\u043a\u0438 <code>CommentsModule<\/code> <code>ModerationService<\/code> \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0435\u0449\u0451 \u00ab\u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442\u00bb \u0432 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>\u0418 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043d\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c <code>ModerationModule<\/code> \u0432 <code>Feed<\/code> \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u2014 \u043d\u043e \u044d\u0442\u043e \u043e\u0442\u043a\u0430\u0437 \u043e\u0442 \u0444\u0430\u0441\u0430\u0434\u0430, \u0438 \u0437\u043d\u0430\u043d\u0438\u0435 \u043e \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u0437\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0433\u043e, \u043a\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u043c\u0438. \u041c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0440\u0435\u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0432\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u2014 \u043f\u043e \u0441\u0443\u0442\u0438 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043f\u043b\u044e\u0441 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u00ab\u0442\u0435\u0447\u0451\u0442\u00bb. \u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0440\u0432\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u2014 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c <code>CommentsModule<\/code> \u0438 <code>ModerationModule<\/code>, \u043b\u0435\u0437\u0442\u044c \u0432 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0440\u043e\u0433\u0430\u043b\u0438 \u043f\u043e\u043b\u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434 \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0438\u043a\u0442\u043e \u0443\u0436\u0435 \u0442\u043e\u043b\u043a\u043e\u043c \u043d\u0435 \u043f\u043e\u043c\u043d\u0438\u0442; senior \u043d\u0430 \u0441\u0442\u0435\u043d\u0434\u0430\u043f\u0435 \u043e\u0431\u0435\u0449\u0430\u0435\u0442 \u00ab\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0441\u043f\u0440\u0438\u043d\u0442\u0435\u00bb, \u0438 \u0441\u043f\u0440\u0438\u043d\u0442, \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043d\u0435 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0435\u0442. \u041c\u043e\u0436\u043d\u043e, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0437\u0430\u043b\u0438\u0442\u044c \u0435\u0449\u0451 <code>forwardRef<\/code>-\u043e\u0432 \u0441\u0432\u0435\u0440\u0445\u0443 \u2014 \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442, \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0435\u0442, \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u0440\u0443\u043f\u043a\u043e, \u0438 \u0432 \u043b\u043e\u0433\u0430\u0445 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 <code>TypeError: Cannot read properties of undefined<\/code>.<\/p>\n<p>\u0418 \u0432\u043e\u0442 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0446\u0435\u043d\u0430 <code>forwardRef<\/code>: <strong>\u043e\u043d \u043d\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043e\u043d \u0435\u0451 \u0437\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u0435\u0442<\/strong>. \u041d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u043e\u043d \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u2014 \u043d\u043e \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c, \u043e\u043d \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0441\u0442\u044b\u043b\u0438: \u0442\u043e \u0444\u0430\u0441\u0430\u0434 \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u2014 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441-\u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440; \u0442\u043e \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0440 \u0441\u0430\u043c \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u0446\u0438\u043a\u043b \u2014 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u0451\u0440\u0433\u0430\u0442\u044c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 <code>ModuleRef.get()<\/code> \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435; \u0442\u043e \u0432 \u0442\u0435\u0441\u0442\u0430\u0445 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0433\u0440\u0430\u0444\u0430 \u043d\u0435 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u2014 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043c\u043e\u043a\u0430\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438. \u0418 \u0432\u043e\u0442 \u043d\u0430 \u044d\u0442\u0438 \u0442\u0430\u043d\u0446\u044b \u0432\u043e\u043a\u0440\u0443\u0433 \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u0443\u0445\u043e\u0434\u0438\u0442 <strong>\u043b\u044c\u0432\u0438\u043d\u0430\u044f \u0434\u043e\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/strong> \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0444\u0438\u0447\u0435. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 <strong>\u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e \u0445\u043e\u0442\u044f \u0431\u044b \u0441\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f<\/strong>, \u0430 \u043d\u0435 \u0432 \u043f\u0440\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u2014 \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0430\u0432\u0442\u043e\u0440 \u0442\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u0434\u0430\u0432\u043d\u043e \u0443\u0432\u043e\u043b\u0438\u043b\u0441\u044f, \u0438 \u0432 \u043a\u043e\u0434\u0435 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 <code>\/\/ TODO: \u0440\u0430\u0441\u043f\u0443\u0442\u0430\u0442\u044c<\/code>.<\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0442\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0435 \u043e\u0434\u0438\u043d \u0446\u0438\u043a\u043b, \u0430 60% \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b. <strong>\u0420\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u0432\u043d\u0443\u0442\u0440\u0438 \u0443\u0436\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0432 \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u0435 \u0441\u0440\u043e\u043a\u0438<\/strong> \u2014 \u043b\u044e\u0431\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u0435 \u0442\u044f\u043d\u0435\u0442 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u043f\u044f\u0442\u044c \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0447\u0435\u0440\u0435\u0437 <code>forwardRef<\/code>-\u044b, \u044d\u0441\u0442\u0438\u043c\u0435\u0439\u0442 \u00ab\u0434\u0432\u0430 \u0434\u043d\u044f\u00bb \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u00ab\u0434\u0432\u0430 \u0441\u043f\u0440\u0438\u043d\u0442\u0430\u00bb, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c. \u0410 <strong>\u043d\u0438\u043a\u0442\u043e \u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u043b\u0435\u0437\u0442\u044c<\/strong> \u0432 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0440\u043e\u0433\u0430\u043b\u0438 \u0432\u043e\u0441\u0435\u043c\u044c \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0438\u043a\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u043c\u043d\u0438\u0442 \u2014 \u0441\u0442\u0430\u0440\u043e\u0435 \u0447\u0438\u043d\u0438\u0442\u044c \u043f\u0441\u0438\u0445\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0440\u043e\u0436\u0435, \u0447\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0440\u044f\u0434\u043e\u043c. <strong>\u0410 \u00ab\u0440\u044f\u0434\u043e\u043c\u00bb \u0432 \u0441\u043b\u043e\u043c\u0430\u043d\u043d\u043e\u043c \u043c\u043e\u043d\u043e\u043b\u0438\u0442\u0435 \u2014 \u044d\u0442\u043e \u0443\u0436\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441.<\/strong> \u0418 \u0432\u043e\u0442 \u0442\u0443\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u00ab\u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u044b\u0439\u00bb \u0432\u044b\u0445\u043e\u0434: \u0440\u0443\u0431\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b. \u041d\u0435 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0434\u043e\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043d\u0435 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043e\u043d\u043e\u043b\u0438\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f, \u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0435\u0433\u043e \u043d\u0438\u043a\u0442\u043e \u0447\u0438\u043d\u0438\u0442\u044c \u043d\u0435 \u0433\u043e\u0442\u043e\u0432. \u0414\u0430\u043b\u044c\u0448\u0435 \u2014 \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 (gRPC? REST? Kafka? RabbitMQ?), \u0440\u0430\u0437\u0432\u0435\u0441\u0442\u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u0438 service discovery, \u0440\u0430\u0437\u0432\u0435\u0441\u0442\u0438 CI\/CD \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u044b, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442-\u0442\u0435\u0441\u0442\u044b, \u043e\u0431\u043c\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0451 \u0440\u0435\u0442\u0440\u0430\u044f\u043c\u0438, circuit breaker\u2019\u0430\u043c\u0438 \u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u0442\u0440\u0435\u0439\u0441\u0438\u043d\u0433\u043e\u043c, \u0437\u0430\u043d\u044f\u0442\u044c DevOps \u043d\u0430 \u043a\u0432\u0430\u0440\u0442\u0430\u043b, \u043f\u0435\u0440\u0435\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u0418 \u0432\u0441\u0451 \u044d\u0442\u043e \u2014 \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u0440\u044b\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u044b \u043e\u0442 \u0437\u0430\u0431\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u044e\u0437\u0435\u0440\u043e\u0432. \u0418\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u00ab\u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u0439 \u0432 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443\u00bb \u043a \u00ab\u043f\u043e\u043b\u044c\u0437\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u00bb: \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0440\u0443\u0431\u043b\u0435\u0439 \u0432 \u043c\u0435\u0441\u044f\u0446 \u043d\u0430 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u044e \u0440\u0430\u0434\u0438 \u043e\u0434\u043d\u043e\u0439 \u0433\u0430\u043b\u043e\u0447\u043a\u0438 \u0432 \u0447\u0435\u043a-\u043b\u0438\u0441\u0442\u0435 \u0444\u0438\u0447\u0438.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u0430\u0436\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435. \u0423 \u0432\u0430\u0441 \u043f\u0440\u043e\u0434\u0443\u043a\u0442, \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 2 \u0431\u044d\u043a\u0435\u043d\u0434\u0435\u0440\u0430 \u0438 1 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0435\u0440. \u0412\u043e\u0437\u044c\u043c\u0451\u043c \u0443\u0441\u0440\u0435\u0434\u043d\u0451\u043d\u043d\u0443\u044e \u043f\u043e\u043b\u043d\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u043d\u044c\u043e\u0440-\u0431\u044d\u043a\u0435\u043d\u0434\u0430 5k \u043c\u0435\u0441 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043d\u0430\u043b\u043e\u0433\u0430\u043c\u0438, \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043a\u043e\u0439 \u0438 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u0414\u0432\u0430 \u0431\u044d\u043a\u0435\u043d\u0434\u0435\u0440\u0430 \u0437\u0430 \u0433\u043e\u0434 = <strong>$120k<\/strong>.<\/p>\n<p>\u0412 \u0437\u0434\u043e\u0440\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0430 \u00ab\u0431\u043e\u0440\u044c\u0431\u0443 \u0441 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439\u00bb \u2014 \u0434\u0435\u0431\u0430\u0433 \u0431\u0438\u043b\u0434\u0430, \u043f\u043e\u0447\u0438\u043d\u043a\u0443 \u0442\u0435\u0441\u0442\u043e\u0432, \u043e\u0431\u0445\u043e\u0434\u043d\u044b\u0435 \u043c\u0430\u043d\u0451\u0432\u0440\u044b \u2014 \u0443\u0445\u043e\u0434\u0438\u0442 5\u201310% \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0433\u043e\u0434\u0430-\u0433\u043e\u0434 \u043b\u0435\u0436\u0438\u0442 \u043f\u043e\u0434 <code>forwardRef<\/code>-\u0430\u043c\u0438, \u2014 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e 30\u201350%. \u041d\u0430 \u0434\u0435\u043b\u044c\u0442\u0435 \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0434\u0432\u0443\u043c\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e $30\u201360k \u0432 \u0433\u043e\u0434 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0441\u0436\u0438\u0433\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0440\u043e\u0432\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043d\u0438 \u043e\u0434\u043d\u0430 \u0444\u0438\u0447\u0430 \u0437\u0430 \u044d\u0442\u043e\u0442 \u043f\u0435\u0440\u0438\u043e\u0434 \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430.<\/p>\n<p>\u041d\u043e \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u044f\u043c\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b. \u0413\u043e\u0440\u0430\u0437\u0434\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u0435\u0435 \u2014 opportunity cost. \u0412 \u0437\u0434\u043e\u0440\u043e\u0432\u043e\u0439 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435 \u0432\u0430\u0448\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u044b\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0444\u0438\u0447\u0443 \u0432 \u043d\u0435\u0434\u0435\u043b\u044e. \u0421 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0446\u0438\u043a\u043b\u0430\u043c\u0438 \u0442\u0430 \u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u044b\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0443 \u0436\u0435 \u0444\u0438\u0447\u0443 \u0432 \u0442\u0440\u0438-\u0447\u0435\u0442\u044b\u0440\u0435 \u043d\u0435\u0434\u0435\u043b\u0438 \u2014 \u043d\u0435 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u044b \u0445\u0443\u0436\u0435, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e 70% \u0441\u043f\u0440\u0438\u043d\u0442\u0430 \u0443\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u00ab\u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \/ \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0435\u0441\u0442\u044b \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \/ \u043a\u0430\u043a \u043e\u0431\u043e\u0439\u0442\u0438 \u0446\u0438\u043a\u043b\u00bb. \u0417\u0430 \u0433\u043e\u0434 \u044d\u0442\u043e 9 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0435\u0434\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0444\u0438\u0447. \u041d\u0430 \u0440\u044b\u043d\u043a\u0435, \u0433\u0434\u0435 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442 \u0437\u0430 \u044d\u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043a\u0430\u0442\u0438\u043b \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u043a\u0443, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0438 \u043f\u043b\u0430\u0442\u043d\u0443\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443, \u0432\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c.<\/p>\n<p>\u0418 \u0432\u043e\u0442 \u0437\u0434\u0435\u0441\u044c \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043a\u043a\u043e\u0440\u0434. \u0422\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 <code>forwardRef<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c 4 \u0447\u0430\u0441\u0430, \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u043e\u043f\u043b\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f $30\u201360k \u0432 \u0433\u043e\u0434 \u043f\u0440\u044f\u043c\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u0438 \u0434\u0435\u0432\u044f\u0442\u044c\u044e \u043c\u0435\u0441\u044f\u0446\u0430\u043c\u0438 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u043d\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430. ROI \u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f: <strong>\u201335 000% \u0437\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0433\u043e\u0434, \u2013180 000% \u043a \u043f\u044f\u0442\u043e\u043c\u0443, \u2013360 000% \u043a \u0434\u0435\u0441\u044f\u0442\u043e\u043c\u0443<\/strong>. \u041d\u043e \u043d\u0438\u043a\u0442\u043e \u0435\u0433\u043e \u0442\u0430\u043a \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0447\u0451\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443, \u0430 \u0440\u0430\u0437\u043c\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u043f\u043b\u0430\u0442\u0435\u0436\u043e\u043c \u043f\u043e \u0432\u0441\u0435\u043c \u0431\u0443\u0434\u0443\u0449\u0438\u043c \u0441\u043f\u0440\u0438\u043d\u0442\u0430\u043c \u2014 \u0438 \u0432\u0438\u043d\u0438\u0442\u044c \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a \u0443\u0436\u0435 \u043d\u0435\u043a\u043e\u0433\u043e: \u0430\u0432\u0442\u043e\u0440 \u0443\u0432\u043e\u043b\u0438\u043b\u0441\u044f, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c, \u0430 <code>forwardRef<\/code> \u0441\u0442\u043e\u0438\u0442 \u043a\u0430\u043a \u0441\u0442\u043e\u044f\u043b.<\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e big tech \u0438\u043b\u0438 \u044d\u043d\u0442\u0435\u0440\u043f\u0440\u0430\u0439\u0437. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0435 2 \u0431\u044d\u043a\u0435\u043d\u0434\u0435\u0440\u0430, \u0430 50\u2013200 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0435. \u041f\u043e\u043b\u043d\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u043d\u044c\u043e\u0440\u0430 \u2014 \u0443\u0436\u0435 $30\u201340k\/\u043c\u0435\u0441 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0431\u0435\u043d\u0435\u0444\u0438\u0442\u0430\u043c\u0438 \u0438 L&amp;D. \u041e\u0434\u0438\u043d \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u2014 $20\u201330M \u0432 \u0433\u043e\u0434 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443. \u0414\u043e\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u00ab\u0431\u043e\u0440\u044c\u0431\u0443 \u0441 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439\u00bb \u0442\u0430 \u0436\u0435 \u2014 30\u201350%. \u041d\u0430 \u0434\u0435\u043b\u044c\u0442\u0435 \u044d\u0442\u043e $6\u201315M \u0432 \u0433\u043e\u0434 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0432 \u0442\u0440\u0443\u0431\u0443, \u0431\u0435\u0437 \u0435\u0434\u0438\u043d\u043e\u0439 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u0444\u0438\u0447\u0438.<\/p>\n<p>\u041f\u043b\u044e\u0441 \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0438\u0437 10\u201315 \u0441\u0438\u043d\u044c\u043e\u0440\u043e\u0432, \u0447\u044c\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u2014 \u043f\u043e\u043c\u043e\u0433\u0430\u0442\u044c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443. \u0415\u0449\u0451 $4\u20136M \u0432 \u0433\u043e\u0434. \u041b\u044e\u0431\u0430\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u043a\u0440\u0443\u043f\u043d\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u2014 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 18\u201324 \u043c\u0435\u0441\u044f\u0446\u0430 \u0441 \u0431\u044e\u0434\u0436\u0435\u0442\u043e\u043c $15\u201330M, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0444\u0438\u0447\u0438 \u043d\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043e\u043e\u0431\u0449\u0435. \u041a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442 \u0437\u0430 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0440\u0438 \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432\u044b\u0445 \u043b\u0438\u043d\u0435\u0439\u043a\u0438.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0430. \u0421\u0438\u043d\u044c\u043e\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442, \u0447\u0442\u043e \u0447\u0438\u043d\u0438\u0442\u044c \u0443\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f, \u0443\u0445\u043e\u0434\u044f\u0442 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0433\u043e\u0434\u0430-\u0434\u0432\u0443\u0445 \u2014 \u043a\u0430\u0440\u044c\u0435\u0440\u0430 \u0437\u0434\u0435\u0441\u044c \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0431\u043e\u0440\u044c\u0431\u0435 \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043d\u0430\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u043e\u043c. \u041d\u0430 \u0438\u0445 \u043c\u0435\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043b\u044e\u0434\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0433\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043a\u0430\u0441\u0430\u0442\u044c\u0441\u044f, \u0430 \u0433\u0434\u0435 \u043d\u0435\u043b\u044c\u0437\u044f. \u0412\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0440\u0430\u0441\u0446\u0432\u0435\u0442\u0430\u0435\u0442 \u00abframework-\u0432\u043e\u0439\u043d\u0430\u00bb: \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u0438\u043b\u044f\u0442 \u0441\u0432\u043e\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u0451\u0440\u0442\u043a\u0438, \u043b\u0438\u0448\u044c \u0431\u044b \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0442\u044c \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438. \u041b\u044e\u0431\u0430\u044f M&amp;A-\u0441\u0434\u0435\u043b\u043a\u0430 \u043f\u0440\u043e\u0441\u0435\u0434\u0430\u0435\u0442 \u043f\u043e \u0442\u0430\u0439\u043c\u043b\u0430\u0439\u043d\u0443 \u0432\u0434\u0432\u043e\u0435 \u2014 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0443\u043f\u043b\u0435\u043d\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e \u0432 \u044d\u0442\u043e\u0442 \u043a\u043b\u0443\u0431\u043e\u043a \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u043e\u043b\u0433 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0440\u0438\u0441\u043a \u0443\u0440\u043e\u0432\u043d\u044f \u0441\u043e\u0432\u0435\u0442\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u2014 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0441\u0451 \u0435\u0449\u0451 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u00ab\u0431\u0435\u0437\u043e\u0431\u0438\u0434\u043d\u044b\u0439 <code>forwardRef<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0442\u043e-\u0442\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0432\u043e\u0441\u0435\u043c\u044c \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434\u00bb.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e \u0440\u0435\u0437\u044e\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c: \u0432\u0441\u0451, \u0447\u0442\u043e \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u2014 \u043e\u0442 \u0446\u0438\u043a\u043b\u043e\u0432 \u0438 <code>forwardRef<\/code>-\u043e\u0432 \u0434\u043e \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u0432 \u0433\u043e\u0434 \u0438 framework-\u0432\u043e\u0439\u043d \u2014 \u044d\u0442\u043e \u0441\u0438\u043c\u043f\u0442\u043e\u043c\u044b \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0423 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0421\u0435\u0440\u0432\u0438\u0441\u044b \u0437\u043e\u0432\u0443\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u043c\u0435\u0442\u043e\u0434\u044b \u0437\u043e\u0432\u0443\u0442 \u043c\u0435\u0442\u043e\u0434\u044b, \u0438 \u043b\u044e\u0431\u0430\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u00ab\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c\u00bb \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0435\u0447\u0435\u0433\u043e \u2014 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0432\u0441\u0451 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0430\u043d\u043e. \u041d\u0438\u043a\u0442\u043e \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u043b\u043e\u0445\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u041f\u0440\u043e\u0441\u0442\u043e \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0438 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043d\u0430\u0447\u043d\u0451\u043c \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b: \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0434\u0443\u043b\u044f, \u0447\u0442\u043e\u0431\u044b \u0442\u0430\u043a\u043e\u0439 \u0446\u0438\u043a\u043b \u0431\u044b\u043b\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c.<\/p>\n<p>\u0410 \u0447\u0442\u043e \u0436\u0435 \u0434\u0435\u043b\u0430\u0442\u044c-\u0442\u043e? \u042d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u044b\u043b \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441\u043b\u0430\u0431\u043e \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u043d\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0430 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u043a\u043e\u0442\u0430 \u0448\u0440\u0451\u0434\u0438\u043d\u0433\u0435\u0440\u0430. \u041c\u044b \u0441 \u0432\u0430\u043c\u0438 \u043f\u043e\u044d\u0442\u0430\u043f\u043d\u043e, \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u0430 \u043f\u043e\u0442\u0435\u0440\u0438 \u0431\u0438\u0437\u043d\u0435\u0441\u0443, time-to-market \u0444\u0438\u0447\u0438 \u0432 \u0440\u0430\u0437\u044b \u0434\u043e\u043b\u044c\u0448\u0435, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043d\u0430 \u0441\u043e\u043f\u043b\u044f\u0445. \u0425\u043e\u0442\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e.<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1038426\/\">https:\/\/habr.com\/ru\/articles\/1038426\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u0430\u044f \u0434\u043e\u043a\u0442\u0440\u0438\u043d\u0430 \u0434\u043b\u044f NestJS-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432: \u0440\u0430\u0437\u0431\u043e\u0440 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0434\u0435\u0433\u0440\u0430\u0434\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0435\u0451 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u0438 \u0440\u043e\u0441\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430.\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0435\u0433\u043e \u044d\u0442\u0430 \u00ab\u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u044b\u00bb \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0435 \u0447\u0443\u0442\u044c \u0434\u043b\u0438\u043d\u043d\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043f\u0440\u0438\u043d\u0442\u0430. \u0423 \u043d\u0430\u0441 \u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c FollowsService \u2014 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0436\u0438\u0432\u0451\u0442 \u0432 \u0441\u0432\u043e\u0451\u043c \u043c\u043e\u0434\u0443\u043b\u0435, \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u0438 \u00abfollowerId \u2192 targetUserId\u00bb \u0432 \u0441\u0432\u043e\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442. \u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u2014 UsersModule \u0441 \u0440\u0430\u0437\u043d\u0435\u0441\u0451\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043a\u0443\u0441\u043e\u0447\u043a\u0430\u043c\u0438: UserPrivacyService \u0438 UserSettingsService. \u041a\u0430\u0436\u0434\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u0432\u043e\u044e \u0433\u0440\u0430\u043d\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. Single responsibility, \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0447\u0438\u0441\u0442\u0430\u044f, \u0440\u0435\u0432\u044c\u044e \u2014 \u043f\u0440\u0430\u0437\u0434\u043d\u0438\u043a.\u0414\u0430\u043b\u044c\u0448\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0430\u043f\u043f\u043e\u0440\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0438\u0434\u0442\u0438 \u0436\u0430\u043b\u043e\u0431\u044b: \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u0446\u044b \u043f\u0438\u0448\u0443\u0442 \u0432 \u043b\u0438\u0447\u043a\u0443 \u0432\u0441\u044f\u043a\u0443\u044e \u0433\u0430\u0434\u043e\u0441\u0442\u044c, \u044e\u0437\u0435\u0440\u044b \u0445\u043e\u0442\u044f\u0442 \u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0433\u043b\u0430\u0437. \u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439, \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0439 \u2014 \u043f\u0440\u043e\u0434\u0430\u043a\u0442 \u0435\u0433\u043e \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442: \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b. \u041d\u0430 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0448\u044c follow request, \u0432\u043b\u0430\u0434\u0435\u043b\u0435\u0446 \u043e\u0434\u043e\u0431\u0440\u044f\u0435\u0442 \u0438\u043b\u0438 \u043d\u0435\u0442. \u041b\u043e\u0433\u0438\u043a\u0430 \u043d\u0430 \u043f\u043e\u043b\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432 Notion. \u0418\u0434\u0435\u044f \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f, \u0434\u0435\u043d\u044c \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u0443, \u0434\u0432\u0430.\u041a\u0435\u0439\u0441: \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438\u0422\u0438\u043a\u0435\u0442 \u043f\u0440\u0438\u0437\u0435\u043c\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0431\u044d\u043a\u0435\u043d\u0434. \u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c? \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a FollowsService \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 follows, \u043d\u0430\u0434\u043e \u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0438 \u0443\u0437\u043d\u0430\u0442\u044c, \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043b\u0438 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0443 \u0442\u043e\u0433\u043e, \u043d\u0430 \u043a\u043e\u0433\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u0434\u0430 \u2014 \u043a\u043b\u0430\u0434\u0451\u043c \u0437\u0430\u044f\u0432\u043a\u0443 \u0432 follow_requests \u0438 \u0436\u0434\u0451\u043c \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u0438\u044f \u043e\u0442 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u2014 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e. \u0417\u043d\u0430\u043d\u0438\u0435 \u043e \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0441\u0442\u0438 \u0436\u0438\u0432\u0451\u0442 \u0432 UsersModule (\u0433\u0434\u0435 \u0435\u043c\u0443 \u0435\u0449\u0451 \u0436\u0438\u0442\u044c?), \u0437\u043d\u0430\u0447\u0438\u0442 FollowsService \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 UserPrivacyService. \u041d\u0430 \u0440\u0435\u0432\u044c\u044e \u0442\u0430\u043a\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0439\u0434\u0451\u0442 \u0437\u0430 \u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044c \u0441\u0435\u043a\u0443\u043d\u0434.@Injectable()export class FollowsService {  constructor(private readonly userPrivacyService: UserPrivacyService) {}  async follow(    followerId: string,    targetUserId: string,  ): Promise&lt;FollowResponse&gt; {    const isPrivateResult =      await this.userPrivacyService.isPrivate(targetUserId);    if (isPrivateResult.isErr()) {      throw new InternalServerErrorException(isPrivateResult.error);    }    if (isPrivateResult.value) {      return this.createFollowRequest(followerId, targetUserId);    }    return this.createFollow(followerId, targetUserId);  }  private async createFollowRequest(    followerId: string,    targetUserId: string,  ): Promise&lt;FollowResponse&gt; {    \/\/ \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u044f\u0432\u043a\u0443 \u043d\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443  }  private async createFollow(    followerId: string,    targetUserId: string,  ): Promise&lt;FollowResponse&gt; {    \/\/ \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443  }}\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0432\u0441\u0451 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435. FollowsService \u0441\u043f\u0440\u043e\u0441\u0438\u043b \u0443 UsersModule: \u00ab\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u0438\u043b\u0438 \u043d\u0435\u0442?\u00bb \u2014 \u0438 \u043f\u043e\u0448\u0451\u043b \u0434\u0430\u043b\u044c\u0448\u0435. \u0421\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0434\u043d\u0430, \u0438\u0434\u0451\u0442 \u0432 \u043e\u0434\u043d\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u043d\u0430 \u0441\u0445\u0435\u043c\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440\u0430 \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u043f\u0435\u0442\u0435\u043b\u044c. \u0415\u0441\u043b\u0438 \u0431\u044b \u0444\u0438\u0447\u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u0438 \u043a\u043e\u043d\u0447\u0438\u043b\u0438\u0441\u044c \u2014 \u0443 \u043d\u0430\u0441 \u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0438 \u0441\u0442\u0430\u0442\u044c\u0438, \u043d\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u041d\u043e \u0444\u0438\u0447\u0438, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043d\u0435 \u043a\u043e\u043d\u0447\u0430\u044e\u0442\u0441\u044f.\u0427\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443 \u0441\u043f\u0440\u0438\u043d\u0442\u043e\u0432 \u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439: viewer \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0447\u0443\u0436\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c. \u0418 \u0442\u0443\u0442 \u0432\u044b\u043b\u0435\u0437\u0430\u0435\u0442 \u0446\u0435\u043b\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u00ab\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u0438\u043b\u0438 \u043d\u0435\u0442\u00bb \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442. \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c? \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432\u0438\u0434\u0435\u0442\u044c \u0442\u0432\u0438\u0442\u044b? \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432\u0438\u0434\u0435\u0442\u044c \u043b\u0430\u0439\u043a\u0438, \u0438\u0441\u0442\u043e\u0440\u0438\u0438, \u0447\u0443\u0436\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438? \u041b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442\u0441\u044f: \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u2014 \u0441\u0432\u043e\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0445 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432 \u2014 \u0441\u0432\u043e\u0438, \u0434\u043b\u044f \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u2014 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435. \u0421\u0442\u0430\u0440\u044b\u0439 UserPrivacyService \u0441 \u044d\u0442\u0438\u043c \u0443\u0436\u0435 \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f (\u043e\u043d \u0443\u043c\u0435\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u0438\u043b\u0438 \u043d\u0435\u0442\u00bb), \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u0432\u043e\u0434\u0438\u0442 \u0440\u044f\u0434\u043e\u043c \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u2014 UserAccessService. \u041f\u043e \u0432\u0441\u0435\u043c \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u0430\u043c \u2014 single responsibility, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0432\u0441\u0451 \u043a\u0430\u043a \u043d\u0430\u0434\u043e.\u0418 \u0440\u043e\u0432\u043d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 UserAccessService \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441. \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u00ab\u043c\u043e\u0436\u0435\u0442 \u043b\u0438 viewer \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0432\u0438\u0442\u044b owner-\u0430\u00bb, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u043d\u0430\u0442\u044c, \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d \u043b\u0438 viewer \u043d\u0430 owner. \u0410 \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0436\u0438\u0432\u0451\u0442 \u0432 FollowsService. \u0417\u043d\u0430\u0447\u0438\u0442, UserAccessService \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 FollowsService.@Injectable()export class UserAccessService {  constructor(    private readonly followsService: FollowsService,    private readonly userPrivacyService: UserPrivacyService,  ) {}  async canViewProfile(    viewerId: string,    ownerId: string,  ): Promise&lt;Result&lt;boolean, UserAccessErrorCode&gt;&gt; {    const isPrivateResult = await this.userPrivacyService.isPrivate(ownerId);    if (isPrivateResult.isErr()) {      return err(isPrivateResult.error);    }    if (!isPrivateResult.value) {      return ok(true);    }    const isFollowingResult = await this.followsService.isFollowing(      viewerId,      ownerId,    );    if (isFollowingResult.isErr()) {      return err(isFollowingResult.error);    }    return ok(isFollowingResult.value);  }  async canViewTweets(    viewerId: string,    ownerId: string,  ): Promise&lt;Result&lt;boolean, UserAccessErrorCode&gt;&gt; {    const isPrivateResult = await this.userPrivacyService.isPrivate(ownerId);    if (isPrivateResult.isErr()) {      return err(isPrivateResult.error);    }    if (!isPrivateResult.value) {      return ok(true);    }    const isFollowingResult = await this.followsService.isFollowing(      viewerId,      ownerId,    );    if (isFollowingResult.isErr()) {      return err(isFollowingResult.error);    }    return ok(isFollowingResult.value);  }}\u0423 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u0439 \u0446\u0438\u043a\u043b. \u0421 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0437\u0433\u043b\u044f\u0434\u0430 \u2014 \u0431\u0435\u0437\u043e\u0431\u0438\u0434\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043e\u043d \u0435\u0449\u0451 \u043f\u0440\u044f\u0447\u0435\u0442\u0441\u044f \u0437\u0430 \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435\u043c.UserAccessService:  \u2192 FollowsService  \u2192 UserPrivacyServiceFollowsService:  \u2192 UserPrivacyService\u0412\u0441\u0435 \u0441\u0442\u0440\u0435\u043b\u043a\u0438 \u0438\u0434\u0443\u0442 \u0432\u043f\u0435\u0440\u0451\u0434, \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u2014 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u0410 \u0432\u043e\u0442 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u0443\u0436\u0435 \u0437\u0435\u0440\u043a\u0430\u043b\u044c\u043d\u0430\u044f:FollowsModule  \u21c4  UsersModuleFollowsModule \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 UsersModule \u0440\u0430\u0434\u0438 UserPrivacyService. UsersModule \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 FollowsModule \u0440\u0430\u0434\u0438 FollowsService. \u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d \u2014 \u043b\u044e\u0431\u043e\u0439 \u0440\u0435\u0432\u044c\u044e\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u043e\u0434\u043e\u0431\u0440\u0438\u0442\u044c. \u041d\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u043e\u043d\u0438 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u043b\u043e\u0432\u0443\u0448\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0445\u043b\u043e\u043f\u043d\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0438 \u043d\u0435 \u0437\u0430\u0432\u0442\u0440\u0430 \u2014 \u0430 \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0430-\u0442\u0440\u0438 \u0441\u043f\u0440\u0438\u043d\u0442\u0430, \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0447\u0435\u0442\u0432\u0435\u0440\u0433, \u043d\u0430 \u0447\u044c\u0451\u043c-\u0442\u043e PR, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a \u0441\u0430\u043c\u0438\u043c \u044d\u0442\u0438\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0430\u043c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442.\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0432 \u043a\u043e\u0434\u0435\u0415\u0441\u043b\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0451 \u0432 \u043f\u043b\u043e\u0441\u043a\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 @Module-\u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0431\u043c\u0430\u043d\u0447\u0438\u0432\u043e \u043f\u0440\u043e\u0441\u0442\u043e. FollowsModule \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442 \u00ab\u043c\u043d\u0435 \u043d\u0443\u0436\u0435\u043d UsersModule\u00bb, UsersModule \u2014 \u00ab\u043c\u043d\u0435 \u043d\u0443\u0436\u0435\u043d FollowsModule\u00bb:@Module({  imports: [UsersModule],  providers: [FollowsService],  exports: [FollowsService],})export class FollowsModule {}@Module({  imports: [FollowsModule],  providers: [UserPrivacyService, UserAccessService],  exports: [UserPrivacyService, UserAccessService],})export class UsersModule {}\u0427\u0435\u0442\u044b\u0440\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0430, \u0434\u0432\u0430 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430, \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e forwardRef, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0440\u044e\u043a\u043e\u0432. \u041d\u0438 \u043e\u0434\u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u2014 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 approve \u0437\u0430 \u0434\u0435\u0441\u044f\u0442\u044c \u0441\u0435\u043a\u0443\u043d\u0434. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0439 \u043f\u0430\u0440\u044b imports \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b NestJS \u0448\u0432\u044b\u0440\u043d\u0443\u043b \u0442\u043e \u0441\u0430\u043c\u043e\u0435 Nest can&#8217;t resolve dependencies.\u041b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u043e Nest \u0434\u0430\u0451\u0442 \u0441\u0430\u043c, \u043f\u0440\u044f\u043c\u043e \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u2014 forwardRef. \u041e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0448\u044c \u0438\u043c\u043f\u043e\u0440\u0442 \u0432 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0438 DI \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043b\u0435\u043d\u0438\u0432\u043e, \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0430 \u043d\u0435 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0431\u043e\u0440\u043a\u0438. \u0417\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0432\u044b\u0448\u0435: \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442, \u043e\u043d \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442. \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0447\u0438\u0442\u0430\u0435\u0442, \u043a\u0438\u0432\u0430\u0435\u0442, \u043f\u0430\u0442\u0447\u0438\u0442 \u043e\u0431\u0430 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430:@Module({  imports: [forwardRef(() =&gt; UsersModule)],  providers: [FollowsService],  exports: [FollowsService],})export class FollowsModule {}@Module({  imports: [forwardRef(() =&gt; FollowsModule)],  providers: [UserPrivacyService, UserAccessService],  exports: [UserPrivacyService, UserAccessService],})export class UsersModule {}\u0418 \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u0432\u0441\u0451 \u0441\u043d\u043e\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0411\u0438\u043b\u0434 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f, \u0442\u0435\u0441\u0442\u044b \u0438\u0434\u0443\u0442, \u0432 \u043b\u043e\u0433\u0430\u0445 \u0442\u0438\u0445\u043e. \u041d\u0430 \u0440\u0435\u0432\u044c\u044e \u0434\u0432\u0430 \u0441\u043b\u043e\u0432\u0430 forwardRef \u043f\u0440\u043e\u0439\u0434\u0443\u0442 \u0442\u0430\u043a \u0436\u0435 \u043b\u0435\u0433\u043a\u043e, \u043a\u0430\u043a \u0438 \u0441\u0430\u043c\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u2014 \u044d\u0442\u043e \u0436\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 API, \u0432\u0441\u0451 \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u043e. PR \u043c\u0435\u0440\u0434\u0436\u0438\u0442\u0441\u044f \u2014 \u0438 \u043d\u0430 \u043f\u043e\u043b\u0433\u043e\u0434\u0430 \u043e \u0446\u0438\u043a\u043b\u0435 \u0432\u0441\u0435 \u0434\u0440\u0443\u0436\u043d\u043e \u0437\u0430\u0431\u044b\u0432\u0430\u044e\u0442.\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u2014 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 forwardRef \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043c\u0441\u0442\u0438\u0442\u044c\u041f\u043e\u043b\u0433\u043e\u0434\u0430 \u0441\u043f\u0443\u0441\u0442\u044f \u043f\u0440\u043e \u0446\u0438\u043a\u043b Users \u2194 Follows \u0443\u0436\u0435 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043f\u043e\u043c\u043d\u0438\u0442. \u0416\u0438\u0437\u043d\u044c \u0438\u0434\u0451\u0442, \u0444\u0438\u0447\u0438 \u0432\u044b\u043a\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f, CI \u0437\u0435\u043b\u0451\u043d\u044b\u0439, \u043d\u043e\u0432\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432\u0438\u0434\u044f\u0442 forwardRef \u0432 imports \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0435\u0433\u043e \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0438\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u2014 \u0440\u0430\u0437 \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u044e\u0442 \u0432\u0435\u0437\u0434\u0435, \u0437\u043d\u0430\u0447\u0438\u0442, \u0442\u0430\u043a \u0438 \u043d\u0430\u0434\u043e.\u0418 \u0442\u0443\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u0430\u0434\u0438\u0442\u0441\u044f \u0437\u0430 \u043d\u043e\u0432\u0443\u044e \u0444\u0438\u0447\u0443 \u2014 \u043b\u0435\u043d\u0442\u0443 \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u043c\u0438. \u0423 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c CommentsModule \u0438 ModerationModule. \u0423\u0433\u0430\u0434\u0430\u0439\u0442\u0435, \u0432 \u043a\u0430\u043a\u0438\u0445 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f\u0445. CommentsService \u0445\u043e\u0434\u0438\u0442 \u0432 ModerationService \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u00ab\u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442?\u00bb (\u0430\u043d\u0442\u0438-\u0441\u043f\u0430\u043c, \u0431\u0430\u043d, \u0440\u0435\u0439\u0442-\u043b\u0438\u043c\u0438\u0442). ModerationService \u0445\u043e\u0434\u0438\u0442 \u0432 CommentsService \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c\u0438 N \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u044e\u0437\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043f\u0430\u043c-\u0441\u043a\u043e\u0440. \u0426\u0438\u043a\u043b? \u0426\u0438\u043a\u043b. forwardRef? forwardRef.@Module({  imports: [forwardRef(() =&gt; ModerationModule)],  providers: [CommentsService],  exports: [CommentsService],})export class CommentsModule {}@Module({  imports: [forwardRef(() =&gt; CommentsModule)],  providers: [ModerationService],  exports: [ModerationService],})export class ModerationModule {}\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f FeedModule. \u041b\u0435\u043d\u0442\u0430 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0438\u0437 \u043f\u043e\u0441\u0442\u043e\u0432, \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u043f\u043e\u0441\u0442\u043e\u043c \u2014 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u044b, \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u044b \u043e\u0442 \u0437\u0430\u0431\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u044e\u0437\u0435\u0440\u043e\u0432 \u043d\u0430\u0434\u043e \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c. \u041f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0430 \u043c\u043e\u0434\u0443\u043b\u044f:@Module({  imports: [CommentsModule, ModerationModule],  providers: [FeedService],})export class FeedModule {}\u0418 \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f. \u041d\u043e \u0442\u0443\u0442 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0437\u0434\u043e\u0440\u043e\u0432\u044b\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0438\u043d\u043a\u0442:\u00ab\u0421\u0442\u043e\u043f, \u0430 \u043f\u043e\u0447\u0435\u043c\u0443 Feed \u0432\u043e\u043e\u0431\u0449\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u043d\u0430\u0442\u044c \u043f\u0440\u043e Moderation? \u041c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u044f \u2014 \u044d\u0442\u043e \u0434\u0435\u0442\u0430\u043b\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Comments. \u0415\u0441\u043b\u0438 \u0437\u0430\u0432\u0442\u0440\u0430 \u043c\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0435\u0451 \u043d\u0430 ML-\u043c\u043e\u0434\u0435\u043b\u044c, Feed \u043e\u0431 \u044d\u0442\u043e\u043c \u0443\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d. \u0421\u0434\u0435\u043b\u0430\u0435\u043c CommentsModule \u0444\u0430\u0441\u0430\u0434\u043e\u043c \u0438 \u0440\u0435\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u043d\u0451\u043c ModerationService \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e\u00bb.\u042d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435. \u041f\u043e \u0432\u0441\u0435\u043c \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u0430\u043c \u2014 \u0444\u0430\u0441\u0430\u0434\u044b, \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f, \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0437\u043d\u0430\u043d\u0438\u0439 \u0443 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f. \u041b\u044e\u0431\u043e\u0439 \u0448\u0430\u0440\u044f\u0449\u0438\u0439 \u0440\u0435\u0432\u044c\u044e\u0435\u0440 \u0442\u0430\u043a\u043e\u0439 PR \u043e\u0434\u043e\u0431\u0440\u0438\u0442.@Module({  imports: [forwardRef(() =&gt; ModerationModule)],  providers: [CommentsService],  exports: [CommentsService, ModerationService], \/\/ \u0444\u0430\u0441\u0430\u0434\u0438\u043c})export class CommentsModule {}\u0418 \u0442\u0443\u0442 Nest \u043d\u0430\u043c \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442:Nest can&#8217;t resolve dependencies of the FeedService (?).Please make sure that the argument ModerationService at index [0] is available in the FeedModule context.\u041d\u0438\u043a\u0430\u043a\u043e\u0439 forwardRef \u0442\u0443\u0442 \u043d\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e forwardRef \u2014 \u044d\u0442\u043e \u043d\u0435 \u043c\u043e\u0434\u0443\u043b\u044c, \u044d\u0442\u043e \u043f\u0440\u043e\u043a\u0441\u0438-\u043f\u043b\u0435\u0439\u0441\u0445\u043e\u043b\u0434\u0435\u0440, \u0438 \u0435\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0442\u0430\u0449\u0438\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u0438\u0432\u043d\u043e \u0447\u0435\u0440\u0435\u0437 exports. \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0431\u043e\u0440\u043a\u0438 CommentsModule ModerationService \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0435\u0449\u0451 \u00ab\u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442\u00bb \u0432 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435.\u0418 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043d\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c ModerationModule \u0432 Feed \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u2014 \u043d\u043e \u044d\u0442\u043e \u043e\u0442\u043a\u0430\u0437 \u043e\u0442 \u0444\u0430\u0441\u0430\u0434\u0430, \u0438 \u0437\u043d\u0430\u043d\u0438\u0435 \u043e \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u0437\u0430\u0435\u0442\u0441\u044f &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-480733","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/480733","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=480733"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/480733\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=480733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=480733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=480733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}