@nitra/vite-boot 4.0.6 → 4.0.8

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 +3 -6
  2. package/src/apollo.js +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nitra/vite-boot",
3
- "version": "4.0.6",
3
+ "version": "4.0.8",
4
4
  "description": "Vite boot",
5
5
  "type": "module",
6
6
  "exports": {
@@ -26,13 +26,10 @@
26
26
  "src"
27
27
  ],
28
28
  "dependencies": {
29
- "@apollo/client": "3.8.*",
29
+ "@apollo/client": "^4.0.5",
30
30
  "@nitra/jwt-decode": "^1.2.0",
31
- "@nitra/log": "^0.0.3",
32
31
  "graphql-ws": "^6.0.6",
33
32
  "pinia": "^3.0.3",
34
- "pinia-plugin-persistedstate": "^4.5.0",
35
- "react": "^19.1.1",
36
- "react-dom": "^19.1.1"
33
+ "pinia-plugin-persistedstate": "^4.5.0"
37
34
  }
38
35
  }
package/src/apollo.js CHANGED
@@ -2,7 +2,7 @@ import { ApolloClient, InMemoryCache, createHttpLink, from, split } from '@apoll
2
2
  import { setContext } from '@apollo/client/link/context'
3
3
  import { GraphQLWsLink } from '@apollo/client/link/subscriptions'
4
4
  import { getMainDefinition } from '@apollo/client/utilities'
5
- import { log } from '@nitra/log'
5
+ // import { console } from '@nitra/console'
6
6
  import { createClient } from 'graphql-ws'
7
7
  import { checkToken, getToken } from './token.js'
8
8
  import { user } from './user.js'
@@ -67,18 +67,18 @@ export const wsClient = createClient({
67
67
  on: {
68
68
  // Обробник помилок підключення
69
69
  error: error => {
70
- log.error('WebSocket помилка:', error)
70
+ console.error('WebSocket помилка:', error)
71
71
  },
72
72
 
73
73
  // Обробник закриття з'єднання
74
74
  closed: event => {
75
- log.info('WebSocket закрито:', event.code, event.reason)
75
+ console.info('WebSocket закрито:', event.code, event.reason)
76
76
 
77
77
  // Коди помилок аутентифікації
78
78
  if (event.code === 4401) {
79
- log.error('Неавторизований: неправильний токен')
79
+ console.error('Неавторизований: неправильний токен')
80
80
  } else if (event.code === 4403) {
81
- log.error('Заборонено: недостатньо прав')
81
+ console.error('Заборонено: недостатньо прав')
82
82
  }
83
83
  }
84
84
  },