@inzombieland/nuxt-common 1.18.57 → 1.19.0

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.
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/nuxt-common",
3
- "version": "1.18.57",
3
+ "version": "1.19.0",
4
4
  "configKey": "nuxt-common",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.6.0",
package/dist/module.mjs CHANGED
@@ -2,7 +2,7 @@ import { fileURLToPath } from 'node:url';
2
2
  import { defineNuxtModule, createResolver, addServerHandler, addImportsDir, addPlugin, addComponent } from '@nuxt/kit';
3
3
 
4
4
  const name = "@inzombieland/nuxt-common";
5
- const version = "1.18.57";
5
+ const version = "1.19.0";
6
6
 
7
7
  const module = defineNuxtModule({
8
8
  meta: {
@@ -1,7 +1,8 @@
1
- import { ref } from "vue";
2
- import { useUserActions } from "../index.mjs";
1
+ import { ref, watch } from "vue";
2
+ import { useUser, useUserActions } from "../index.mjs";
3
3
  const activeSessions = ref([]);
4
4
  export function useActiveSessions() {
5
+ const user = useUser();
5
6
  const userActions = useUserActions();
6
7
  const fetchActiveSessions = async () => {
7
8
  if (activeSessions.value.length === 0) {
@@ -10,5 +11,10 @@ export function useActiveSessions() {
10
11
  }
11
12
  };
12
13
  fetchActiveSessions();
14
+ watch(user, (user2) => {
15
+ if (!user2) {
16
+ activeSessions.value = [];
17
+ }
18
+ });
13
19
  return activeSessions;
14
20
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/core",
3
- "version": "1.18.57",
3
+ "version": "1.19.0",
4
4
  "type": "module",
5
5
  "license": "ISC",
6
6
  "main": "./index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inzombieland/nuxt-common",
3
- "version": "1.18.57",
3
+ "version": "1.19.0",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "exports": {