Giter Site home page Giter Site logo

storyblok / storyblok-nuxt Goto Github PK

View Code? Open in Web Editor NEW
257.0 22.0 38.0 11.49 MB

Storyblok Nuxt module

Home Page: https://www.storyblok.com/tp/nuxt-js-multilanguage-website-tutorial

Vue 42.55% Shell 1.15% TypeScript 53.42% JavaScript 2.88%
nuxtjs nuxt vue vuejs headless-cms

storyblok-nuxt's Introduction

Storyblok Logo

@storyblok/nuxt

Nuxt 3 module for the Storyblok, Headless CMS.


Storyblok JS Client npm

Follow @Storyblok
Follow @Storyblok

Live Demo

If you are in a hurry, check out our official live demo on Stackblitz.

๐Ÿš€ Usage

Note This module is for Nuxt 3. Check out @storyblok/nuxt-2 for Nuxt 2.

Important If you are first-time user of the Storyblok, read the Getting Started guide to get a project ready in less than 5 minutes.

Installation

Install @storyblok/nuxt:

npx nuxi@latest module add storyblok

Add following code to modules section of nuxt.config.js and replace the accessToken with API token from Storyblok space.

import { defineNuxtConfig } from "nuxt";

export default defineNuxtConfig({
  modules: [
    ["@storyblok/nuxt", { accessToken: "<your-access-token>" }]
    // ...
  ]
});

You can also use the storyblok config if you prefer:

import { defineNuxtConfig } from "nuxt";

export default defineNuxtConfig({
  modules: ["@storyblok/nuxt"],
  storyblok: {
    accessToken: "<your-access-token>"
  }
});

Warning This SDK uses the Fetch API under the hood. If your environment doesn't support it, you need to install a polyfill like isomorphic-fetch. More info on storyblok-js-client docs.

Options

When you initialize the module, you can pass all @storyblok/vue options plus a bridge option explained in our JS SDK Storyblok bridge section and a enableSudoMode option to define your own plugin (see below).

Note If you want to use Storyblok inside nuxt-devtools you can use the option devtools, if enabled, make sure to have installed the @nuxt/devtools module and enable it on your nuxt config.

// Defaults
["@storyblok/nuxt", {
  {
    accessToken: "<your-access-token>",
    bridge: true,
    devtools: true,
    apiOptions: {}, // storyblok-js-client options
  }
}]

Define your own plugin

While the recommended approach covers most cases, there are specific instances where you may need to use the enableSudoMode option and disable our plugin, allowing you to incorporate your own.

// nuxt.config.ts
modules: [
  [
    "@storyblok/nuxt",
    {
      accessToken: "<your-access-token>",
      enableSudoMode: true
    }
  ]
];

To include additional functionalities in the SDK's apiOptions, such as custom cache methods, you can implement the following solution inside the plugins folder (autoimported):

// plugins/storyblok.js
import { StoryblokVue, apiPlugin } from "@storyblok/vue";

export default defineNuxtPlugin(({ vueApp }) => {
  vueApp.use(StoryblokVue, {
    accessToken: "<your-access-token>",
    apiOptions: {
      cache: {
        type: "custom",
        custom: {
          flush() {
            console.log("all right");
          }
        }
      }
    },
    use: [apiPlugin]
  });
});

Region parameter

Possible values:

  • eu (default): For spaces created in the EU
  • us: For spaces created in the US
  • ap: For spaces created in Australia
  • ca: For spaces created in Canada
  • cn: For spaces created in China

Full example for a space created in the US:

["@storyblok/nuxt", {
  {
    accessToken: "<your-access-token>",
    apiOptions: {
      region: "us"
    }
  }
}]

Important For spaces created in the United States or China, the region parameter must be specified.

Getting started

1. Creating and linking your components to Storyblok Visual Editor

To link your Vue components to the equivalent one in your Storyblok space:

  • First, you need to load them globally adding them to the ~/storyblok directory. It's important to name them with Pascal case in your code ExampleComponent.vue and with a hyphen inside your Storyblok space example-component, so they will be imported automatically.

    If you want to define your own directory for the Storyblok related components, you can use the option componentsDir in the nuxt.config.js:

    // nuxt.config.ts
    modules: [
      [
        "@storyblok/nuxt",
        {
          accessToken: "<your-access-token>",
          componentsDir: false,
        }
      ]
    ],
    components: {
      dirs: [
        {
          path: '~/components/storyblok',
          global: true,
        }
      ]
    },

    Otherwise, you can set another directory and load them manually (for example, by using a Nuxt plugin).

    Warning Take into account that if you name a component inside the storyblok folder the same as another in the components folder, it won't work properly. Tip: Keep the components in your Nuxt project with different names.

  • For each component, use the v-editable directive on its root element, passing the blok property that they receive:

<div v-editable="blok" / >
  • Finally, use <StoryblokComponent> which is available globally in the Nuxt app:
<StoryblokComponent :blok="blok" />

The blok is the actual blok data coming from Storblok's Content Delivery API.

2. Getting Storyblok Stories and listen to Visual Editor events

Composition API

