mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-10 14:15:42 +00:00
e324e136f5
Saving, enabling or disabling a livechat inbox rebuilds the channel, which calls LiveChat.Close. That only closed each client's outbound channel. The socket stayed open, so the widget kept exchanging ping/pong and looked connected while every later agent reply went nowhere. Only a page reload fixed it. Calling conn.Close was not enough either. fasthttp makes Close a no-op on a hijacked conn unless KeepHijackedConns is set, so it returned nil and the read loop stayed blocked. Client now holds a disconnect func that expires the read deadline, and the read loop also breaks if its client was closed. On the widget side, connect() replaced this.socket without closing the old one, so a reconnect could leave two live sockets. It now closes the previous socket and ignores events from it. Also return input errors from the pre-chat form validation. A blank required field used to come back as a 500 with no hint about which field was wrong. Adds a livechat e2e harness in cypress/support/livechat.js and four specs: the inbox reload regression, messaging, session and auth, and settings. 26 tests, and the reload one fails against a binary without this fix.
101 lines
3.5 KiB
JSON
101 lines
3.5 KiB
JSON
{
|
|
"name": "libredesk",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "pnpm exec vite",
|
|
"dev:main": "pnpm exec vite --mode main",
|
|
"dev:widget": "pnpm exec vite --mode widget",
|
|
"build:main": "vite build --mode main",
|
|
"build:widget": "vite build --mode widget",
|
|
"preview": "vite preview",
|
|
"test": "vitest",
|
|
"test:run": "vitest run",
|
|
"test:e2e": "start-server-and-test preview http://localhost:4173 'cypress run --e2e'",
|
|
"test:e2e:ci": "cypress run --e2e --headless",
|
|
"test:e2e:livechat": "cypress run --e2e --spec \"cypress/e2e/integration/livechat/*.cy.js\"",
|
|
"test:e2e:dev": "start-server-and-test 'vite dev --port 4173' http://localhost:4173 'cypress open --e2e'",
|
|
"test:unit": "cypress run --component",
|
|
"test:unit:dev": "cypress open --component",
|
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",
|
|
"format": "prettier --write src/"
|
|
},
|
|
"dependencies": {
|
|
"@codemirror/lang-html": "^6.4.9",
|
|
"@codemirror/lang-javascript": "^6.2.4",
|
|
"@codemirror/theme-one-dark": "^6.1.3",
|
|
"@formkit/auto-animate": "^0.8.2",
|
|
"@internationalized/date": "^3.6.0",
|
|
"@radix-icons/vue": "^1.0.0",
|
|
"@tailwindcss/typography": "^0.5.19",
|
|
"@tanstack/vue-table": "^8.20.5",
|
|
"@tanstack/vue-virtual": "^3.13.23",
|
|
"@tiptap/extension-code-block-lowlight": "^2.11.2",
|
|
"@tiptap/extension-image": "^2.11.2",
|
|
"@tiptap/extension-link": "^2.11.2",
|
|
"@tiptap/extension-mention": "^2.27.1",
|
|
"@tiptap/extension-placeholder": "^2.11.2",
|
|
"@tiptap/extension-table": "^2.11.5",
|
|
"@tiptap/extension-table-cell": "^2.11.5",
|
|
"@tiptap/extension-table-header": "^2.11.5",
|
|
"@tiptap/extension-table-row": "^2.11.5",
|
|
"@tiptap/extension-text-align": "^2.11.2",
|
|
"@tiptap/extension-underline": "^2.11.2",
|
|
"@tiptap/extension-youtube": "^2.11.2",
|
|
"@tiptap/pm": "^2.11.2",
|
|
"@tiptap/starter-kit": "^2.11.2",
|
|
"@tiptap/suggestion": "^2.27.1",
|
|
"@tiptap/vue-3": "^2.11.2",
|
|
"@unovis/ts": "^1.6.5",
|
|
"@unovis/vue": "^1.6.5",
|
|
"@vee-validate/zod": "^4.15.0",
|
|
"@vueuse/core": "^12.4.0",
|
|
"axios": "^1.18.0",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"codemirror": "^6.0.2",
|
|
"date-fns": "^3.6.0",
|
|
"highlight.js": "^11.12.0",
|
|
"lettersanitizer": "^1.0.7",
|
|
"lowlight": "^3.3.0",
|
|
"lucide-vue-next": "^0.525.0",
|
|
"mitt": "^3.0.1",
|
|
"pinia": "^2.3.0",
|
|
"qs": "^6.15.2",
|
|
"radix-vue": "^1.9.17",
|
|
"reka-ui": "^2.9.7",
|
|
"tailwind-merge": "^2.6.0",
|
|
"vee-validate": "^4.15.0",
|
|
"vue": "^3.5.13",
|
|
"vue-easy-lightbox": "^1.19.0",
|
|
"vue-i18n": "^9.14.5",
|
|
"vue-letter": "^0.2.1",
|
|
"vue-picture-cropper": "^0.7.0",
|
|
"vue-router": "^4.5.0",
|
|
"vue-sonner": "^1.3.0",
|
|
"vue3-emoji-picker": "^1.1.8",
|
|
"vuedraggable": "^4.1.0",
|
|
"zod": "^3.24.1"
|
|
},
|
|
"devDependencies": {
|
|
"@rushstack/eslint-patch": "^1.10.5",
|
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
"autoprefixer": "^10.4.20",
|
|
"cypress": "^15.15.0",
|
|
"eslint": "^8.57.1",
|
|
"eslint-plugin-cypress": "^2.15.2",
|
|
"eslint-plugin-vue": "^9.32.0",
|
|
"jsdom": "^29.0.1",
|
|
"postcss": "^8.5.23",
|
|
"prettier": "^3.4.2",
|
|
"sass": "^1.99.0",
|
|
"start-server-and-test": "^2.0.9",
|
|
"tailwindcss": "^3.4.17",
|
|
"tailwindcss-animate": "^1.0.7",
|
|
"vite": "^6.4.3",
|
|
"vitest": "^4.1.0"
|
|
},
|
|
"packageManager": "pnpm@9.15.3+sha512.1f79bc245a66eb0b07c5d4d83131240774642caaa86ef7d0434ab47c0d16f66b04e21e0c086eb61e62c77efc4d7f7ec071afad3796af64892fae66509173893a"
|
|
}
|