@storyblok/nuxt 5.4.3 → 5.4.5
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.
|
@@ -6,10 +6,17 @@ export const useAsyncStoryblok = async (url, apiOptions = {}, bridgeOptions = {}
|
|
|
6
6
|
const storyblokApiInstance = useStoryblokApi();
|
|
7
7
|
onMounted(() => {
|
|
8
8
|
if (story.value && story.value.id) {
|
|
9
|
-
useStoryblokBridge(
|
|
9
|
+
useStoryblokBridge(
|
|
10
|
+
story.value.id,
|
|
11
|
+
(evStory) => story.value = evStory,
|
|
12
|
+
bridgeOptions
|
|
13
|
+
);
|
|
10
14
|
}
|
|
11
15
|
});
|
|
12
|
-
const { data, error } = await useAsyncData(
|
|
16
|
+
const { data, error } = await useAsyncData(
|
|
17
|
+
`${uniqueKey}-asyncdata`,
|
|
18
|
+
() => storyblokApiInstance.get(`cdn/stories/${url}`, apiOptions)
|
|
19
|
+
);
|
|
13
20
|
if (error.value?.response && error.value?.response.status >= 400 && error.value?.response.status < 600) {
|
|
14
21
|
throw createError({ statusCode: error.value?.response.status, statusMessage: error.value?.message?.message || "Something went wrong when fetching from storyblok." });
|
|
15
22
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -6,5 +6,10 @@ declare module '@nuxt/schema' {
|
|
|
6
6
|
interface NuxtOptions { ['storyblok']?: ModuleOptions }
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
declare module 'nuxt/schema' {
|
|
10
|
+
interface NuxtConfig { ['storyblok']?: Partial<ModuleOptions> }
|
|
11
|
+
interface NuxtOptions { ['storyblok']?: ModuleOptions }
|
|
12
|
+
}
|
|
13
|
+
|
|
9
14
|
|
|
10
|
-
export { default } from './module'
|
|
15
|
+
export { ModuleOptions, default } from './module'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storyblok/nuxt",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.5",
|
|
4
4
|
"description": "Storyblok Nuxt module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
"test:e2e-watch": "start-server-and-test playground:run http://localhost:3000 cy:open"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@nuxt/kit": "^3.
|
|
31
|
-
"@storyblok/vue": "^7.1.
|
|
30
|
+
"@nuxt/kit": "^3.4.2",
|
|
31
|
+
"@storyblok/vue": "^7.1.5"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@babel/core": "^7.21.
|
|
34
|
+
"@babel/core": "^7.21.8",
|
|
35
35
|
"@cypress/vite-dev-server": "^5.0.5",
|
|
36
36
|
"@nuxt/module-builder": "latest",
|
|
37
37
|
"babel-jest": "^29.4.3",
|
|
38
|
-
"cypress": "^12.
|
|
39
|
-
"eslint-plugin-cypress": "^2.13.
|
|
38
|
+
"cypress": "^12.12.0",
|
|
39
|
+
"eslint-plugin-cypress": "^2.13.3",
|
|
40
40
|
"jest": "^29.4.3",
|
|
41
41
|
"start-server-and-test": "^2.0.0",
|
|
42
|
-
"vite": "^4.3.
|
|
42
|
+
"vite": "^4.3.5"
|
|
43
43
|
},
|
|
44
44
|
"release": {
|
|
45
45
|
"branches": [
|