The simplest way is by using the useAsyncStoryblok one-liner composable (it's autoimported). Where you need to pass as first parameter the slug, while the second and third parameters, apiOptions and bridgeOptions respectively, are optional.

Check the available apiOptions in our API docs and bridgeOptions passed to the Storyblok Bridge.

Note If you want to know more about versioning { version: "draft" /* or "publish" */ } then go to the section Working with preview and/or production environments

<script setup>
  const story = await useAsyncStoryblok(
    "vue",
    { version: "draft", resolve_relations: "Article.author" }, // API Options
    { resolveRelations: ["Article.author"], resolveLinks: "url" } // Bridge Options
  );

  if (story.value.status) {
    throw createError({
      statusCode: story.value.status,
      statusMessage: story.value.response
    });
  }
</script>

<template>
  <StoryblokComponent v-if="story" :blok="story.content" />
</template>

Which is the short-hand equivalent to using useStoryblokApi inside useState and useStoryblokBridge functions separately:

<script setup>
  const story = useState();
  const storyblokApi = useStoryblokApi();

  const { data } = await storyblokApiInstance.get(
    `cdn/stories/vue`,
    {
      version: "draft"
    }
  );
  story.value = data.story;

  onMounted(() => {
    useStoryblokBridge(
      story.value.id,
      (evStory) => (story.value = evStory),
      { resolveRelations: ["Article.author"], resolveLinks: "url" } // Bridge Options
    );
  });
</script>

<template>
  <StoryblokComponent v-if="story" :blok="story.content" />
</template>

The useState is an SSR-friendly ref replacement. Its value will be preserved after server-side rendering (during client-side hydration).

Rendering Rich Text

You can easily render rich text by using the renderRichText function that comes with @storyblok/nuxt and a Vue computed property:

<template>
  <div v-html="articleContent"></div>
</template>

<script setup>
  const props = defineProps({ blok: Object });
  const articleContent = computed(() =>
    renderRichText(props.blok.articleContent)
  );
</script>

You can also set a custom Schema and component resolver by passing the options as the second parameter of the renderRichText function:

<script setup>
  import cloneDeep from "clone-deep";

  const mySchema = cloneDeep(RichTextSchema); // you can make a copy of the default RichTextSchema
  // ... and edit the nodes and marks, or add your own.
  // Check the base RichTextSchema source here https://github.com/storyblok/storyblok-js-client/blob/v4/source/schema.js

  const props = defineProps({ blok: Object });

  const articleContent = computed(() =>
    renderRichText(props.blok.articleContent, {
      schema: mySchema,
      resolver: (component, blok) => {
        switch (component) {
          case "my-custom-component":
            return `<div class="my-component-class">${blok.text}</div>`;
          default:
            return "Resolver not defined";
        }
      }
    })
  );
</script>

3. Working with preview and/or production environments

Remember that the bridge only works using version: 'draft' and the Preview Access Token.

For the production site, NOT used as a preview for content editors, version: 'published' and Public Access Token should be used.

Note If you're using production as a preview for marketeers and your public site, you will need a plugin to handle different .env variables, or versions using the Preview Access Token, checking if you are inside Storyblok or not. For example, something like if (window.location.search.includes(_storyblok_tk[token]=<YOUR_TOKEN>).

Check the official docs on how to access different content versions.

API

useAsyncStoryblok(slug, apiOptions, bridgeOptions)

(Recommended Option) Uses useState under the hood to help with SSR compatibility.

Check the available apiOptions (passed to storyblok-js-client) and bridgeOptions (passed to the Storyblok Bridge).

useStoryblok(slug, apiOptions, bridgeOptions)

It could be helpful to use useStoryblok instead of useAsyncStoryblok when we need to make full client-side requests, for example, getting personalized data for a logged user.

Check the available apiOptions (passed to storyblok-js-client) and bridgeOptions (passed to the Storyblok Bridge).

useStoryblokApi()

Returns the instance of the storyblok-js-client.

useStoryblokBridge(storyId, callback, bridgeOptions)

Use this one-line function to cover the most common use case: updating the story when any kind of change happens on Storyblok Visual Editor.

The Storyblok JavaScript SDK Ecosystem

A visual representation of the Storyblok JavaScript SDK Ecosystem

๐Ÿ”— Related Links

โ„น๏ธ More Resources

Support

Contributing

Please see our contributing guidelines and our code of conduct. This project use semantic-release for generate new versions by using commit messages and we use the Angular Convention to naming the commits. Check this question about it in semantic-release FAQ.

storyblok-nuxt's People

Contributors

adamkillander96 avatar alexjoverm avatar alvarosabu avatar baroshem avatar christianzoppi avatar cmorrow-rv avatar danielroe avatar dawntraoz avatar dependabot[bot] avatar dominikangerer avatar emanuelgsouza avatar github-actions[bot] avatar manuelschroederdev avatar markus-gx avatar onefriendaday avatar roberto-butti avatar samuells avatar sebbejohansson avatar tguelcan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

storyblok-nuxt's Issues

'Cannot read property 'forEach' of undefined' when using richTextResolver

Hey All, I'm running into an issue when using the richTextResolver from the storyapi. I followed the nuxt example here exactly.

Here is the error:

TypeError
Cannot read property 'forEach' of undefined

Here is where the error is occuring:
node_modules/core-js-pure/stable/instance/for-each.js

It's on Line 12 of the above file.

module.exports = function (it) {
  var own = it.forEach;
  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.forEach)
    // eslint-disable-next-line no-prototype-builtins
    || DOMIterables.hasOwnProperty(classof(it)) ? forEach : own;
};

New Text Editor data Conflict with vuex

