sb-mig 5.1.0 → 5.1.1

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.
@@ -94,6 +94,9 @@ const getSizeFromURL = (fileUrl) => {
94
94
  const downloadAsset = async (args, config) => {
95
95
  const { debug, sbmigWorkingDirectory } = config;
96
96
  const { payload } = args;
97
+ if (!sbmigWorkingDirectory) {
98
+ throw Error("sbmigWorkingDirectory is not defined");
99
+ }
97
100
  const fileName = getFileName(payload.filename);
98
101
  const fileUrl = payload.filename;
99
102
  const downloadedAssetsFolder = path.join(sbmigWorkingDirectory, "downloadedAssets");
@@ -1,6 +1,6 @@
1
1
  import type { IStoryblokConfig } from "../../config/config.js";
2
2
  import type StoryblokClient from "storyblok-js-client";
3
- export interface RequestBaseConfig extends Omit<IStoryblokConfig, "sbApi"> {
3
+ export interface RequestBaseConfig extends Partial<Omit<IStoryblokConfig, "sbApi">> {
4
4
  spaceId: string;
5
5
  sbApi: StoryblokClient;
6
6
  }
@@ -276,7 +276,7 @@ export const backup = async (props) => {
276
276
  filename: `${component.name}.presets.sb.json`,
277
277
  res: { allPresets: res, ...metadata },
278
278
  folder: storyblokConfig.presetsBackupDirectory,
279
- }, apiConfig);
279
+ }, { ...apiConfig, sbmigWorkingDirectory: "" });
280
280
  }
281
281
  })
282
282
  .catch((err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sb-mig",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "CLI to rule the world. (and handle stuff related to Storyblok CMS)",
5
5
  "author": "Marcin Krawczyk <marckraw@icloud.com>",
6
6
  "license": "MIT",