make imports work properly

This commit is contained in:
Randall Schmidt
2021-06-12 15:47:06 -04:00
parent 34c8887e51
commit 7b0835fcf1
2 changed files with 11 additions and 7 deletions

View File

@ -4,6 +4,7 @@ const { URLSearchParams } = require('url');
const crypto = require('crypto');
const Response = require('./classes/response.js');
const MemoryCache = require('./classes/caching/memory_cache.js');
const FileSystemCache = require('./classes/caching/file_system_cache.js');
const CACHE_VERSION = 2;
@ -106,4 +107,9 @@ function createFetchWithCache(cache) {
return fetchCache;
}
module.exports = createFetchWithCache(new MemoryCache());
const defaultFetch = createFetchWithCache(new MemoryCache());
module.exports = defaultFetch;
module.exports.fetchBuilder = defaultFetch;
module.exports.MemoryCache = MemoryCache;
module.exports.FileSystemCache = FileSystemCache;