@cappa/plugin-storybook 0.11.1 → 0.11.2

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.
@@ -216,8 +216,8 @@ const cappaPluginStorybook = (options) => {
216
216
  try {
217
217
  response = await fetch(storiesUrl, { signal: AbortSignal.timeout(timeout) });
218
218
  } catch (error) {
219
- if (error instanceof DOMException && error.name === "TimeoutError") throw new Error(`Connection to Storybook at ${storybookUrl} timed out after ${timeout}ms. Make sure Storybook is running and accessible.`);
220
- throw new Error(`Failed to connect to Storybook at ${storybookUrl}. Make sure Storybook is running and accessible. Error: ${error.message}`);
219
+ if (error instanceof DOMException && error.name === "TimeoutError") throw new Error(`Connection to Storybook at ${storybookUrl} timed out after ${timeout}ms. Make sure Storybook is running and accessible.`, { cause: error });
220
+ throw new Error(`Failed to connect to Storybook at ${storybookUrl}. Make sure Storybook is running and accessible. Error: ${error.message}`, { cause: error });
221
221
  }
222
222
  if (!response.ok) throw new Error(`Failed to fetch stories: ${response.status} ${response.statusText}`);
223
223
  const data = await response.json();
@@ -216,8 +216,8 @@ const cappaPluginStorybook = (options) => {
216
216
  try {
217
217
  response = await fetch(storiesUrl, { signal: AbortSignal.timeout(timeout) });
218
218
  } catch (error) {
219
- if (error instanceof DOMException && error.name === "TimeoutError") throw new Error(`Connection to Storybook at ${storybookUrl} timed out after ${timeout}ms. Make sure Storybook is running and accessible.`);
220
- throw new Error(`Failed to connect to Storybook at ${storybookUrl}. Make sure Storybook is running and accessible. Error: ${error.message}`);
219
+ if (error instanceof DOMException && error.name === "TimeoutError") throw new Error(`Connection to Storybook at ${storybookUrl} timed out after ${timeout}ms. Make sure Storybook is running and accessible.`, { cause: error });
220
+ throw new Error(`Failed to connect to Storybook at ${storybookUrl}. Make sure Storybook is running and accessible. Error: ${error.message}`, { cause: error });
221
221
  }
222
222
  if (!response.ok) throw new Error(`Failed to fetch stories: ${response.status} ${response.statusText}`);
223
223
  const data = await response.json();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cappa/plugin-storybook",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "Storybook plugin for Cappa - takes screenshots of Storybook stories",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -76,7 +76,7 @@
76
76
  }
77
77
  },
78
78
  "dependencies": {
79
- "@cappa/core": "0.15.0",
79
+ "@cappa/core": "0.16.0",
80
80
  "@cappa/logger": "0.0.12",
81
81
  "@swc/core": "^1.16.2",
82
82
  "chalk": "^6.0.0"