I have added a new the editor (awesome work!) and added the snippet as it appears here:
https://www.storyblok.com/docs/richtext-field#nuxt-js-or-gridsome
I am then feeding it a computed prop:

<Rte  :text="settings.contact_info"   />

however I received this error in the front:
Error: { "message": "[vuex] do not mutate vuex store state outside mutation handlers.", "statusCode": 500 }

And in the console:

client.js?06a0:77 Error: [vuex] do not mutate vuex store state outside mutation handlers.
    at assert (vuex.esm.js?2f62:90)
    at Vue.store._vm.$watch.deep (vuex.esm.js?2f62:789)
    at Watcher.run (vue.runtime.esm.js?2b0e:4562)
    at Watcher.update (vue.runtime.esm.js?2b0e:4536)
    at Dep.notify (vue.runtime.esm.js?2b0e:730)
    at Array.mutator (vue.runtime.esm.js?2b0e:882)
    at RichTextResolver.renderNode (richTextResolver.js?09f9:105)
    at eval (richTextResolver.js?09f9:90)
    at Array.forEach (<anonymous>)
    at RichTextResolver.renderNode (richTextResolver.js?09f9:89)

The data is rendered correctly on the front-end.

I hope this provides enough informations

Storyblok-nuxt is making a GET request even on static website

Hi. I'm switching between dynamic routes with nuxt-link. Those routes are being populated by Storyblok. I noticed that switching between pages was very slow, taking like 1-2 seconds. When I generated a static site with 'npm run generate', it was still very slow, even though everything was now hard-coded. I then disconnected from Internet and then It was giving me a network error in console:

VM1200:1 GET https://api.storyblok.com/v1/cdn/stories/category/causes?version=published&cv=1591282427418&token=W7dzRkbNVkoPKhCzUNP2fwtt net::ERR_INTERNET_DISCONNECTED

However, when I refresh the page, the hard-coded content loads properly.

So kindly guide as to why it is too slow with nuxt-link and why it is making a GET request even though the content is hard-coded and how can I fix it.

Thanks.

TypeError: Cannot read property 'startsWith' of undefined

I'm following this tutorial to create a basic project with Nuxt and Storyblok, but I stuck on the step of adding the module. The project fails to compile:

image

Also, I've noticed that the tutorial is referring to the package storyblok-nuxt, although it looks like @storyblok/nuxt is an actual one.

Any help would be much appreciated!

Update storyblok-js-client dependency

Hi! It would be great if the storyblok-js-client dependency for this package could be updated to the latest version (2.0.12 at this time).

Here's my situation:

I'm using Nuxt, which uses core-js 2.x by default. However, since other packages are starting to upgrade to 3.x, I've configured my project to work with 3.x. This works fine with Nuxt, and is described in their docs.

However, the current storyblok-nuxt still depends on storyblok-js-client 1.0.35, which doesn't use core-js 3.x, triggering the following errors on build:

 ERROR  Failed to compile with 4 errors                                                                                                                                                     friendly-errors 13:51:34

These dependencies were not found:                                                                                                                                                          friendly-errors 13:51:34
                                                                                                                                                                                            friendly-errors 13:51:34
* core-js/modules/es6.function.name in ./node_modules/storyblok-js-client/dist/throttlePromise.js                                                                                           friendly-errors 13:51:34
* core-js/modules/es6.regexp.constructor in ./node_modules/storyblok-js-client/dist/richTextResolver.js                                                                                     friendly-errors 13:51:34
* core-js/modules/es6.regexp.replace in ./node_modules/storyblok-js-client/dist/richTextResolver.js                                                                                         friendly-errors 13:51:34
* core-js/modules/es6.regexp.split in ./node_modules/storyblok-js-client/dist/index.js                                                                                                      friendly-errors 13:51:34
                                                                                                                                                                                            friendly-errors 13:51:34
To install them, you can run: npm install --save core-js/modules/es6.function.name core-js/modules/es6.regexp.constructor core-js/modules/es6.regexp.replace core-js/modules/es6.regexp.split

Looking at the latest storyblok-js-client dependencies, it seems to be using core-js 3.x. Therefore, could a new version of storyblok-nuxt be released (probably 2.0.x, to remain consistent with storyblok-js-client) that depends on storyblok-js-client 2.0.12? I think that would solve my compilation problems.

High vulnerabilities found in the project

There are currently a few high vulnerabilities in the project. This is the report that you get after an audit to find moderate/high/critical vulnerabilities:

