@nitra/vite-boot 5.0.8 → 5.0.9

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/user.js +4 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nitra/vite-boot",
3
- "version": "5.0.8",
3
+ "version": "5.0.9",
4
4
  "description": "Vite boot",
5
5
  "type": "module",
6
6
  "exports": {
package/src/user.js CHANGED
@@ -43,15 +43,16 @@ function intersection(a, b) {
43
43
  }
44
44
 
45
45
  /**
46
- * Переводимо в анонімного користувача
46
+ * Очищаємо токен та дані користувача, переводимо його у стан "анонімний".
47
47
  */
48
48
  export async function cleanToken() {
49
- console.log('Cleaning token and user data')
49
+ // очищуємо дані користувача
50
50
  unsetUser()
51
51
 
52
- // видаляємо з localStorage
52
+ // видаляємо запис з localStorage
53
53
  localStorage.removeItem('__session')
54
54
 
55
+ // видаляємо cookie (__session) через Cookie Store API або document.cookie (fallback).
55
56
  if (globalThis.cookieStore && typeof globalThis.cookieStore.delete === 'function') {
56
57
  let safeDomain = import.meta.env.VITE_DOMAIN
57
58