contentful-export 7.21.77 → 7.21.78

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.
@@ -34,7 +34,8 @@ async function downloadAsset({
34
34
 
35
35
  // build local file path from the url for the download
36
36
  const parsedUrl = new URL(url);
37
- const localFile = _path.default.join(directory, parsedUrl.host, parsedUrl.pathname);
37
+ const decodedPathname = decodeURIComponent(parsedUrl.pathname);
38
+ const localFile = _path.default.join(directory, parsedUrl.host, decodedPathname);
38
39
 
39
40
  // ensure directory exists and create file stream
40
41
  await _fs.promises.mkdir(_path.default.dirname(localFile), {
@@ -44,7 +45,7 @@ async function downloadAsset({
44
45
  try {
45
46
  // download asset
46
47
  const assetRequest = await httpClient.get(url, {
47
- responseType: "stream",
48
+ responseType: 'stream',
48
49
  transformResponse: [data => data]
49
50
  });
50
51
 
@@ -105,7 +106,7 @@ function downloadAssets(options) {
105
106
  httpClient
106
107
  }));
107
108
  }
108
- return startingPromise.then(downloadAsset).then(_downLoadedFile => {
109
+ return startingPromise.then(downloadAsset).then(() => {
109
110
  task.output = `${_figures.default.tick} downloaded ${entityName} (${url})`;
110
111
  successCount++;
111
112
  }).catch(error => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentful-export",
3
- "version": "7.21.77",
3
+ "version": "7.21.78",
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",