contentful-export 7.17.15 → 7.17.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,9 +43,11 @@ async function createCachedAssetKey(host, accessToken, spaceId, environmentId, m
43
43
 
44
44
  try {
45
45
  const assetKeyPromise = createAssetKey(host, accessToken, spaceId, environmentId, expiresAtMs);
46
+ const resolvedAssetKeyPromise = await assetKeyPromise;
47
+ const result = await resolvedAssetKeyPromise.json();
46
48
  cacheItem = {
47
49
  expiresAtMs,
48
- promise: assetKeyPromise
50
+ result: result
49
51
  };
50
52
  assetKeyCache.set(cacheKey, cacheItem);
51
53
  } catch (err) {
@@ -58,11 +60,9 @@ async function createCachedAssetKey(host, accessToken, spaceId, environmentId, m
58
60
 
59
61
  return Promise.reject(err);
60
62
  }
61
- } // cacheItem.promise is the return type of node-fetch.
62
-
63
+ }
63
64
 
64
- const response = await cacheItem.promise;
65
- return response.json();
65
+ return cacheItem.result;
66
66
  }
67
67
 
68
68
  function generateSignedToken(secret, urlWithoutQueryParams, expiresAtMs) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentful-export",
3
- "version": "7.17.15",
3
+ "version": "7.17.18",
4
4
  "description": "this tool allows you to export a space to a JSON dump",
5
5
  "main": "dist/index.js",
6
6
  "types": "types.d.ts",