enso/app/gui2/package.json
Adam Obuchowicz de406c69fa
Automatic reconnect with Language Server. (#9691)
Fixes #8520

If the websocket is closed not by us, we automatically try to reconnect with it, and initialize the protocol again. **Restoring state (execution contexts, attached visualizations) is not part of this PR**.

It's a part of making IDE work after hibernation (or LS crash).

# Important Notes
It required somewhat heavy refactoring:
1. I decided to use an existing implementation of reconnecting websocket. Replaced (later discovered by me) our implementation.
2. The LanguageServer class now handles both reconnecting and re-initializing - that make usage of it simpler (no more `Promise<LanguageServer>` - each method will just wait for (re)connection and initialization.
3. The stuff in `net` src's module was partially moved to shared's counterpart (with tests). Merged `exponentialBackoff` implementations, which also brought me to
4. Rewriting LS client, so it returns Result instead of throwing, what is closer our desired state, and allows us using exponentialBackoff method without any wrappers.
2024-04-19 13:39:45 +00:00

141 lines
4.8 KiB
JSON

{
"version": "0.1.0",
"name": "enso-gui2",
"private": true,
"type": "module",
"author": {
"name": "Enso Team",
"email": "contact@enso.org"
},
"scripts": {
"dev": "vite",
"build": "npm --workspace enso-dashboard run compile && run-p typecheck build-only",
"build:cloud": "cross-env CLOUD_BUILD=true npm run build",
"preview": "vite preview",
"test": "vitest run && playwright test",
"test:unit": "vitest",
"test:e2e": "playwright test",
"story:dev": "histoire dev",
"story:build": "histoire build",
"story:preview": "histoire preview",
"build-only": "vite build",
"compile-server": "tsc -p tsconfig.server.json",
"typecheck": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
"lint": "eslint .",
"format": "prettier --version && prettier --write src/ && eslint . --fix",
"clean-old-generated-directory": "rimraf src/generated",
"build-rust-ffi": "wasm-pack build ./rust-ffi --release --target web && wasm-pack build ./rust-ffi --out-dir node-pkg --target nodejs",
"generate-ast-schema": "cargo run -p enso-parser-schema > shared/ast/generated/ast-schema.json",
"generate-ast-types": "tsx ./parser-codegen/index.ts shared/ast/generated/ast-schema.json shared/ast/generated/ast.ts",
"preinstall": "npm run clean-old-generated-directory && npm run build-rust-ffi && npm run generate-ast-schema && npm run generate-ast-types && npm run generate-metadata && npm run download-fonts",
"postinstall": "playwright install",
"generate-metadata": "node scripts/generateIconMetadata.js",
"download-fonts": "node scripts/downloadFonts.js"
},
"//": [
"'ag-grid-community' is required as a peer dependency of 'ag-grid-enterprise'."
],
"dependencies": {
"@ag-grid-community/client-side-row-model": "^30.2.0",
"@ag-grid-community/core": "^30.2.0",
"@ag-grid-community/styles": "^30.2.0",
"@ag-grid-enterprise/core": "^30.2.0",
"@ag-grid-enterprise/range-selection": "^30.2.1",
"@babel/parser": "^7.22.16",
"@fast-check/vitest": "^0.0.8",
"@floating-ui/vue": "^1.0.6",
"@lezer/common": "^1.1.0",
"@lezer/highlight": "^1.1.6",
"@noble/hashes": "^1.3.2",
"@open-rpc/client-js": "^1.8.1",
"@pinia/testing": "^0.1.3",
"@vueuse/core": "^10.4.1",
"ag-grid-community": "^30.2.1",
"ag-grid-enterprise": "^30.2.1",
"codemirror": "^6.0.1",
"culori": "^3.2.0",
"enso-dashboard": "^0.1.0",
"events": "^3.3.0",
"fast-diff": "^1.3.0",
"hash-sum": "^2.0.0",
"install": "^0.13.0",
"isomorphic-ws": "^5.0.0",
"lib0": "^0.2.85",
"magic-string": "^0.30.3",
"murmurhash": "^2.0.1",
"partysocket": "^1.0.1",
"pinia": "^2.1.7",
"postcss-inline-svg": "^6.0.0",
"postcss-nesting": "^12.0.1",
"rimraf": "^5.0.5",
"semver": "^7.5.4",
"sucrase": "^3.34.0",
"verte-vue3": "^1.1.1",
"vue": "^3.4.19",
"ws": "^8.13.0",
"y-codemirror.next": "^0.3.2",
"y-protocols": "^1.0.5",
"y-textarea": "^1.0.0",
"y-websocket": "^1.5.0",
"yjs": "^13.6.7",
"zod": "^3.22.4"
},
"devDependencies": {
"@danmarshall/deckgl-typings": "^4.9.28",
"@eslint/eslintrc": "^3.0.2",
"@eslint/js": "^8.57.0",
"@histoire/plugin-vue": "^0.17.12",
"@open-rpc/server-js": "^1.9.4",
"@playwright/test": "^1.40.0",
"@rushstack/eslint-patch": "^1.3.2",
"@tsconfig/node18": "^18.2.0",
"@types/css.escape": "^1.5.2",
"@types/culori": "^2.0.1",
"@types/d3": "^7.4.0",
"@types/hash-sum": "^1.0.0",
"@types/jsdom": "^21.1.1",
"@types/mapbox-gl": "^2.7.13",
"@types/node": "^20.11.21",
"@types/shuffle-seed": "^1.1.0",
"@types/unbzip2-stream": "^1.4.3",
"@types/wicg-file-system-access": "^2023.10.2",
"@types/ws": "^8.5.5",
"@vitejs/plugin-react": "^4.0.4",
"@vitejs/plugin-vue": "^5.0.4",
"@vitest/coverage-v8": "^1.3.1",
"@volar/vue-typescript": "^1.6.5",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/test-utils": "^2.4.4",
"@vue/tsconfig": "^0.5.1",
"change-case": "^4.1.2",
"cross-env": "^7.0.3",
"css.escape": "^1.5.1",
"d3": "^7.4.0",
"enso-project-manager-shim": "^1.0.0",
"esbuild": "^0.19.3",
"eslint": "^8.49.0",
"eslint-plugin-vue": "^9.22.0",
"floating-vue": "^2.0.0-beta.24",
"hash-wasm": "^4.10.0",
"histoire": "^0.17.2",
"jsdom": "^22.1.0",
"playwright": "^1.39.0",
"postcss-nesting": "^12.0.1",
"prettier": "^3.2.5",
"prettier-plugin-organize-imports": "^3.2.4",
"shuffle-seed": "^1.1.6",
"sql-formatter": "^13.0.0",
"tailwindcss": "^3.2.7",
"tar": "^6.2.0",
"tsx": "^4.7.1",
"typescript": "~5.2.2",
"unbzip2-stream": "^1.4.3",
"vite": "^4.4.9",
"vite-plugin-inspect": "^0.7.38",
"vitest": "^1.3.1",
"vue-react-wrapper": "^0.3.1",
"vue-tsc": "^1.8.27"
}
}