code: function validate(path, options) {
          return _extensionManagerCall(function (extensionManager) {
              var d = new $.Deferred();
              
              // make sure proxy is attached to options before calling validate
              // so npm can use it in the domain
              options = options || {};
              options.proxy = PreferencesManager.get("proxy");
              
              extensionManager.validate(path, options)
                  .done(function (result) {
                      d.resolve({
                          errors: result.errors,
                          metadata: result.metadata
                      });
                  })
                  .fail(function (error) {
                      d.reject(error);
                  });
  
              return d.promise();
          });
      }
docs: TODO: can this go away now that we never call it directly?
  
  Validates the package at the given path. The actual validation is
  handled by the Node server.
  
  The promise is resolved with an object:
  { errors: Array.<{string}>, metadata: { name:string, version:string, ... } }
  metadata is pulled straight from package.json and will be undefined
  if there are errors or null if the extension did not include package.json.
  
  @param {string} Absolute path to the package zip file
  @param {{requirePackageJSON: ?boolean}} validation options
  @return {$.Promise} A promise that is resolved with information about the package