> yarn audit --level moderate

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ high          โ”‚ Server-Side Request Forgery                                  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Package       โ”‚ axios                                                        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Patched in    โ”‚ >=0.21.1                                                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Dependency of โ”‚ storyblok-js-client                                          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Path          โ”‚ storyblok-js-client > axios                                  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ More info     โ”‚ https://www.npmjs.com/advisories/1594                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ moderate      โ”‚ Regular Expression Denial of Service                         โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Package       โ”‚ semver                                                       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Patched in    โ”‚ >=4.3.2                                                      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Dependency of โ”‚ nuxt-module-builder                                          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Path          โ”‚ nuxt-module-builder > rollup-plugin-node-builtins >          โ”‚
โ”‚               โ”‚ browserify-fs > levelup > semver                             โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ More info     โ”‚ https://www.npmjs.com/advisories/31                          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ moderate      โ”‚ Memory Exposure                                              โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Package       โ”‚ bl                                                           โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Patched in    โ”‚ >=0.9.5 <1.0.0 || >=1.0.1                                    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Dependency of โ”‚ nuxt-module-builder                                          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Path          โ”‚ nuxt-module-builder > rollup-plugin-node-builtins >          โ”‚
โ”‚               โ”‚ browserify-fs > levelup > bl                                 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ More info     โ”‚ https://www.npmjs.com/advisories/596                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ high          โ”‚ Remote Memory Exposure                                       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Package       โ”‚ bl                                                           โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Patched in    โ”‚ >=1.2.3 <2.0.0 || >=2.2.1 <3.0.0 || >=3.0.1 <4.0.0 ||        โ”‚
โ”‚               โ”‚ >=4.0.3                                                      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Dependency of โ”‚ nuxt-module-builder                                          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Path          โ”‚ nuxt-module-builder > rollup-plugin-node-builtins >          โ”‚
โ”‚               โ”‚ browserify-fs > levelup > bl                                 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ More info     โ”‚ https://www.npmjs.com/advisories/1555                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ high          โ”‚ Prototype Pollution                                          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Package       โ”‚ dot-prop                                                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Patched in    โ”‚ >=4.2.1 <5.0.0 || >=5.1.1                                    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Dependency of โ”‚ nuxt-module-builder                                          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Path          โ”‚ nuxt-module-builder > standard-version >                     โ”‚
โ”‚               โ”‚ conventional-changelog > conventional-changelog-angular >    โ”‚
โ”‚               โ”‚ compare-func > dot-prop                                      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ More info     โ”‚ https://www.npmjs.com/advisories/1213                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ high          โ”‚ Prototype Pollution                                          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Package       โ”‚ dot-prop                                                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Patched in    โ”‚ >=4.2.1 <5.0.0 || >=5.1.1                                    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Dependency of โ”‚ nuxt-module-builder                                          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Path          โ”‚ nuxt-module-builder > standard-version >                     โ”‚
โ”‚               โ”‚ conventional-changelog > conventional-changelog-core >       โ”‚
โ”‚               โ”‚ conventional-changelog-writer > compare-func > dot-prop      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ More info     โ”‚ https://www.npmjs.com/advisories/1213                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ high          โ”‚ Prototype Pollution                                          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Package       โ”‚ dot-prop                                                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Patched in    โ”‚ >=4.2.1 <5.0.0 || >=5.1.1                                    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Dependency of โ”‚ nuxt-module-builder                                          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Path          โ”‚ nuxt-module-builder > standard-version >                     โ”‚
โ”‚               โ”‚ conventional-changelog > conventional-changelog-jshint >     โ”‚
โ”‚               โ”‚ compare-func > dot-prop                                      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ More info     โ”‚ https://www.npmjs.com/advisories/1213                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Input event initially not firing after page load

When opening the visual editor, re-arranging the items sometimes initially does not seem to trigger the input event, so the actual components in the visual editor would not move at all.

Only when clicking on an item in the visual editor and then trying the same thing again, everything works fine!

moving

The automated release is failing ๐Ÿšจ

๐Ÿšจ The automated release from the next branch failed. ๐Ÿšจ

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iโ€™m sure you can fix this ๐Ÿ’ช.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the next branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those donโ€™t help, or if this issue is reporting something you think isnโ€™t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project โœจ

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

The automated release is failing ๐Ÿšจ

๐Ÿšจ The automated release from the next branch failed. ๐Ÿšจ

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iโ€™m sure you can fix this ๐Ÿ’ช.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the next branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those donโ€™t help, or if this issue is reporting something you think isnโ€™t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project โœจ

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

Cache on the server side

Hi!

I may be wrong, but when running on the server, this nuxt plugin will create a new storyblok-js-client instance for all incoming requests - doesn't it make the js-client cache (and throttle limiter?) unusable?
Or am I missing something?

Thanks!

How to disable cache for SSG globally using `npm run generate`?

Since I'm building a static site with npm run generate, caching is pointless and just hindering my development flow.
I've read about cacheProvider: 'none' here: storyblok/storyblok-js-client#10

But this is not working for me. I still get cached content in my dev server.
The only thing that's working for me is very unconvenient.

const result = await $storyapi.get(`cdn/stories/articles/${route.params.slug}`, {
  cv: +new Date(), 
});

having to provide a cv prop for every request is really bothersome.

Fetch content of a story by getting it's UUID from another story without making additional GET requests

Hi. Is it possible to fetch content of a story by getting it's UUID from another story without making additinal GET requests?

For example, I am fetching a list of posts. Each post has a UUID of it's author.

