node_modules/contentful-management/dist/es-modules/entities/environment.js
/**
 * This method creates the API for the given environment with all the methods for
 * reading and creating other entities. It also passes down a clone of the
 * http client with a environment id, so the base path for requests now has the
 * environment id already set.
 * @private
 * @param  {Object} http - HTTP client instance
 * @param  {Object} data - API response for a Environment
 * @return {Environment}
 */
This method creates the API for the given environment with all the methods for
reading and creating other entities. It also passes down a clone of the
http client with a environment id, so the base path for requests now has the
environment id already set.
@private
@param  {Object} http - HTTP client instance
@param  {Object} data - API response for a Environment
@return {Environment}
This method creates the API for the given environment with all the methods for reading and creating other entities . It also passes down a clone of the http client with a environment id so the base path for requests now has the environment id already set . @private @param { Object } http - HTTP client instance @param { Object } data - API response for a Environment @return { Environment }
function wrapEnvironment(http, data) {
  var environment = toPlainObject(cloneDeep(data));
  var _http$httpClientParam = http.httpClientParams,
      hostUpload = _http$httpClientParam.hostUpload,
      defaultHostnameUpload = _http$httpClientParam.defaultHostnameUpload;
  var environmentScopedHttpClient = http.cloneWithNewParams({
    baseURL: http.defaults.baseURL + 'environments/' + environment.sys.id
  });
  var environmentScopedUploadClient = http.cloneWithNewParams({
    space: environment.sys.space.sys.id,
    host: hostUpload || defaultHostnameUpload
  });
  var environmentApi = createEnvironmentApi({
    http: environmentScopedHttpClient,
    httpUpload: environmentScopedUploadClient
  });
  var enhancedEnvironment = enhanceWithMethods(environment, environmentApi);
  return freezeSys(enhancedEnvironment);
}
function wrapEnvironment ( http , data ) { var environment = toPlainObject ( cloneDeep ( data ) ) ; var _http$httpClientParam = http . httpClientParams , hostUpload = _http$httpClientParam . hostUpload , defaultHostnameUpload = _http$httpClientParam . defaultHostnameUpload ; var environmentScopedHttpClient = http . cloneWithNewParams ( { baseURL : http . defaults . baseURL + 'environments/' + environment . sys . id } ) ; var environmentScopedUploadClient = http . cloneWithNewParams ( { space : environment . sys . space . sys . id , host : hostUpload || defaultHostnameUpload } ) ; var environmentApi = createEnvironmentApi ( { http : environmentScopedHttpClient , httpUpload : environmentScopedUploadClient } ) ; var enhancedEnvironment = enhanceWithMethods ( environment , environmentApi ) ; return freezeSys ( enhancedEnvironment ) ; }
This method creates the API for the given environment with all the methods for
 reading and creating other entities.
This method creates the API for the given environment with all the methods for reading and creating other entities .