diff --git a/src/axios/cache.ts b/src/axios/cache.ts index 09b8745..100c9d4 100644 --- a/src/axios/cache.ts +++ b/src/axios/cache.ts @@ -2,7 +2,7 @@ import { AxiosInstance } from 'axios'; import { applyRequestInterceptor } from '../interceptors/request'; import { applyResponseInterceptor } from '../interceptors/response'; import { MemoryStorage } from '../storage/memory'; -import { defaultKeyGenerator } from '../utils/key-generator'; +import { defaultKeyGenerator } from '../util/key-generator'; import { AxiosCacheInstance, CacheInstance, CacheProperties } from './types'; export function createCache( diff --git a/src/axios/types.ts b/src/axios/types.ts index c252ab0..e5a4c23 100644 --- a/src/axios/types.ts +++ b/src/axios/types.ts @@ -6,7 +6,7 @@ import type { AxiosResponse, Method } from 'axios'; -import { Deferred } from 'src/utils/deferred'; +import { Deferred } from 'src/util/deferred'; import { CachedResponse, CacheStorage } from '../storage/types'; export type DefaultCacheRequestConfig = AxiosRequestConfig & { diff --git a/src/interceptors/request.ts b/src/interceptors/request.ts index d098b4b..cb2e130 100644 --- a/src/interceptors/request.ts +++ b/src/interceptors/request.ts @@ -1,7 +1,7 @@ import { CachedResponse } from 'src/storage/types'; import { AxiosCacheInstance } from '../axios/types'; import { CACHED_RESPONSE_STATUS, CACHED_RESPONSE_STATUS_TEXT } from '../constants'; -import { Deferred } from '../utils/deferred'; +import { Deferred } from '../util/deferred'; export function applyRequestInterceptor(axios: AxiosCacheInstance) { axios.interceptors.request.use(async (config) => { diff --git a/src/interceptors/response.ts b/src/interceptors/response.ts index 83184c7..122f0cb 100644 --- a/src/interceptors/response.ts +++ b/src/interceptors/response.ts @@ -1,6 +1,6 @@ import { AxiosCacheInstance } from '../axios/types'; import { interpretCacheHeader } from './util/interpret-header'; -import { updateCache } from './util/update-cache'; +import { updateCache } from '../util/update-cache'; export function applyResponseInterceptor(axios: AxiosCacheInstance) { axios.interceptors.response.use(async (response) => { diff --git a/src/utils/deferred.ts b/src/util/deferred.ts similarity index 100% rename from src/utils/deferred.ts rename to src/util/deferred.ts diff --git a/src/interceptors/util/interpret-header.ts b/src/util/interpret-header.ts similarity index 100% rename from src/interceptors/util/interpret-header.ts rename to src/util/interpret-header.ts diff --git a/src/utils/key-generator.ts b/src/util/key-generator.ts similarity index 100% rename from src/utils/key-generator.ts rename to src/util/key-generator.ts diff --git a/src/interceptors/util/update-cache.ts b/src/util/update-cache.ts similarity index 88% rename from src/interceptors/util/update-cache.ts rename to src/util/update-cache.ts index b01fe5c..c89435f 100644 --- a/src/interceptors/util/update-cache.ts +++ b/src/util/update-cache.ts @@ -1,4 +1,4 @@ -import { AxiosCacheInstance, CacheProperties } from '../../axios'; +import { AxiosCacheInstance, CacheProperties } from '../axios'; export async function updateCache( axios: AxiosCacheInstance,