constructor()

in changelogs-md.js [483:551]


  constructor(argv) {
    super(argv);

    // The stack that holds the shared underlying resources.
    const sharedResources = new SharedResources(this, 'prod-shared-resources');

    // The micro components that make up the application
    this.crawler = new Crawler(this, 'prod-crawler', {
      vpc: sharedResources.vpc,
      redis: sharedResources.redis,
      changelogsTable: sharedResources.changelogsTable,
      feedsTable: sharedResources.feedsTable,
      searchIndexTable: sharedResources.searchIndexTable,
      webBucket: sharedResources.webBucket,
      apiBucket: sharedResources.apiBucket,
      toCrawlTopic: sharedResources.toCrawlTopic
    });

    this.recrawler = new Recrawler(this, 'prod-recrawler', {
      changelogsTable: sharedResources.changelogsTable,
      toCrawlTopic: sharedResources.toCrawlTopic
    });

    this.recentlyCrawled = new RecentlyCrawled(this, 'prod-recently-crawled', {
      feedsTable: sharedResources.feedsTable,
      apiBucket: sharedResources.apiBucket
    });

    this.npmFollower = new NpmFollower(this, 'prod-npm-follower', {
      changelogsTable: sharedResources.changelogsTable,
      toCrawlTopic: sharedResources.toCrawlTopic,
      cluster: sharedResources.cluster,
    });

    this.pypiFollower = new PyPIFollower(this, 'prod-pypi-follower', {
      changelogsTable: sharedResources.changelogsTable,
      toCrawlTopic: sharedResources.toCrawlTopic
    });

    this.rubygemFollower = new RubyGemFollower(this, 'prod-rubygem-follower', {
      changelogsTable: sharedResources.changelogsTable,
      toCrawlTopic: sharedResources.toCrawlTopic
    });

    const broadcast = new BroadcastSocket(this, 'prod-broadcast', {
      redis: sharedResources.redis,
      cluster: sharedResources.cluster
    });

    const autocompleter = new Autocompleter(this, 'prod-autocomplete', {
      searchIndexTable: sharedResources.searchIndexTable
    });

    this.webFrontend = new WebFrontend(this, 'prod-web-frontend', {
      changelogsTable: sharedResources.changelogsTable,
      feedsTable: sharedResources.feedsTable,
      webBucket: sharedResources.webBucket,
      staticBucket: sharedResources.staticBucket
    });

    // A Cloudfront distribution that serves the website
    this.dist = new GlobalDistribution(this, 'prod-cloudfront-distribution', {
      webBucket: sharedResources.webBucket,
      apiBucket: sharedResources.apiBucket,
      staticBucket: sharedResources.staticBucket,
      autocompleteGateway: autocompleter.autocompleteGateway,
      broadcast: broadcast
    });
  }