lib/syncmanager.js
function(callback) {
    async.waterfall([
      // 1. Resolve loose package versions.
      function(done) {
        var master = this.master;
        var packageToVersions = this.packageToVersions;
        Package.versions(master, packageToVersions, function(err, result) {
          this.packageToVersions = result;
          done(err, result);
        }.bind(this));
      }.bind(this),

      // 2. Dependency search.
      this.dependencySearch.bind(this),

      // 3. Make sure we have package and package version dirs.
      this.makedirs.bind(this),

      // 4. Download the world.
      this.download.bind(this),

      // 5. Commit the downloads to our package repository.
      this.commit.bind(this)
    ], callback);
  }
function(callback) {
    async.waterfall([
      // 1. Resolve loose package versions.
      function(done) {
        var master = this.master;
        var packageToVersions = this.packageToVersions;
        Package.versions(master, packageToVersions, function(err, result) {
          this.packageToVersions = result;
          done(err, result);
        }.bind(this));
      }.bind(this),

      // 2. Dependency search.
      this.dependencySearch.bind(this),

      // 3. Make sure we have package and package version dirs.
      this.makedirs.bind(this),

      // 4. Download the world.
      this.download.bind(this),

      // 5. Commit the downloads to our package repository.
      this.commit.bind(this)
    ], callback);
  }
function ( callback ) { async . waterfall ( [ // 1. Resolve loose package versions. function ( done ) { var master = this . master ; var packageToVersions = this . packageToVersions ; Package . versions ( master , packageToVersions , function ( err , result ) { this . packageToVersions = result ; done ( err , result ) ; } . bind ( this ) ) ; } . bind ( this ) , // 2. Dependency search. this . dependencySearch . bind ( this ) , // 3. Make sure we have package and package version dirs. this . makedirs . bind ( this ) , // 4. Download the world. this . download . bind ( this ) , // 5. Commit the downloads to our package repository. this . commit . bind ( this ) ] , callback ) ; }
Sync the packages we're watching from the master registry.

@param {Function} callback invoke when done.
Sync the packages we re watching from the master registry .