(I have made the relation as instructed here: https://www.storyblok.com/tp/how-to-build-relationships-between-2-content-types#get-the-author-of-one-post.)

Now based on the author UUID, I want to display the name of the author in the preview of each post.

Thanks.

Is there a way to lazy load the storyblok client in nuxt?

We don't want to add 110kb to our client in production just to make a few api calls, but it would be acceptable to dynamically lazy load it when required for editing.

We know we can call the api urls directly, but also don't want to loose the great user experience for our editors.

How to migrate to the new version?

There is no guide on how to migrate.

This guide refers to an outdated github-repo: https://www.storyblok.com/tp/nuxt-js-multilanguage-website-tutorial#setting-up-the-environment

Where is this magical StoryblokBridge() coming from?

  mounted () {
    this.$storybridge(() => {
      const storyblokInstance = new StoryblokBridge()

      storyblokInstance.on(['input', 'published', 'change'], (event) => {
        if (event.action == 'input') {
          if (event.story.id === this.story.id) {
            this.story.content = event.story.content
          }
        } else {
          window.location.reload()
        }
      })
    }, (error) => {
      console.error(error)
    })
  },

WARN @storyblok/nuxt doesn't appear to be written in CJS

Environment

Nuxt CLI v3.0.0-27333638.5ab1816                                                                                                                                                                                                                                                                    19:36:45
RootDir: C:\JavascriptProjects\NUXT\website-ui                                                                                                                                                                                                                                                 19:36:46
Nuxt project info:                                                                                                                                                                                                                                                                                  19:36:46

------------------------------
- Operating System: `Windows_NT`
- Node Version:     `v16.13.1`
- Nuxt Version:     `3.0.0-27333638.5ab1816`
- Package Manager:  `[email protected]`
- Bundler:          `Vite`
- User Config:      `build`, `components`, `css`, `modules`, `vue`
- Runtime Modules:  `@storyblok/[email protected]`
- Build Modules:    `-`
------------------------------

I'm getting the following warning in the console.

WARN  @storyblok/nuxt doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module 
(i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.

FYI @pi0

Plugin doesn't support multiple editor event handlers in one app

So, I'm trying to add multiple editor event handlers in Nuxt-based app. One handler is a typical hook added on mounted in a route:

  mounted () {
    // use the bridge to listen to events
    this.$storybridge.on(['input', 'published', 'change'], (event) => {
      if (event.action === 'input') {
        if (event.story.id === this.story.id) {
          this.story.content = event.story.content
        }
      } else {
        // window.location.reload()
        this.$nuxt.$router.go({
          path: this.$nuxt.$router.currentRoute,
          force: true
        })
      }
    })
  }

The other one works on a layout component's mounted triggering the vuex mutation to update the store data (first load is done with vuex action in middleware) for header/footer components added directly in layout:

  computed: {
    ...mapState(['header'])
  },
  mounted () {
    // use the bridge to listen to events
    this.$storybridge.on(['input', 'published', 'change'], (event) => {
      if (event.action === 'input') {
        if (event.story.content._uid === this.header._uid) {
          this.$store.commit('setHeader', event.story.content)
        }
      } else {
        // window.location.reload()
        this.$nuxt.$router.go({
          path: this.$nuxt.$router.currentRoute,
          force: true
        })
      }
    })
  }

Problem is: only the first added callback is actually called on editor events. Is there any other way to do this without losing the ability to visually edit the header item? That is not actually described or shown in the official Nuxt guide.

Parameter(s) filter_query not allowed

Hey, I struggle to use filter queries with the Content Delivery API V2. I receive the response:

{
  "error": "Parameter(s) filter_query not allowed"
}

For example, I tryed to receive all stories with a specific content type:

filter_query: {
	component: {
		in: 'page'
	}
}

If I use the V1 api it will work as expected. Is there anything else I have to consider?

Storybridge Resolve Relations in 2.x

With storyblok-nuxt in 1.x I have added the following to mounted to accommodate for resolve relations:

    // Using resolveRelations
    this.$storybridge.resolveRelations('reference.composition', (event) => {
      this.story.content = event.story.content
    })
    // Use the bridge to listen the events
    this.$storybridge.on(['published', 'change'], () => {
      this.$nuxt.$router.go({
        path: this.$nuxt.$router.currentRoute,
        force: true,
      })
    })

In the migration guide there is no example of how to handle resolveRelations with 2.x

If I upgrade the package to 2.x and replace the above block with (taken from documentation):

    this.$storybridge(
      () => {
        const storyblokInstance = new window.StoryblokBridge()

        storyblokInstance.on(['input', 'published', 'change'], (event) => {
          if (event.action === 'input') {
            if (event.story.id === this.story.id) {
              this.story.content = event.story.content
            }
          } else {
            this.$nuxt.$router.go({
              path: this.$nuxt.$router.currentRoute,
              force: true,
            })
          }
        })
      },
      (error) => {
        console.error(error)
      }
    )

How do I introduce my resolveRelations to this?

Many thanks in advance!

Empty line breaks in text area content

When i render text area contents with line breaks, I get an empty line at the beginning in html. I use css (white-space: pre-line) in order to keep the between line breaks, but any help how to get rid of the empty line break that gets added in the begining?

this is the screenshot of the content in the editor
image

This is the extra line break on the top of the content in the page
image

Support proxy setting

Mission goal is to use StoryblokClient behind an enterprise proxy successfully.

Suggested solution: #39

How to show content changes in standalone tab / preview mode

I'm using localhost:3000 as my preview url.

The visual inside the storyblok editor tab works as expected and injects the new json on every input. That's nice!

But when I click the preview Icon inside of storyblok to get the full page in it's own tab, the changes are not reflected in this new tab. Even when I hit save in the editor and open the preview again, the changes are not reflected.

In the libraries source-code I found a check for window.location === window.parent.location followed by a return, if true

Doesn't that limit the update capabilities to be only present in the iframe?

Cache invalidation doesn't work because cacheVersion request is cached

I've been fighting with cache for days before I realised that I'm doing nothing wrong in my code. But I'm not sure where the issue is: in nuxt module, in vue sdk or somewhere else.
To reproduce this issue, run one of your boilerplates with NODE_ENV=production, enter page with SSR mode (refresh it to be sure it cached), change its content via storyblok (and publish it) and refresh the page again. Both on my project and on your boilerplate content doesn't change untill I restart nuxt server.

Nuxt generate static site storyblok editor not highlighting or selecting components

I am not able to see the editor css on my static generate nuxt pages. I am able to see edited text change events but clicking content does not open the component in the editor. The below part of the documentation mentions the bridge functionality I am missing in my generated static nuxt site.

Those HTML comments should be placed before your content-type and component representations in your website. Now all that is left to do is to add our JavaScript Bridge Script and initializing it with your draft token. This allows us to add small bits of CSS (for the borders while hovering and status border while clicked) and EventListeners to the element directly after that HTML comment. After clicking on the DOM element after the HTML comment, our JavaScript Bridge will send an iframe event to our main application, and we will open the respective content type or component in our editor.

I have a screenshot of the editor not highlighting or selecting components in the editor: https://imgur.com/a/Bf7FUCn

I have tried to add a mounted function that will enable the editor in draft mode but this only fixed my issue with the bridge events not working.

mounted() {
    // Check if we are in the editor mode
    if (this.$route.query._storyblok) {
      // Load the JSON from the API
      this.$storyapi
        .get('cdn/stories/home', {
          version: 'draft',
        })
        .then((res) => {
          this.story = { ...this.story, ...res.data.story };
        })
        .catch((res) => {
          if (res.response) {
            this.error({
              statusCode: res.response.status,
              message: res.response.data,
            });
          } else {
            console.error(res);
          }
        });
    }
  },

My attempted fix: https://github.com/shadow81627/daim/pull/177/files#diff-b19fa22add3de9cd0b98b05366479d92R40

@storyblok/nuxt doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module

After updating the plugin to the latest version, we get this message : @storyblok/nuxt doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
This comes on top of : "you're not in edit mode" and "error: Could not resolve "#app" which was supposed to be solved with the last commit. My (temporary) fix has been to copy the plugin composables into the app composables folder. It just works but shouldn't have to be done that way.

UseStoryBridge - Error: nuxt instance unavailable useNuxtApp

Version

  • @storyblok/nuxt: ^3.0.0-beta.1,
  • nuxt3: latest

Description

Uncaught (in promise) Error: nuxt instance unavailable
    at useNuxtApp (nuxt.mjs:98)
    at useStoryBridge (composables.es.js?v=1abe54b5:6)
    at app.vue:19
useNuxtApp @ nuxt.mjs:98
useStoryBridge @ composables.es.js?v=1abe54b5:6
(anonymous) @ app.vue:19
Promise.catch (async)
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:6717
hook.__weh.hook.__weh @ runtime-core.esm-bundler.js:1968
flushPostFlushCbs @ runtime-core.esm-bundler.js:6907
hydrate2 @ runtime-core.esm-bundler.js:3244
mount @ runtime-core.esm-bundler.js:3174
app.mount @ runtime-dom.esm-bundler.js:1593
initApp @ entry.mjs:34
async function (async)
initApp @ entry.mjs:28
(anonymous) @ entry.mjs:38

Reproduction

Expected result

StoryBridge callback triggers and update content (story)

Actual result

Using useStoryBridge(story.value.id, cb); leads to error and story is not updated.

Multiple .get() requests

I apologize if this is not the right place for this but can someone please guide me regarding sending multiple .get() requests?

I'm trying to do something like this:

context.app.$storyapi.all([requestOne, requestTwo]).then(
context.app.$storyapi.spread((...responses) => {
const responseOne = responses[0];
const responseTwo = responses[1];

    console.log(responseOne, responseTwo, responesThree);
  })
);

Thanks.

Warnings and errors when trying to use with nuxt3

WARN @storyblok/nuxt is incorrectly packaged. Please contact the package author to fix. 13:04:49

node_modules/@storyblok/nuxt/composables/dist/composables.es.js:1:27: error: Could not resolve "#app" (mark it as external to exclude it from the bundle)
1 โ”‚ import { useNuxtApp } from "#app";

Firebase Failed to receive content form api

My project is working fine on my localhost but as soon as I deploy it to firebase I get a

Failed to receive content form api

Has anyone experienced this before as well? I've been trying to find working examples of storyblok + nuxt + firebase but it seems very rare

CDN resolve_relations in V2.x.x

In V1 using resolve_relations: 'author' worked for resolving the relationship between an article and author:

    const res = await app.$storyapi.get('cdn/stories', {
      starts_with: 'articles/',
      resolve_relations: 'author',
    })

However in V2 the author in the response only retrieves the UUID for the author.

When accessed directly in V1:
https://api.storyblok.com/v1/cdn/stories/?resolve_relations=author&starts_with=articles/&token=
Author object is returned.

When accessed directly in V2:
https://api.storyblok.com/v2/cdn/stories?cv=1632833498&resolve_relations=author&starts_with=articles%2F&token=
Author UUID is returned.

Usage with GraphQL

@onefriendaday @samuells
The nuxt client uses the default REST API. It fetches all fields.
Is there an option to fetch only specific fields? If not, how can I query it with GraphQL to fetch only specific fields?
Thanks for the best CMS!

docs: update examples

The examples are missing how to get StoryblokBridge. From the docs:

const { StoryblokBridge } = window

I also get "you are not in edit mode" console errors while on localhost. To silence this I wrapped everything with this (also mentioned in the docs):

if (window.location.search.includes('_storyblok')) { //... }

There is also a small typo. Should be if (event.action === 'input') with three = instead of just two.

Complete example:

export default {
  mounted () {
    if (window.location.search.includes('_storyblok')) {
      this.$storybridge(() => {
        const { StoryblokBridge } = window
        const storyblokInstance = new StoryblokBridge()

        storyblokInstance.on(['input', 'published', 'change'], (event) => {
          if (event.action === 'input') {
            if (event.story.id === this.story.id) {
              this.story.content = event.story.content
            }
          } else {
            this.$nuxt.$router.go({
              path: this.$nuxt.$router.currentRoute,
              force: true,
            })
          }
        })
      }, (error) => {
        console.error(error)
      })
    }
  }
}

Documentation regarding resolving relations with storybridge object on input event

The given example did confuse me, since resolving via the api ($storyapi.get...) works with just categories.
Using this.$storybridge.resolveRelations['relationshipToResolve'] you need to use the full relation:

post.categories in my case
component.name_of_the_relation_shop_field (e.g. multi-options field type)

Hope this is helpful

Errors while generating static site

I'm using Storyblok-nuxt and I get some errors when I do "npm run generate" to generate a static site. Some pages go missing as a result.

I get errors such as:
Error: socket hang up at connResetException (internal/errors.js:614:14) at TLSSocket.socketOnEnd (_http_client.js:491:23) at TLSSocket.emit (events.js:327:22) at TLSSocket.EventEmitter.emit (domain.js:485:12) at endReadableNT (_stream_readable.js:1224:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)

ERROR Client network socket disconnected before secure TLS connection was established

Error: write EPROTO at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:92:16)

ERROR read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27)

The errors don't appear for the same pages every time. We have also tested it with a 1gbps Internet connection.

Is there anything I can do to fix this?

Thanks.

How to use setComponentResolver?

Where would be the best part to add "setComponentResolver" for the RTE?

I've tried adding it before I need it, but it doesn't seem to get picked up:

  this.$storyapi.setComponentResolver((component, blok) => {
    console.log("?!")
    return `<component :blok='${JSON.stringify(blok)}'
                 is="${component}"></component>`
  })

Cannot read properties of undefined (reading '_uid')

Environment

Nuxt CLI v3.0.0-27333638.5ab1816
RootDir: C:\JavascriptProjects\NUXT\website-ui
Nuxt project info:

------------------------------
- Operating System: `Windows_NT`
- Node Version:     `v16.13.1`
- Nuxt Version:     `3.0.0-27333638.5ab1816`
- Package Manager:  `[email protected]`
- Bundler:          `Vite`
- User Config:      `build`, `components`, `css`, `modules`, `vue`
- Runtime Modules:  `@storyblok/[email protected]`
- Build Modules:    `-`
------------------------------

The bug

I am trying to read the component's attributes (that are defined in Storyblok Schema) but I am getting Cannot read properties of undefined (reading '_uid')

{
  "story": {
    "name": "Home",
    "created_at": "2021-12-15T14:19:10.139Z",
    "published_at": null,
    "id": 92562831,
    "uuid": "44d6e4a4-00d9-4bc5-9662-de43d14e4bc2",
    "content": {
      "_uid": "6fac4f51-4f36-4e51-9855-0d192d27bfef",
      "body": [
        {
          "_uid": "05cdec92-ac74-4112-aef2-6886f5698174",
          "component": "section",
          "isFullWidth": false,
          "_editable": "<!--#storyblok#{\"name\": \"section\", \"space\": \"139507\", \"uid\": \"05cdec92-ac74-4112-aef2-6886f5698174\", \"id\": \"92562831\"}-->"
        }
      ],
      "component": "page",
      "_editable": "<!--#storyblok#{\"name\": \"page\", \"space\": \"139507\", \"uid\": \"6fac4f51-4f36-4e51-9855-0d192d27bfef\", \"id\": \"92562831\"}-->"
    },
    "slug": "home",
    "full_slug": "home",
    "sort_by_date": null,
    "position": 0,
    "tag_list": [
      
    ],
    "is_startpage": false,
    "parent_id": 0,
    "meta_data": null,
    "group_id": "afaf2d3c-52d8-48ee-bb95-68620467c0e0",
    "first_published_at": null,
    "release_id": null,
    "lang": "default",
    "path": "/",
    "alternates": [
      
    ],
    "default_full_slug": null,
    "translated_slugs": null
  },
  "cv": 1640132321,
  "rels": [
    
  ],
  "links": [
    
  ]
}

This is the Draft JSON api V2.

In my homepage I have defined just 1 component named section and this component has only 1 property isFullWidth which is boolean.

This is my index.vue code

<template>
  <div class="">
    <component 
      :is="state.story.content.component"
      :key="state.story.content._uid"
      :blok="state.story.content"
    />
  </div>
</template>

<script lang="ts" setup>
import { useStoryApi, useStoryBridge } from '@storyblok/nuxt/composables';

const storyApi = useStoryApi();
const route = useRoute();

const version = process.env.NODE_ENV === 'development' ? 'draft' : 'published';
const fullSlug = (route.path === '/' || route.path === '') ? 'home' : route.path;

const { data } = await storyApi.get('cdn/stories/' + fullSlug, { version: version });
const state = reactive({ story: data.story });

onMounted(() => {
  useStoryBridge(state.story.id, story => (state.story = story));
})
</script>

this is my Page.vue code

<template>
  <div v-editable="blok">
   <component 
      :is="blok.component"
      v-for="blok in blok.body"
      :key="blok._id"
      :blok="blok"
    />
  </div>
</template>

<script lang="ts" setup>
  const props = defineProps({
    blok: {
      type: Object,
      required: true,
    }
  });
</script>

and here is my Section.vue component code

<template>
  <div v-editable="blok">
  {{blok._uid}}
  </div>
</template>

<script lang="ts" setup>
const props = defineProps({
  blok: {
    type: Object,
    required: false,
  }
});
</script>

Trying to print the blok's _uid gives me the error

500
Cannot read properties of undefined (reading 'component')
at _sfc_ssrRender (file:///C:/JavascriptProjects/NUXT/website-ui/.nuxt/dist/server/server.mjs:3650:113)
at renderComponentSubTree (C:\JavascriptProjects\NUXT\website-ui\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:263:13)
at renderComponentVNode (C:\JavascriptProjects\NUXT\website-ui\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:214:16)
at Module.ssrRenderComponent (C:\JavascriptProjects\NUXT\website-ui\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:623:12)
at _sfc_ssrRender (file:///C:/JavascriptProjects/NUXT/website-ui/.nuxt/dist/server/server.mjs:3376:31)
at renderComponentSubTree (C:\JavascriptProjects\NUXT\website-ui\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:263:13)
at renderComponentVNode (C:\JavascriptProjects\NUXT\website-ui\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:214:16)
at Module.ssrRenderComponent (C:\JavascriptProjects\NUXT\website-ui\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:623:12)
at _sfc_ssrRender (file:///C:/JavascriptProjects/NUXT/website-ui/.nuxt/dist/server/server.mjs:3291:31)
at renderComponentSubTree (C:\JavascriptProjects\NUXT\website-ui\node_modules\@vue\server-renderer\dist\server-renderer.cjs.js:263:13)

but if I just print {{ blok }} only, the following JSON will be printed just fine

{ "_uid": "05cdec92-ac74-4112-aef2-6886f5698174", 
"component": "section", 
"isFullWidth": false, 
"_editable": "<!--#storyblok#{\"name\": \"section\", \"space\": \"139507\", \"uid\": \"05cdec92-ac74-4112-aef2-6886f5698174\", \"id\": \"92562831\"}-->" }

I really don't understand why I cannot directly read a property from the blok object but only read the blok object as a whole.

image
image

Any suggestions on this?

Installation instructions are incorrect

Installation are incorrect: nuxt-storyblok should be "storyblok-nuxt";

I'm guessing repo was renamed at some point

Currently instruction are:

npm install --save-dev nuxt-storyblok axios
// yarn add nuxt-storyblok axios

Should be:

npm install --save-dev storyblok-nuxt axios
// yarn add -D storyblok-nuxt axios

Two routes being generated when an entry is defined as root for the folder

Hi. So I have a folder called The Hub and inside it I have multiple entries. One of the entries is The Hub which is defined as the root for the folder. In this case, two routes are being generated: /the-hub and /the-hub/ (so with and without a trailing slash).

This isn't happening with other folders where there isn't an entry defined as root.

I know the first route (/the-hub) gets replaced with the second one (/the-hub/) and we end up with one file only but it is causing problems with another module. So, is there a way to fix this?

Thanks.

Type '{ accessToken: string; }' is not assignable to type 'string'.

Hey there, there is a type error when adding the module on a nuxt.config.ts

Repro: https://stackblitz.com/edit/github-mtfdou?file=nuxt.config.ts

npx nuxi info

Nuxt project info: 

------------------------------
- Operating System: `Linux`
- Node Version:     `v14.16.0`
- Nuxt Version:     `3.0.0-27356801.e9128f3`
- Package Manager:  `[email protected]`
- Bundler:          `Vite`
- User Config:      `buildModules`
- Runtime Modules:  `-`
- Build Modules:    `@storyblok/[email protected]`
------------------------------

Screenshot 2022-01-11 at 10 55 03

language slug in path & weird behaviour when switching language

Hey,
after updating to version 2.0.1 I stumbled upon a few problems, which also lack documentation and I am not quite certain if some of it is intended.

seems like paths that include a language slug seem to not work anymore... or at least return a 404

e.g.: "https://api.storyblok.com/v2/cdn/stories/en/about"

searched through the docs and played around a bit and you can give a language parameter to the request right....

although that is kind of a breaking change in general as it would then change the way you request pages...

e.g.: "https://api.storyblok.com/v2/cdn/stories/about?language=en" or "https://api.storyblok.com/v2/cdn/stories/ueber-uns?language=default"

<--- is that intended? Some backward compatibility would not hurt there, even if the language param way is also fine :)

What stops me from using it in production right now is some weird behaviour with some requests though.

Lets say I am on the german version ( default language ) of a page ... like "https://api.storyblok.com/v2/cdn/stories/ueber-uns?language=default"

everything is fine at first - if I stay in the same language all is good.

If I then change the language to the english version like "https://api.storyblok.com/v2/cdn/stories/about?language=en" then somehow the bridge seems to freak out and make a lot of requests till my app throws errors / dies. :)

storyblok_bridge_misbhehaviour.mov

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.