/provider/getFrom

The getFrom provider module allows XYZ modules to get resources either from configured sources.

Methods

(async, inner) Cloudfront(ref, cache) → {Promise.<(String|JSON|Error)>}

The method will extract a cloudfront URL from the ref param string.

The fetch request will be created from the cloudfront provider module with the cloudfront url.

The fetch request will be stored in a cache Map object for requests from the cacheTemplates workspace module.

Parameters:
NameTypeDescription
refstring

Cloudfront resource reference.

cacheboolean

The resource fetch request should be cached.

Returns:

The fetch is resolved into either a string or JSON depending on the url ending.

Type: 
Promise.<(String|JSON|Error)>