From d60e9fd30fca0d65efffd421552e18aa54f9b41f Mon Sep 17 00:00:00 2001 From: Kai Salmen Date: Wed, 23 Oct 2024 10:13:13 +0200 Subject: [PATCH 1/6] Created didModelContentChange in editorAppBase - Moved getEditorUri and verifyUrlOrCreateDataUrl to editorAppBase - Moved utils from wrapper to client - Updated dependencies - Update versions to -next.5 --- README.md | 2 +- docs/versions-and-history.md | 2 +- package-lock.json | 846 ++++++++---------- package.json | 12 +- packages/client/CHANGELOG.md | 5 +- packages/client/package.json | 20 +- packages/client/src/tools/index.ts | 1 + .../src => client/src/tools}/utils.ts | 14 - packages/client/test/tools/utils.test.ts | 130 +++ packages/examples/CHANGELOG.md | 9 +- packages/examples/package.json | 50 +- packages/examples/src/python/client/config.ts | 5 +- packages/wrapper-react/CHANGELOG.md | 5 +- packages/wrapper-react/package.json | 18 +- packages/wrapper-react/src/index.tsx | 21 +- packages/wrapper/CHANGELOG.md | 6 +- packages/wrapper/package.json | 66 +- packages/wrapper/src/editorAppBase.ts | 28 +- packages/wrapper/src/editorAppExtended.ts | 3 +- packages/wrapper/src/index.ts | 1 - packages/wrapper/src/languageClientWrapper.ts | 3 +- packages/wrapper/test/utils.test.ts | 2 +- verify/angular/package.json | 8 +- verify/pnpm/package.json | 8 +- verify/vite/package.json | 8 +- verify/webpack/package.json | 8 +- verify/yarn/package.json | 10 +- 27 files changed, 676 insertions(+), 615 deletions(-) rename packages/{wrapper/src => client/src/tools}/utils.ts (70%) create mode 100644 packages/client/test/tools/utils.test.ts diff --git a/README.md b/README.md index 0ce2cb095..8680e944a 100644 --- a/README.md +++ b/README.md @@ -282,7 +282,7 @@ loader.config({ monaco }); If you use pnpm, you have to add `vscode` / `@codingame/monaco-vscode-api` as direct dependency (you find the [compatibility table here](https://github.com/TypeFox/monaco-languageclient/blob/main/docs/versions-and-history.md#monaco-editor--codingamemonaco-vscode-api-compatibility-table), otherwise the installation will fail. ```json -"vscode": "npm:@codingame/monaco-vscode-api@~10.1.0" +"vscode": "npm:@codingame/monaco-vscode-api@~10.1.1" ``` ## Licenses diff --git a/docs/versions-and-history.md b/docs/versions-and-history.md index e5031a284..aecea0740 100644 --- a/docs/versions-and-history.md +++ b/docs/versions-and-history.md @@ -6,7 +6,7 @@ The following table describes which version of **monaco-languageclient** and **@ | monaco-languageclient | monaco-editor-wrapper | monaco-editor-react | monaco-vscode-api / editor-api | vscode | monaco-editor | release date | comment | | :---- | :---- | :--- | :--- | :--- | :--- | :--- | :--- | -| 9.0.0-next.4 | 6.0.0-next.4 | 6.0.0-next.4 | 10.1.0 | 1.94.2 | 0.52.0 | 2024-10-21 | | +| 9.0.0-next.5 | 6.0.0-next.5 | 6.0.0-next.5 | 10.1.1 | 1.94.2 | 0.52.0 | 2024-10-23 | | | 8.8.3 | 5.5.3 | 4.5.3 | 8.0.4 | 1.92.2 | 0.51.0 | 2024-08-26 | | | 8.8.2 | 5.5.2 | 4.5.2 | 8.0.2 | 1.92.2 | 0.50.0 | 2024-08-21 | | | 8.8.1 | 5.5.1 | 4.5.1 | 8.0.1 | 1.92.1 | 0.50.0 | 2024-08-12 | | diff --git a/package-lock.json b/package-lock.json index 79f5e8d85..304308983 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,17 +13,17 @@ ], "devDependencies": { "@codingame/esbuild-import-meta-url-plugin": "~1.0.2", - "@codingame/monaco-vscode-rollup-vsix-plugin": "~10.1.0", + "@codingame/monaco-vscode-rollup-vsix-plugin": "~10.1.1", "@eslint/eslintrc": "~3.1.0", "@eslint/js": "~9.13.0", "@stylistic/eslint-plugin": "~2.9.0", "@testing-library/react": "~16.0.1", - "@types/node": "~20.16.13", - "@types/react": "~18.3.10", + "@types/node": "~20.16.15", + "@types/react": "~18.3.12", "@types/react-dom": "~18.3.1", "@types/vscode": "~1.94.0", - "@typescript-eslint/eslint-plugin": "~8.10.0", - "@typescript-eslint/parser": "~8.10.0", + "@typescript-eslint/eslint-plugin": "~8.11.0", + "@typescript-eslint/parser": "~8.11.0", "@vitejs/plugin-react": "~4.3.3", "@vitest/browser": "~2.1.3", "editorconfig": "~2.0.0", @@ -37,7 +37,7 @@ "minimatch": "~10.0.1", "playwright": "~1.48.1", "typescript": "~5.6.3", - "vite": "~5.4.9", + "vite": "~5.4.10", "vite-node": "~2.1.3", "vitest": "~2.1.3", "webdriverio": "~9.2.1" @@ -562,338 +562,338 @@ } }, "node_modules/@codingame/monaco-vscode-base-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-base-service-override/-/monaco-vscode-base-service-override-10.1.0.tgz", - "integrity": "sha512-fJjF69QnBPcmcH8Mz4jFkRf82KVtLfxkSK5L400IQngX/0xu+EzZ+5dLRujorqja15Pf+LtSZO2931O87gTAwA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-base-service-override/-/monaco-vscode-base-service-override-10.1.1.tgz", + "integrity": "sha512-ZdRRbsyb/bSY7fDJqj/Pmixt4eAHAlqwkKbYIt56Dy82lTzb6977HtUGLaq/qbMtTnYf3CpbxCQ1PFUYML8Y2w==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-bulk-edit-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-bulk-edit-service-override/-/monaco-vscode-bulk-edit-service-override-10.1.0.tgz", - "integrity": "sha512-nF3qxPYauN8TnidjdnywZbN/P9zzJsFGm+dN37H5h1i+LXmjlHQ225h5DuMcGPdq4elI4HZP0v24f+Y5+fOMYQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-bulk-edit-service-override/-/monaco-vscode-bulk-edit-service-override-10.1.1.tgz", + "integrity": "sha512-WvXHN7B87p3qGU6dC7h5kL3l+72W++gsmWxe/xdtD3OR3gHKtrlLhUrwg9naVeaii+rxxOO2yXr7AqaPB2QsRw==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-configuration-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-configuration-service-override/-/monaco-vscode-configuration-service-override-10.1.0.tgz", - "integrity": "sha512-KUYQQ4tLbnGDJ1JDHdnoeOplaZDHQpTbNXkz+1uQX6Tli2aChNdOCMzQ12yyIPPFazazjLa1v0lHl8NmCgmPuQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-configuration-service-override/-/monaco-vscode-configuration-service-override-10.1.1.tgz", + "integrity": "sha512-TLTHuNiVe/+IXvYnvymrM/so/ptfK8lvjyPIt9BxtlHNQXyJ4RJVFn1H9aLCf8QL2b1sAyttdDRtYfPZ7Rjcww==", "license": "MIT", "dependencies": { - "@codingame/monaco-vscode-files-service-override": "10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "@codingame/monaco-vscode-files-service-override": "10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-editor-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-editor-service-override/-/monaco-vscode-editor-service-override-10.1.0.tgz", - "integrity": "sha512-8+FjXI/okD8V81HuYlV2KLRJfOx+tj/6koGaRcZ8yDypXBN9LA6HMqQCq83h0fipMdhnAjRSH+E5HWsQZtrx2g==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-editor-service-override/-/monaco-vscode-editor-service-override-10.1.1.tgz", + "integrity": "sha512-GY4+6ZciZMWfBsdOWsmm6FcEx9lslrfR13GeY8mwNUacK5Fi3R3rZ/Afq8pJPii4Gh0TG43OQahM4tAgIOS8qQ==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-environment-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-environment-service-override/-/monaco-vscode-environment-service-override-10.1.0.tgz", - "integrity": "sha512-B/fXbE6hUJAotkFnFEDXiVM4JGPYzXif/bsJ7WcmGpp4feJyPvqYAlNFiFkgZTE2vkM8Zs2RfRM6tJ4SFFBArQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-environment-service-override/-/monaco-vscode-environment-service-override-10.1.1.tgz", + "integrity": "sha512-2YjqZZa4Yc2UXMneUrd7bpfkrQtdY+iKzSh+XYBipw1I4DoMsQecCUAs/I9KtzM4cARBy3COD4S3uUKA79QsiQ==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-extensions-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-extensions-service-override/-/monaco-vscode-extensions-service-override-10.1.0.tgz", - "integrity": "sha512-ujzATpP4EgLAUHw5IZQzvEIzy0qV7upLICWqsN8Txx2eEk6ksTLVE55iTg6gLTcKspGtYSPUKtwNB6VMbZt3RQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-extensions-service-override/-/monaco-vscode-extensions-service-override-10.1.1.tgz", + "integrity": "sha512-ViEl41JmKYjvVb3UM4XruaqURWSthsTuhDbi03oGppvLwbiHO3L0uh7FaPYeIb1BVJiWU9Jv562cdzgUATqv7g==", "license": "MIT", "dependencies": { - "@codingame/monaco-vscode-files-service-override": "10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "@codingame/monaco-vscode-files-service-override": "10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-files-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-files-service-override/-/monaco-vscode-files-service-override-10.1.0.tgz", - "integrity": "sha512-ddHswj77c1HgZ8qcxJVJEvszDDkYTfRVx0U3CjZm/rn0knjxStmza6UdAAp8NtVJ9jLEqKdsdacXwPFpGMO/fQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-files-service-override/-/monaco-vscode-files-service-override-10.1.1.tgz", + "integrity": "sha512-rP9MqNEaWY5Z6viwO1WPKBGRLIHKvwOjfcisOZQIDcyPIe6S+7w3ZuOBWxK5TkaAxe7fLqqiPnmqEx98bsy4/Q==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-groovy-default-extension": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-groovy-default-extension/-/monaco-vscode-groovy-default-extension-10.1.0.tgz", - "integrity": "sha512-YqlLL+A4/vipZdPRC/afVOSH/exkm+YNdwhwLI0HF9zvzoAahygw7wXFKdJPTkEaYUzK2hyavfix4YnNN+kq5w==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-groovy-default-extension/-/monaco-vscode-groovy-default-extension-10.1.1.tgz", + "integrity": "sha512-IuZpMWiKsvXKIQ2lf9wd15eMe1+mWqNzczr9TID4i7z513m45fGVQJNjLcE+QJh/GYTaetu0mAikU3j1Xj13uQ==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-host-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-host-service-override/-/monaco-vscode-host-service-override-10.1.0.tgz", - "integrity": "sha512-xXs+WkUebg8bSWVmmhGJRSfcs0780hmCxGOHVFPfA1P583/w71vrHr37C1vi2eYpZVQRvt94NveOIfHA01lkfA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-host-service-override/-/monaco-vscode-host-service-override-10.1.1.tgz", + "integrity": "sha512-E+tEmX2KgJTqGOkxrrP8bAGWbihSvSq5uZpcSGbI2pUHmpRyMBrlom7ie6wxfnqMtmqXI+VKG+lR4Q+HKiqTew==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-java-default-extension": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-java-default-extension/-/monaco-vscode-java-default-extension-10.1.0.tgz", - "integrity": "sha512-7yjC0d1PZXeA/WBlmngA1Ao0myS+cRpsrAiKWZSPQaXuP1FwsjGwFkkJvaZSXwYqjy/sUswT18cP2UNrmlXCEQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-java-default-extension/-/monaco-vscode-java-default-extension-10.1.1.tgz", + "integrity": "sha512-PpSjoRk5jlgj9KeiaMXMgyNGcHeWe+wdlLWKid+m41ANjm90UqsZA90CpcMqvQ1kYwoP8jFQlS2swaxvHmK71A==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-javascript-default-extension": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-javascript-default-extension/-/monaco-vscode-javascript-default-extension-10.1.0.tgz", - "integrity": "sha512-PeaEAZBuSkSKVwDy5cZuOegTJfQf6IePQC0Wi3mkkIMTtjgM3vWRhGHQraeL7JpnchRhtjE1XZfSnHuiA44zzw==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-javascript-default-extension/-/monaco-vscode-javascript-default-extension-10.1.1.tgz", + "integrity": "sha512-X1jqwlwRX0sAcymmDTlT8js6Aw4+aqTDVN1M9hfDfryrta/Cjzc6dbYqnOhQjZfCThUBiec98r56J98MGWzFlA==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-json-default-extension": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-json-default-extension/-/monaco-vscode-json-default-extension-10.1.0.tgz", - "integrity": "sha512-wQfRryr5uiqMn5Ew2r3QkhIw+7d3R9s8jk0e7pMklSn2prIZFYmD+j0YnYpQ5JOHTj2qPT6ciYyA/eYZSYzeig==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-json-default-extension/-/monaco-vscode-json-default-extension-10.1.1.tgz", + "integrity": "sha512-Ruko7iRLuhkWbD6JCxMNPPm5cKqLzQMUDwkgEd8pcYrH6TScBhmBVkZ6Vhf9+hRL03YJhu3nqcGurBL2eFhHKQ==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-keybindings-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-keybindings-service-override/-/monaco-vscode-keybindings-service-override-10.1.0.tgz", - "integrity": "sha512-16K+pOh3algActrqiV1SuVu32vQneWEHkW9qW8da127qGrMqWiCgJtqGIB5I1FL4/zUEo8AoxUISV/qKu+GHMQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-keybindings-service-override/-/monaco-vscode-keybindings-service-override-10.1.1.tgz", + "integrity": "sha512-Uc9dJ3JVw1E56Iex7BbMif0RLJOrCwR/yX4qyY9mJSDTZu8LYrHdTEOgDDjz2uAcPl7Wz23vmW4TIFO2fmIIeA==", "license": "MIT", "dependencies": { - "@codingame/monaco-vscode-files-service-override": "10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "@codingame/monaco-vscode-files-service-override": "10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-language-pack-cs": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-cs/-/monaco-vscode-language-pack-cs-10.1.0.tgz", - "integrity": "sha512-AD3jpgi1H+YgIjrsryCZc/bCDEy1R2VQhzIT3abC49hh2JQKevd+aqjqpx15R+7EPeP/DrZL1UJTIMP1ByPYBw==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-cs/-/monaco-vscode-language-pack-cs-10.1.1.tgz", + "integrity": "sha512-0vHo+AgG1EaCg6cAXgJ9kCia+lxy7apxFX91/GyyuwUPBozJJRUr1Bw0FYSXlWTGHS6eARS7XJgs+MjK9ycIjA==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-language-pack-de": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-de/-/monaco-vscode-language-pack-de-10.1.0.tgz", - "integrity": "sha512-4Cx3uUN84PWYUJ0n/I00oNg+HtjRYW9Pf6YcnYDmZ8OExJb7o+IEXytgl2LxNUTsgr4hxgNqdTn1TLsb+PcfnA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-de/-/monaco-vscode-language-pack-de-10.1.1.tgz", + "integrity": "sha512-1Cy8RHaQev5A1H34qJrLI7cLhsOt1JQD1uigCA3Ty/1fT6Tu9/8F+6KeZPTJjVveHLAt1Mj1DaY51V5Nj/8epg==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-language-pack-es": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-es/-/monaco-vscode-language-pack-es-10.1.0.tgz", - "integrity": "sha512-K826+wjC66jmHf9LVBR2RLqvO5OQmoKUeo+lSsH0onk6ZgKvHM7ZVDF8v2Hncg9501DD780nkZ8Nig5tlDPgiQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-es/-/monaco-vscode-language-pack-es-10.1.1.tgz", + "integrity": "sha512-NxJosLtI6OaHwEUvpK3Zd3Yc0WMYMdJl6LXmIDrMLkpxzACGh50Rs4Sl8INSlZTDzUiP2dO5xmNlp3diRJ6Ixg==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-language-pack-fr": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-fr/-/monaco-vscode-language-pack-fr-10.1.0.tgz", - "integrity": "sha512-9oqfHT7K0szdntY7Pg+zvHqNloFDoK1vCPWic1YhdAqI1BFG/xzGFKCxhhNm9jpCTwhgZY248eEJDcpo4CZO1g==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-fr/-/monaco-vscode-language-pack-fr-10.1.1.tgz", + "integrity": "sha512-FCIzdMociWUG1Ih3/hhhVqr52hC9sDn7qyaTh+USaAGHueSoC8YXio+feSk6tjxwEIypQxWyYHDb/K0MtVcUWg==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-language-pack-it": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-it/-/monaco-vscode-language-pack-it-10.1.0.tgz", - "integrity": "sha512-RMeaKG1Y7zpKCJQKz7YW9viCgHtxZAp/BltIio+rnoGthsuOYQDUsq/aFll/rIIMPiIV0UjbSxY+XuS7KoE3CQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-it/-/monaco-vscode-language-pack-it-10.1.1.tgz", + "integrity": "sha512-vvc3BKEV42x81NXGnRt8DmmJnoN5AgmDq4RLQuATnGJWm8alN2sAOgWG6C/zuAGJguMJopPER7ZPCRUs2AOjZw==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-language-pack-ja": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-ja/-/monaco-vscode-language-pack-ja-10.1.0.tgz", - "integrity": "sha512-9wGns4EIlz5bXu3cYn/Ur/Km2nld20SbUgrLlIZ8tshaxDPX4QYrJKYrnRWp0Gt8YLKOYOQmX0TaWmFjabGpsA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-ja/-/monaco-vscode-language-pack-ja-10.1.1.tgz", + "integrity": "sha512-6DUYN/ifLSC8eZUceX5aDr5lxMqbinRiFd+Si9TcIw+XmgpJBBl67laJ7OZMSi/e6ok+qWICX3+ZMp/Gy7tiyg==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-language-pack-ko": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-ko/-/monaco-vscode-language-pack-ko-10.1.0.tgz", - "integrity": "sha512-GY6BHw+HTz1yrPFCco1t2qFC2mM9ovqCnGLgkuPVQyr/GqRfLwr1qARGuMsxELMDJTCD+IHcxlFCbp9/8sYd7g==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-ko/-/monaco-vscode-language-pack-ko-10.1.1.tgz", + "integrity": "sha512-lCMgoHJ6tShFk5N2Q2Qx6n2pe1FySJkptBb3L9VSzAcftc0CeaVO6zGIH8vN8RnX3BevPbD3k5WiGwFE679ECg==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-language-pack-pl": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-pl/-/monaco-vscode-language-pack-pl-10.1.0.tgz", - "integrity": "sha512-KyoFwUyp7GbeKcOo6bs4oC6a0PaxeFhE8xuLBnLWNQqsupOVW+PoxXPGRQPLkNf88c7XIjBIyryQiRzhRR2u0Q==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-pl/-/monaco-vscode-language-pack-pl-10.1.1.tgz", + "integrity": "sha512-LmenrkLE13K+dyaHCS4bxNLvgYSX/ZjFTxm9j7mOtx0rkcLB5lgD4a5LwFJ1TnCuFmGkrYPw75F3RT6frK1J+w==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-language-pack-pt-br": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-pt-br/-/monaco-vscode-language-pack-pt-br-10.1.0.tgz", - "integrity": "sha512-gIxyTOhTKzGw3FB5mCD2ZAq1Xxpoa/76gE0A2trach6WYoVoG5HEGvjVYcLqfxqN2zEJOpUtEJDss3uC7oNQPw==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-pt-br/-/monaco-vscode-language-pack-pt-br-10.1.1.tgz", + "integrity": "sha512-3El/K4NvRMxl7ZPydS3YT+OYcl/F8e6iwtBcMPUi/juIouFs10YwdHY4KewDRYmmZ7rKh+9/I4RXVhlsEzECnw==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-language-pack-qps-ploc": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-qps-ploc/-/monaco-vscode-language-pack-qps-ploc-10.1.0.tgz", - "integrity": "sha512-QlVirzzr8DWglkHvsutSWgOZLgyuvaSItv/PDygEbanKJH8xAjQMmJo/AZWTAQTyNu3rEE+zJtoX5QgSkQatBA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-qps-ploc/-/monaco-vscode-language-pack-qps-ploc-10.1.1.tgz", + "integrity": "sha512-RNYZV2J2q6hsxHqiiH6PoDr6KRWwNK1TALIXlvnJOb9pFo/VJCQBrogN5KCz4fKTUyrawbabWIBMvSzMjC8Gqg==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-language-pack-ru": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-ru/-/monaco-vscode-language-pack-ru-10.1.0.tgz", - "integrity": "sha512-VIrPEZS3LYLldTSPoaAUODtSXS/nDkQl6s3QOzZUo7AiyuQfWQUQuE+lnP8KSDgVky/0OI5o/x4WrTi71b+jzA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-ru/-/monaco-vscode-language-pack-ru-10.1.1.tgz", + "integrity": "sha512-8L0nlgeZufK+bdGlecYoIuz4AD6zFyw1Blq+NQuuwZ+T4zH4u+PQXIvblKYd4jDhVMnniw5YckjPAKOmr3fk8w==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-language-pack-tr": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-tr/-/monaco-vscode-language-pack-tr-10.1.0.tgz", - "integrity": "sha512-PM+gmHpxB8hnSZZEBHmfbQnTaAlfCWbrE8YaghGdBO6IubvhnG8Tl0z6eR8vCb83DGnliV3QyANw3+hurtHOkQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-tr/-/monaco-vscode-language-pack-tr-10.1.1.tgz", + "integrity": "sha512-xxNFp1QV6QGUpHUQwHuNlgcpk3+6IPxkBhOufzqeEiHqa+cbQEOPg2w/1wRbqxePxcNvfinuN0JMlbX7LXSI+Q==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-language-pack-zh-hans": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-zh-hans/-/monaco-vscode-language-pack-zh-hans-10.1.0.tgz", - "integrity": "sha512-8glcl4586NlBsfhIFIY+5tz7U1t+4gBcd3rA1YjWQigsjaI10KUe46QVCn+QiNwrY+G6OZWijrGEymQMmGczTw==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-zh-hans/-/monaco-vscode-language-pack-zh-hans-10.1.1.tgz", + "integrity": "sha512-scLSgLtu4SEEygbOE9lGCoVcKsck+e4lSWUUhWj02EJ/wVZ7pfbEm2UK1XWmxXVIwNOvstxuv2TJ6YLKHkfhEA==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-language-pack-zh-hant": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-zh-hant/-/monaco-vscode-language-pack-zh-hant-10.1.0.tgz", - "integrity": "sha512-heOAWYZixbmzQunogtijpuBafvvGniwiTyRco0qftYbYNc9UCGaafZ8gdyApAHFjQ0VSTAj05lFiGAPPGBnS1Q==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-language-pack-zh-hant/-/monaco-vscode-language-pack-zh-hant-10.1.1.tgz", + "integrity": "sha512-igwiZ6326jeqg1tgAqbbOrFLd27qHFWY2w6rr5koEBd0xP7Wcqat0yFJQnSK19tT4OSkQWnqlHldq8WgWkhP7w==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-languages-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-languages-service-override/-/monaco-vscode-languages-service-override-10.1.0.tgz", - "integrity": "sha512-DAA9splF2Fy4CfNJXWkT7t/LiGrz8EADueSSkNcjdjiv+jmSk0NO9VrRNh5+4kNdxsEIjNfKDGKRZyXztMQPqw==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-languages-service-override/-/monaco-vscode-languages-service-override-10.1.1.tgz", + "integrity": "sha512-UPeji0B4BGv0FaYRz1+ahYB1DauS+kA3zXFSf+OZhcV5QTHr/RvPoedPRhN3VQ5r7bIE+f50meKzDAd1P2s0Kw==", "license": "MIT", "dependencies": { - "@codingame/monaco-vscode-files-service-override": "10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "@codingame/monaco-vscode-files-service-override": "10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-layout-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-layout-service-override/-/monaco-vscode-layout-service-override-10.1.0.tgz", - "integrity": "sha512-y3ZQplmy3T6YoJWUPHGIaNP9CsxCAXa7I+AT3iJ/svUQdD5HnKneDQYG1nH+kLQPudmRdP4F7kQCdnly9LwH9g==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-layout-service-override/-/monaco-vscode-layout-service-override-10.1.1.tgz", + "integrity": "sha512-DTWr0DmYx0LCsg5aZcZoiYoFKWYDjqYimBONoMUUY335npuQGuA1QAgmH1KO6LjfXpIXXgL/PltGnrbZjmfJIA==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-lifecycle-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-lifecycle-service-override/-/monaco-vscode-lifecycle-service-override-10.1.0.tgz", - "integrity": "sha512-M31qCwli5KB9SF8WASOKKGOaxdrY9dhBNh1rXztAROCvSvG6U22S3+Gl7IgmU0wtEVpfLMci8XPhqprbAVu4Mw==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-lifecycle-service-override/-/monaco-vscode-lifecycle-service-override-10.1.1.tgz", + "integrity": "sha512-yvuF8U30LmHKnnPKbm6Wfj2Y6VtNEgpqODgEfGe9I2ihGSgpx2Mx33EAoqgptPFAgxbh2bJO03F3fabLtaJCMw==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-localization-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-localization-service-override/-/monaco-vscode-localization-service-override-10.1.0.tgz", - "integrity": "sha512-ML1XY8Lp9prApaH4IOH/Rpm8gf5oWjBIOPREiFXBEOxbcezO2P4lQkd27KGwcFFSK+rs9hbBaF8DJEgF72vGcw==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-localization-service-override/-/monaco-vscode-localization-service-override-10.1.1.tgz", + "integrity": "sha512-9XVsTkuw0s3/vh14W7PTR/Vf5dopZgz/83yrtr2ldhFIi9SO09dvUWXzE1ydzLIEjKacKgW7C6sTHu9VAIwl3Q==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-log-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-log-service-override/-/monaco-vscode-log-service-override-10.1.0.tgz", - "integrity": "sha512-YUyZmnDpuQ6Uz7cBed51c0WZxukkeiBycwweT5iuRC6n1Q1g9njARoQ2mDhqbwoXMq+y7bPtg2d78vwxG/y1cg==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-log-service-override/-/monaco-vscode-log-service-override-10.1.1.tgz", + "integrity": "sha512-hf7eWu+lmRBHNd5ciAw/c+HK2iCQFHPO3NA0v5hRnPLq204hWgfDGQkFglBWel6f2sYYTk38evczJ3iLebfmbw==", "license": "MIT", "dependencies": { - "@codingame/monaco-vscode-environment-service-override": "10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "@codingame/monaco-vscode-environment-service-override": "10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-model-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-model-service-override/-/monaco-vscode-model-service-override-10.1.0.tgz", - "integrity": "sha512-MZ59rOAm1JsCHMBrgefoYO4Dbu2QXDAHScr3tHu9duUPwVye3IsUKA+TSJCiN8eClHbSS3FsdUJ07ry8XjVPPQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-model-service-override/-/monaco-vscode-model-service-override-10.1.1.tgz", + "integrity": "sha512-HXYqVrjIZeqlqmVw6eF62iI3DCFN5JIau9fYv6i5UVp5jThOBFU20JqbTvN3GQTPHq2HcfwK8zDLMfLB60mtJA==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-monarch-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-monarch-service-override/-/monaco-vscode-monarch-service-override-10.1.0.tgz", - "integrity": "sha512-pGWq4PToZHkG3TXoPYYsci2e3pDifBwxsrAI5df+3/8JfuivrXqS2BTvHuZhuw287Ifa0nfi+tWT3qJOZoJF/g==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-monarch-service-override/-/monaco-vscode-monarch-service-override-10.1.1.tgz", + "integrity": "sha512-4gypH7ly8hkWQZXrWYNXwjDbhMqQyS33OD0rypjYpd2JveUtuoghy2PibQzlusAQJJ1wWZh5lNl7mslYffPl7w==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-python-default-extension": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-python-default-extension/-/monaco-vscode-python-default-extension-10.1.0.tgz", - "integrity": "sha512-sG6tg9992lAZrulAJhId0rE45XeTCa2At4cnVMcR+Y+u961VAcbd85RzT/FXAgnMAsAz+Df2ihcMX8RgZpwpoQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-python-default-extension/-/monaco-vscode-python-default-extension-10.1.1.tgz", + "integrity": "sha512-01NCAWGnKo9nmUhgHqCYkz3a4NJx7F8Mf7MBpUPnZcDJ8rfyHI3AcdHYh3mRDJR94cQV+uvlh3YD5sXsbDcuvg==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-quickaccess-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-quickaccess-service-override/-/monaco-vscode-quickaccess-service-override-10.1.0.tgz", - "integrity": "sha512-KBybophZySFiqLQ6nAnq+tdYDrI3UqeW2nuKJWQv3rswmwKYAhvBOfeomuHRyOfkmtDte4O4DxyccCbLhEfqQw==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-quickaccess-service-override/-/monaco-vscode-quickaccess-service-override-10.1.1.tgz", + "integrity": "sha512-tcTQkD9k/kBZdWHxTkRvN3YYRC53NvzPSZUDOPanGycPsVA6Jsp8iddU+vq9lngJoiNOsDmnOK3KNgdX7oB8Fw==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-rollup-vsix-plugin": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-rollup-vsix-plugin/-/monaco-vscode-rollup-vsix-plugin-10.1.0.tgz", - "integrity": "sha512-RtWtA9Adb1uDi8sPaAI9qD+VAgBmD1vmA+nQojVIqKcptil9I6PEAKsekl05n4dl4NW31C5Ev0h0lhIfaEVohQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-rollup-vsix-plugin/-/monaco-vscode-rollup-vsix-plugin-10.1.1.tgz", + "integrity": "sha512-ZtB1iNZ72y6FBaEA7gDBEEafKNSHzXO8aAjmSH+hawcU5uI+foMusNO3XthZk20yNjt5wCyT2fHcM0fftkRb/w==", "dev": true, "license": "MIT", "dependencies": { @@ -905,163 +905,163 @@ } }, "node_modules/@codingame/monaco-vscode-standalone-css-language-features": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-standalone-css-language-features/-/monaco-vscode-standalone-css-language-features-10.1.0.tgz", - "integrity": "sha512-Yw0iI4gCmCTPeJgU6WL9LAst034iHk/O/D2i29biSfapWUpT0sLCAlN6zQGAvldrFnqWRcgt4ne3R3XxOpAfeA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-standalone-css-language-features/-/monaco-vscode-standalone-css-language-features-10.1.1.tgz", + "integrity": "sha512-kjSxeu8lUFaFU8ThaD7ucZXc7oVd77F/Q4GSs/UlqJVVhTAqwKFkaQ4tfiEXqyoaav1OjSVPYyimbl1AxBiyAw==", "dev": true, "license": "MIT", "dependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@10.1.0" + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-standalone-html-language-features": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-standalone-html-language-features/-/monaco-vscode-standalone-html-language-features-10.1.0.tgz", - "integrity": "sha512-IigC4Q61SPDjnp7zRLLewgLs8qzALQkvx44v01oMApsiUTJe2HB81SGdykyczfL7DSXZws69w+517Sh9GrqQ7w==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-standalone-html-language-features/-/monaco-vscode-standalone-html-language-features-10.1.1.tgz", + "integrity": "sha512-xI+1eg16LVa5fAw00pP6y4FdbbYtd5fFr+7FcyGqUmqcAjPeu7yUy41SiulfAiokhWnbG5hCteoSW+p6UpuyJA==", "dev": true, "license": "MIT", "dependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@10.1.0" + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-standalone-json-language-features": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-standalone-json-language-features/-/monaco-vscode-standalone-json-language-features-10.1.0.tgz", - "integrity": "sha512-jb3fQg99bCVSeZMh3m8h9NvzfOknPKeF+ZAWwEw8NqJb14mcZLqI8hNt52BIeeOCiGfe23ruh9U3c4WA5PLBdA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-standalone-json-language-features/-/monaco-vscode-standalone-json-language-features-10.1.1.tgz", + "integrity": "sha512-S3FrWzxWpCHdf5aLvPdnNdDQO+92Vz9Dh+buWmj7p5RX8uH61sAWjfBFmm49tgAyXbugcYelW6EpVNBLW4sgVA==", "license": "MIT", "dependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@10.1.0" + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-standalone-languages": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-standalone-languages/-/monaco-vscode-standalone-languages-10.1.0.tgz", - "integrity": "sha512-qxf5rLUWb2bvDlSFZjdumEJpPX4ppQiD7qVf0P/bk8ufK6OjI3h6o/TFZ0h6njs68jkOuVjxDSWM/gKdlTuGcA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-standalone-languages/-/monaco-vscode-standalone-languages-10.1.1.tgz", + "integrity": "sha512-5SGSgcKIQ1uRBeekjJnrCPdzHpIL/63E0xvyr7ng5ru1DNm1vXTNNUtm8q0Or8764+h68rGNuEU4pEfvebrIdw==", "license": "MIT", "dependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@10.1.0" + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-standalone-typescript-language-features": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-standalone-typescript-language-features/-/monaco-vscode-standalone-typescript-language-features-10.1.0.tgz", - "integrity": "sha512-7ecfVt9GyN2x1e5fcuwOHSFz1QOrJsTXhKjTxuT9CTC0R0klfIXXs4uJLq+P8lEM6zlI+a8c81ApLICHyt288w==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-standalone-typescript-language-features/-/monaco-vscode-standalone-typescript-language-features-10.1.1.tgz", + "integrity": "sha512-mIi25op+VjLo4ufawg/aVY+jVgHJS2SyV/qAbMz/ohEhuxNnhQhb31hxL6PTVOU8xXA8zsu0iwbnd9hQsmLNPA==", "license": "MIT", "dependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@10.1.0" + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-textmate-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-textmate-service-override/-/monaco-vscode-textmate-service-override-10.1.0.tgz", - "integrity": "sha512-p6XsqoYOInAprHrrrY43FHNfEgdUMC4FtY2IJsiy7ulAjrbZsVOP6KoIG+o5wPhWsXSisCoYW9LE0mfPlUd5mA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-textmate-service-override/-/monaco-vscode-textmate-service-override-10.1.1.tgz", + "integrity": "sha512-r3I5q0m0MABrAzX8XK6s6TVqxU881xcMhcMHpPrjbh5YvXtqmgD1XAQ7rg46lue24I3j12m/3HbW4Zzh21IXNQ==", "license": "MIT", "dependencies": { - "@codingame/monaco-vscode-files-service-override": "10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0", + "@codingame/monaco-vscode-files-service-override": "10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1", "vscode-oniguruma": "1.7.0", "vscode-textmate": "9.1.0" } }, "node_modules/@codingame/monaco-vscode-theme-defaults-default-extension": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-theme-defaults-default-extension/-/monaco-vscode-theme-defaults-default-extension-10.1.0.tgz", - "integrity": "sha512-dBB/Y0gRgsDTz7NT/0K1LE49whqBhTwKRof+dxZHgIKHVb60/2QGrzPxYsChaH0MAZ7K2jtZQMyCk5Lky/t7Wg==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-theme-defaults-default-extension/-/monaco-vscode-theme-defaults-default-extension-10.1.1.tgz", + "integrity": "sha512-Fd9j7/K+0+HD+8ezwFXApoooy9mEOH7WLpY6Stsoko0SMsiyEZw/2SWHuwBjKmIMru/LFAIWoRmPZC9wDbDOXg==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-theme-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-theme-service-override/-/monaco-vscode-theme-service-override-10.1.0.tgz", - "integrity": "sha512-tN7Oe1SF1otVDJ5Y/49ECo4962OufrlMCv8ybGMjY7hSOlMgkhSIKG54bJ/rUWqQ2Yqh+qUx9rXp9sZcLNjMxQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-theme-service-override/-/monaco-vscode-theme-service-override-10.1.1.tgz", + "integrity": "sha512-OktnBAo0vv2T18opfWzP2c3pP1XCIVuzSnddBj4pvChpiUfeyDkj9lOnq/HCNxmdvR0K04EJ4+WrNf2Zj8pAVg==", "license": "MIT", "dependencies": { - "@codingame/monaco-vscode-files-service-override": "10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "@codingame/monaco-vscode-files-service-override": "10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-typescript-basics-default-extension": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-typescript-basics-default-extension/-/monaco-vscode-typescript-basics-default-extension-10.1.0.tgz", - "integrity": "sha512-F7NUBBwlRFQMag95g069WM2nsqrhs3B8jnAseDlcG1qyldTJDXlva0ni57kBV5DARisQ85pWuwYp876JI7rxjQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-typescript-basics-default-extension/-/monaco-vscode-typescript-basics-default-extension-10.1.1.tgz", + "integrity": "sha512-MzYRiKNjrvQ2H32+OOD1q/id8BcEovUyieNw54ZH4RIPwcxE77PFukcCHG/SLGwc6oMh7BsRLFODFFbzNTVH9w==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-typescript-language-features-default-extension": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-typescript-language-features-default-extension/-/monaco-vscode-typescript-language-features-default-extension-10.1.0.tgz", - "integrity": "sha512-klDFzpGQA0Nm19dFdIL0cirj1w3rxV8naqv/U+x9kY0LmMYqCjxzUleEDVr9KHIc1SdYEpp1cUWwEZh7ZTecEQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-typescript-language-features-default-extension/-/monaco-vscode-typescript-language-features-default-extension-10.1.1.tgz", + "integrity": "sha512-rc01QDMo8D10vYQNHm2kxADUdyniOOg1Vir5PaashQ+1FeY0y/9R8JJd3zWtPaycaaKFzvGKWJ0BriNf6hxcaA==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-view-banner-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-view-banner-service-override/-/monaco-vscode-view-banner-service-override-10.1.0.tgz", - "integrity": "sha512-Ga1YXXbG3X6yTDJn9iV9AtxP0derk0Ct2D4rtVTvR7EE8524YEqVaKmwwDp5QozN2dFS6VCb/Dq4lTLhAMfXcQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-view-banner-service-override/-/monaco-vscode-view-banner-service-override-10.1.1.tgz", + "integrity": "sha512-muGu0ZeCtS4HW68HrQSKTySltn/Q2o81tOM9TzXYICwwrpN8fcFIMYv4bSFQ866SRpuu+Bcp4uKF7Pvm2g3wiw==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-view-common-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-view-common-service-override/-/monaco-vscode-view-common-service-override-10.1.0.tgz", - "integrity": "sha512-alAbupwwd+4Z2kuFqcYRLGm8pPK8NFgYMR1KNHmwRcq20xRvxo4BUokE2y0XHrC43aGfqtUBSJrDVAJxRiSFjA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-view-common-service-override/-/monaco-vscode-view-common-service-override-10.1.1.tgz", + "integrity": "sha512-SScdXO4Rq8WG5/joO7PFJT/5BaF1EIecQsEuX/Qt+63Y+GsSP4qMKtoCcZP8QcFFGacVhynvHMaEhCk6Tu4SPA==", "license": "MIT", "dependencies": { - "@codingame/monaco-vscode-bulk-edit-service-override": "10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "@codingame/monaco-vscode-bulk-edit-service-override": "10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-view-status-bar-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-view-status-bar-service-override/-/monaco-vscode-view-status-bar-service-override-10.1.0.tgz", - "integrity": "sha512-/Z/9k70GFnvpFC0vFl5fTJJothi73qs/MtNB2eQuO2axGGXWd0MfqsnvbfeqGFxoDhArJr+eHoUJcyX8JY9vmw==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-view-status-bar-service-override/-/monaco-vscode-view-status-bar-service-override-10.1.1.tgz", + "integrity": "sha512-PB7UeBKhCcg2HM8Yl29P9LUodWuSxI5Yrse8bBEzais7ihSBTI/Ani5mEK8O+dAJngjaFR4Pozde+OdDs3bb+w==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-view-title-bar-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-view-title-bar-service-override/-/monaco-vscode-view-title-bar-service-override-10.1.0.tgz", - "integrity": "sha512-zwxtmgixRlq975A30fRFdMgn8l8id6MNqqle9uJvAeeu6yU4/UZM/7eb4HpaRHNjl++gN8UiDeHrVKWQpOknRA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-view-title-bar-service-override/-/monaco-vscode-view-title-bar-service-override-10.1.1.tgz", + "integrity": "sha512-c4WGj+UnYfQPAAu21vDo0L5b8AA1/NkbzksTeLkv207+SZUFKaEUyWf2siMMFP07OqMVIRYCy2Sf2N9w+6FoGw==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-views-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-views-service-override/-/monaco-vscode-views-service-override-10.1.0.tgz", - "integrity": "sha512-x6MwETkE0QGbm/IFPC6x8RTrjGT0sUTOCIJgAeTxtIg++zrKLxU8FnHRi2OowCso56dqGinVeDNLAwl/vKN76A==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-views-service-override/-/monaco-vscode-views-service-override-10.1.1.tgz", + "integrity": "sha512-/Hb2HMg0dgJW2fCbDCxFaSf/FKiCu/guE2R5pehFVwvdLLsCyzaVL+66VP1TBhYzAtAeXcwKD5EoblkTRL0X4w==", "license": "MIT", "dependencies": { - "@codingame/monaco-vscode-keybindings-service-override": "10.1.0", - "@codingame/monaco-vscode-quickaccess-service-override": "10.1.0", - "@codingame/monaco-vscode-view-common-service-override": "10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "@codingame/monaco-vscode-keybindings-service-override": "10.1.1", + "@codingame/monaco-vscode-quickaccess-service-override": "10.1.1", + "@codingame/monaco-vscode-view-common-service-override": "10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@codingame/monaco-vscode-workbench-service-override": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-workbench-service-override/-/monaco-vscode-workbench-service-override-10.1.0.tgz", - "integrity": "sha512-Wqw2brRplcxkbp1Bda4Ft3R9U0LtG7KZ2v00Ud8g08djERmLDhNlTOgnCf6ABtAc+FaD7JksOJ4I98GsWR2nEA==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-workbench-service-override/-/monaco-vscode-workbench-service-override-10.1.1.tgz", + "integrity": "sha512-iKkaQm1XSWJkq9h4gKCSi+lj9ITRksWMF/GJ1D80mcZAKbSLecH5sCbCzN8ktIzwLCkoFoGCe0ex2ZDEqmd7mg==", "license": "MIT", "dependencies": { - "@codingame/monaco-vscode-keybindings-service-override": "10.1.0", - "@codingame/monaco-vscode-quickaccess-service-override": "10.1.0", - "@codingame/monaco-vscode-view-banner-service-override": "10.1.0", - "@codingame/monaco-vscode-view-common-service-override": "10.1.0", - "@codingame/monaco-vscode-view-status-bar-service-override": "10.1.0", - "@codingame/monaco-vscode-view-title-bar-service-override": "10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "@codingame/monaco-vscode-keybindings-service-override": "10.1.1", + "@codingame/monaco-vscode-quickaccess-service-override": "10.1.1", + "@codingame/monaco-vscode-view-banner-service-override": "10.1.1", + "@codingame/monaco-vscode-view-common-service-override": "10.1.1", + "@codingame/monaco-vscode-view-status-bar-service-override": "10.1.1", + "@codingame/monaco-vscode-view-title-bar-service-override": "10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/@cspotcode/source-map-support": { @@ -2691,9 +2691,9 @@ } }, "node_modules/@types/node": { - "version": "20.16.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.13.tgz", - "integrity": "sha512-GjQ7im10B0labo8ZGXDGROUl9k0BNyDgzfGpb4g/cl+4yYDWVKcozANF4FGr4/p0O/rAkQClM6Wiwkije++1Tg==", + "version": "20.16.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.15.tgz", + "integrity": "sha512-DV58qQz9dBMqVVn+qnKwGa51QzCD4YM/tQM16qLKxdf5tqz5W4QwtrMzjSTbabN1cFTSuyxVYBy+QWHjWW8X/g==", "dev": true, "license": "MIT", "dependencies": { @@ -2722,9 +2722,9 @@ "license": "MIT" }, "node_modules/@types/react": { - "version": "18.3.11", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.11.tgz", - "integrity": "sha512-r6QZ069rFTjrEYgFdOck1gK7FLVsgJE7tTz0pQBczlBNUhBNk0MQH4UbnFSwjpQLMkLzgqvBBa+qGpLje16eTQ==", + "version": "18.3.12", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.12.tgz", + "integrity": "sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==", "dev": true, "license": "MIT", "dependencies": { @@ -2829,17 +2829,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.10.0.tgz", - "integrity": "sha512-phuB3hoP7FFKbRXxjl+DRlQDuJqhpOnm5MmtROXyWi3uS/Xg2ZXqiQfcG2BJHiN4QKyzdOJi3NEn/qTnjUlkmQ==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.11.0.tgz", + "integrity": "sha512-KhGn2LjW1PJT2A/GfDpiyOfS4a8xHQv2myUagTM5+zsormOmBlYsnQ6pobJ8XxJmh6hnHwa2Mbe3fPrDJoDhbA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.10.0", - "@typescript-eslint/type-utils": "8.10.0", - "@typescript-eslint/utils": "8.10.0", - "@typescript-eslint/visitor-keys": "8.10.0", + "@typescript-eslint/scope-manager": "8.11.0", + "@typescript-eslint/type-utils": "8.11.0", + "@typescript-eslint/utils": "8.11.0", + "@typescript-eslint/visitor-keys": "8.11.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -2863,16 +2863,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.10.0.tgz", - "integrity": "sha512-E24l90SxuJhytWJ0pTQydFT46Nk0Z+bsLKo/L8rtQSL93rQ6byd1V/QbDpHUTdLPOMsBCcYXZweADNCfOCmOAg==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.11.0.tgz", + "integrity": "sha512-lmt73NeHdy1Q/2ul295Qy3uninSqi6wQI18XwSpm8w0ZbQXUpjCAWP1Vlv/obudoBiIjJVjlztjQ+d/Md98Yxg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.10.0", - "@typescript-eslint/types": "8.10.0", - "@typescript-eslint/typescript-estree": "8.10.0", - "@typescript-eslint/visitor-keys": "8.10.0", + "@typescript-eslint/scope-manager": "8.11.0", + "@typescript-eslint/types": "8.11.0", + "@typescript-eslint/typescript-estree": "8.11.0", + "@typescript-eslint/visitor-keys": "8.11.0", "debug": "^4.3.4" }, "engines": { @@ -2892,14 +2892,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.10.0.tgz", - "integrity": "sha512-AgCaEjhfql9MDKjMUxWvH7HjLeBqMCBfIaBbzzIcBbQPZE7CPh1m6FF+L75NUMJFMLYhCywJXIDEMa3//1A0dw==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.11.0.tgz", + "integrity": "sha512-Uholz7tWhXmA4r6epo+vaeV7yjdKy5QFCERMjs1kMVsLRKIrSdM6o21W2He9ftp5PP6aWOVpD5zvrvuHZC0bMQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.10.0", - "@typescript-eslint/visitor-keys": "8.10.0" + "@typescript-eslint/types": "8.11.0", + "@typescript-eslint/visitor-keys": "8.11.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2910,14 +2910,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.10.0.tgz", - "integrity": "sha512-PCpUOpyQSpxBn230yIcK+LeCQaXuxrgCm2Zk1S+PTIRJsEfU6nJ0TtwyH8pIwPK/vJoA+7TZtzyAJSGBz+s/dg==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.11.0.tgz", + "integrity": "sha512-ItiMfJS6pQU0NIKAaybBKkuVzo6IdnAhPFZA/2Mba/uBjuPQPet/8+zh5GtLHwmuFRShZx+8lhIs7/QeDHflOg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.10.0", - "@typescript-eslint/utils": "8.10.0", + "@typescript-eslint/typescript-estree": "8.11.0", + "@typescript-eslint/utils": "8.11.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -2935,9 +2935,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.10.0.tgz", - "integrity": "sha512-k/E48uzsfJCRRbGLapdZgrX52csmWJ2rcowwPvOZ8lwPUv3xW6CcFeJAXgx4uJm+Ge4+a4tFOkdYvSpxhRhg1w==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.11.0.tgz", + "integrity": "sha512-tn6sNMHf6EBAYMvmPUaKaVeYvhUsrE6x+bXQTxjQRp360h1giATU0WvgeEys1spbvb5R+VpNOZ+XJmjD8wOUHw==", "dev": true, "license": "MIT", "engines": { @@ -2949,14 +2949,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.10.0.tgz", - "integrity": "sha512-3OE0nlcOHaMvQ8Xu5gAfME3/tWVDpb/HxtpUZ1WeOAksZ/h/gwrBzCklaGzwZT97/lBbbxJ16dMA98JMEngW4w==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.11.0.tgz", + "integrity": "sha512-yHC3s1z1RCHoCz5t06gf7jH24rr3vns08XXhfEqzYpd6Hll3z/3g23JRi0jM8A47UFKNc3u/y5KIMx8Ynbjohg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.10.0", - "@typescript-eslint/visitor-keys": "8.10.0", + "@typescript-eslint/types": "8.11.0", + "@typescript-eslint/visitor-keys": "8.11.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2994,16 +2994,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.10.0.tgz", - "integrity": "sha512-Oq4uZ7JFr9d1ZunE/QKy5egcDRXT/FrS2z/nlxzPua2VHFtmMvFNDvpq1m/hq0ra+T52aUezfcjGRIB7vNJF9w==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.11.0.tgz", + "integrity": "sha512-CYiX6WZcbXNJV7UNB4PLDIBtSdRmRI/nb0FMyqHPTQD1rMjA0foPLaPUV39C/MxkTd/QKSeX+Gb34PPsDVC35g==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.10.0", - "@typescript-eslint/types": "8.10.0", - "@typescript-eslint/typescript-estree": "8.10.0" + "@typescript-eslint/scope-manager": "8.11.0", + "@typescript-eslint/types": "8.11.0", + "@typescript-eslint/typescript-estree": "8.11.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3017,13 +3017,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.10.0.tgz", - "integrity": "sha512-k8nekgqwr7FadWk548Lfph6V3r9OVqjzAIVskE7orMZR23cGJjAOVazsZSJW+ElyjfTM4wx/1g88Mi70DDtG9A==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.11.0.tgz", + "integrity": "sha512-EaewX6lxSjRJnc+99+dqzTeoDZUfyrA52d2/HRrkI830kgovWsmIiTfmr0NZorzqic7ga+1bS60lRBUgR3n/Bw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.10.0", + "@typescript-eslint/types": "8.11.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -3362,69 +3362,6 @@ "node": ">=18.20.0" } }, - "node_modules/@xterm/addon-clipboard": { - "version": "0.2.0-beta.50", - "resolved": "https://registry.npmjs.org/@xterm/addon-clipboard/-/addon-clipboard-0.2.0-beta.50.tgz", - "integrity": "sha512-A0A8+ft0WZ7/4O19Q4PCkmesgmQjyi+mXcEqyaja12DC7bk+uGQBliyFhmEuM3PglXrDzjJ6p1e+ozaWIr7ATw==", - "license": "MIT", - "dependencies": { - "js-base64": "^3.7.5" - }, - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.67" - } - }, - "node_modules/@xterm/addon-image": { - "version": "0.9.0-beta.67", - "resolved": "https://registry.npmjs.org/@xterm/addon-image/-/addon-image-0.9.0-beta.67.tgz", - "integrity": "sha512-Evv25lMod+OkhnZbUx0582BeuBRztylT3davE/YUzzSOH6/LK9AD9FmfKhtziY9AVnWqo3eq3jbDI1fUgiz6+Q==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.67" - } - }, - "node_modules/@xterm/addon-search": { - "version": "0.16.0-beta.67", - "resolved": "https://registry.npmjs.org/@xterm/addon-search/-/addon-search-0.16.0-beta.67.tgz", - "integrity": "sha512-0LtX7CHcvvgJYznN5S+LckVgiYFp9LC+jm6PQgjILSVj6AQ9MkcFbgmURRLLncxfZC4G7kCOQaxjUbhSKWJyxw==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.67" - } - }, - "node_modules/@xterm/addon-serialize": { - "version": "0.14.0-beta.67", - "resolved": "https://registry.npmjs.org/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.67.tgz", - "integrity": "sha512-encwfKHkjrcUrFAAV2ZJ7ycKlsRe1uv5PYHhoIx4ci8HzD8wi9b2UauqBf8qL8cclaUI8Lc4hjzxftgvC6JFOg==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.67" - } - }, - "node_modules/@xterm/addon-unicode11": { - "version": "0.9.0-beta.67", - "resolved": "https://registry.npmjs.org/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.67.tgz", - "integrity": "sha512-8HygYz2urkMxeM4jYoIg/bjtazhWWS910TA2fDqOgGJtRHWtyMCiihoeas3kT4CMUyHhU9YDX+RAY4hDMGgQHA==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.67" - } - }, - "node_modules/@xterm/addon-webgl": { - "version": "0.19.0-beta.67", - "resolved": "https://registry.npmjs.org/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.67.tgz", - "integrity": "sha512-/Lcnp/EihCFw4iNdFRmbNEbzOG3KcMGJMPsVl7zeh/Tn7eDxaXidFPf5o1kCkaijZ7eE3glPAveaV0El88dI5Q==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.67" - } - }, - "node_modules/@xterm/xterm": { - "version": "5.6.0-beta.67", - "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.6.0-beta.67.tgz", - "integrity": "sha512-u4kxUR7zjTY0UsuPA0MzoRPfUa9B2yoYwiK8EK+HCZr7rlA6alPtqPQWNRMsI082tdZY87cgvMNuQ9g2zJY1YQ==", - "license": "MIT" - }, "node_modules/@zip.js/zip.js": { "version": "2.7.52", "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.52.tgz", @@ -7256,12 +7193,6 @@ "@pkgjs/parseargs": "^0.11.0" } }, - "node_modules/js-base64": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.7.tgz", - "integrity": "sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==", - "license": "BSD-3-Clause" - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -7935,12 +7866,12 @@ }, "node_modules/monaco-editor": { "name": "@codingame/monaco-vscode-editor-api", - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-editor-api/-/monaco-vscode-editor-api-10.1.0.tgz", - "integrity": "sha512-1SLUWKuO2LvL5EEaHaEMX1EpKZaMF2G+L3zBMlUbR6xzVkNIpAIRUlYbTWE6ob1bWOfczxBqcgLske3uC82BGQ==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-editor-api/-/monaco-vscode-editor-api-10.1.1.tgz", + "integrity": "sha512-V7z9xEOb6dPV2MHf02CIi+F2Hijbuf33+dBUmpUDw4wM9Z1W47oSP4isFqh7cT3JplagETk2stIQam/U0bnT8g==", "license": "MIT", "dependencies": { - "vscode": "npm:@codingame/monaco-vscode-api@10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, "node_modules/monaco-editor-wrapper": { @@ -8773,9 +8704,9 @@ } }, "node_modules/pyright": { - "version": "1.1.385", - "resolved": "https://registry.npmjs.org/pyright/-/pyright-1.1.385.tgz", - "integrity": "sha512-h56e3i0zoF9semguU+x4LUUEl/UqWiJk4K1teQyrijByTEG9L7Z5Sgs0LNMmSgim9MHwF6zcF5nOmwxgdYeacA==", + "version": "1.1.386", + "resolved": "https://registry.npmjs.org/pyright/-/pyright-1.1.386.tgz", + "integrity": "sha512-mpVeXb12CtDC5EIm6lbrEjD6tD/qIpRSmkYZB16Vl5xWgYvFcgAFKgbCBSiy9D1h4eQBmqAP/9oFatmZ2hjTPw==", "license": "MIT", "bin": { "pyright": "index.js", @@ -10440,9 +10371,9 @@ } }, "node_modules/vite": { - "version": "5.4.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.9.tgz", - "integrity": "sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==", + "version": "5.4.10", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.10.tgz", + "integrity": "sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==", "dev": true, "license": "MIT", "dependencies": { @@ -11033,26 +10964,19 @@ }, "node_modules/vscode": { "name": "@codingame/monaco-vscode-api", - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-10.1.0.tgz", - "integrity": "sha512-Z6KqH78jCsMiuYLlmG0tIOy7wDhOpqE6zSQjK2OucuuBNZr9MyOYGhtmUoGd0JsH8S+KbYNGPqxrsduCq5rZaA==", - "license": "MIT", - "dependencies": { - "@codingame/monaco-vscode-base-service-override": "10.1.0", - "@codingame/monaco-vscode-environment-service-override": "10.1.0", - "@codingame/monaco-vscode-extensions-service-override": "10.1.0", - "@codingame/monaco-vscode-files-service-override": "10.1.0", - "@codingame/monaco-vscode-host-service-override": "10.1.0", - "@codingame/monaco-vscode-layout-service-override": "10.1.0", - "@codingame/monaco-vscode-quickaccess-service-override": "10.1.0", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-10.1.1.tgz", + "integrity": "sha512-X6cm64UByvgohpEYJSgdbC2RU0bYKh/0zZEKGsEBa4P8uKUlVE/FrYqSQe6qKdFom/YxvZCcZgTRNFfPk9vD7w==", + "license": "MIT", + "dependencies": { + "@codingame/monaco-vscode-base-service-override": "10.1.1", + "@codingame/monaco-vscode-environment-service-override": "10.1.1", + "@codingame/monaco-vscode-extensions-service-override": "10.1.1", + "@codingame/monaco-vscode-files-service-override": "10.1.1", + "@codingame/monaco-vscode-host-service-override": "10.1.1", + "@codingame/monaco-vscode-layout-service-override": "10.1.1", + "@codingame/monaco-vscode-quickaccess-service-override": "10.1.1", "@vscode/iconv-lite-umd": "0.7.0", - "@xterm/addon-clipboard": "^0.2.0-beta.47", - "@xterm/addon-image": "^0.9.0-beta.64", - "@xterm/addon-search": "^0.16.0-beta.64", - "@xterm/addon-serialize": "^0.14.0-beta.64", - "@xterm/addon-unicode11": "^0.9.0-beta.64", - "@xterm/addon-webgl": "^0.19.0-beta.64", - "@xterm/xterm": "^5.6.0-beta.64", "jschardet": "3.1.3", "marked": "~14.0.0" } @@ -11646,16 +11570,16 @@ }, "packages/client": { "name": "monaco-languageclient", - "version": "9.0.0-next.4", + "version": "9.0.0-next.5", "license": "MIT", "dependencies": { - "@codingame/monaco-vscode-extensions-service-override": "~10.1.0", - "@codingame/monaco-vscode-languages-service-override": "~10.1.0", - "@codingame/monaco-vscode-localization-service-override": "~10.1.0", - "@codingame/monaco-vscode-log-service-override": "~10.1.0", - "@codingame/monaco-vscode-model-service-override": "~10.1.0", - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0", + "@codingame/monaco-vscode-extensions-service-override": "~10.1.1", + "@codingame/monaco-vscode-languages-service-override": "~10.1.1", + "@codingame/monaco-vscode-localization-service-override": "~10.1.1", + "@codingame/monaco-vscode-log-service-override": "~10.1.1", + "@codingame/monaco-vscode-model-service-override": "~10.1.1", + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1", "vscode-languageclient": "~9.0.1" }, "engines": { @@ -11663,8 +11587,8 @@ "npm": ">=9.0.0" }, "peerDependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0" + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1" }, "peerDependenciesMeta": { "monaco-editor": { @@ -11677,38 +11601,38 @@ }, "packages/examples": { "name": "monaco-languageclient-examples", - "version": "2024.10.3", - "license": "MIT", - "dependencies": { - "@codingame/monaco-vscode-configuration-service-override": "~10.1.0", - "@codingame/monaco-vscode-files-service-override": "~10.1.0", - "@codingame/monaco-vscode-groovy-default-extension": "~10.1.0", - "@codingame/monaco-vscode-java-default-extension": "~10.1.0", - "@codingame/monaco-vscode-javascript-default-extension": "~10.1.0", - "@codingame/monaco-vscode-json-default-extension": "~10.1.0", - "@codingame/monaco-vscode-keybindings-service-override": "~10.1.0", - "@codingame/monaco-vscode-lifecycle-service-override": "~10.1.0", - "@codingame/monaco-vscode-localization-service-override": "~10.1.0", - "@codingame/monaco-vscode-python-default-extension": "~10.1.0", - "@codingame/monaco-vscode-standalone-json-language-features": "~10.1.0", - "@codingame/monaco-vscode-standalone-languages": "~10.1.0", - "@codingame/monaco-vscode-standalone-typescript-language-features": "~10.1.0", - "@codingame/monaco-vscode-textmate-service-override": "~10.1.0", - "@codingame/monaco-vscode-theme-defaults-default-extension": "~10.1.0", - "@codingame/monaco-vscode-theme-service-override": "~10.1.0", - "@codingame/monaco-vscode-typescript-basics-default-extension": "~10.1.0", - "@codingame/monaco-vscode-typescript-language-features-default-extension": "~10.1.0", - "@typefox/monaco-editor-react": "~6.0.0-next.4", + "version": "2024.10.4", + "license": "MIT", + "dependencies": { + "@codingame/monaco-vscode-configuration-service-override": "~10.1.1", + "@codingame/monaco-vscode-files-service-override": "~10.1.1", + "@codingame/monaco-vscode-groovy-default-extension": "~10.1.1", + "@codingame/monaco-vscode-java-default-extension": "~10.1.1", + "@codingame/monaco-vscode-javascript-default-extension": "~10.1.1", + "@codingame/monaco-vscode-json-default-extension": "~10.1.1", + "@codingame/monaco-vscode-keybindings-service-override": "~10.1.1", + "@codingame/monaco-vscode-lifecycle-service-override": "~10.1.1", + "@codingame/monaco-vscode-localization-service-override": "~10.1.1", + "@codingame/monaco-vscode-python-default-extension": "~10.1.1", + "@codingame/monaco-vscode-standalone-json-language-features": "~10.1.1", + "@codingame/monaco-vscode-standalone-languages": "~10.1.1", + "@codingame/monaco-vscode-standalone-typescript-language-features": "~10.1.1", + "@codingame/monaco-vscode-textmate-service-override": "~10.1.1", + "@codingame/monaco-vscode-theme-defaults-default-extension": "~10.1.1", + "@codingame/monaco-vscode-theme-service-override": "~10.1.1", + "@codingame/monaco-vscode-typescript-basics-default-extension": "~10.1.1", + "@codingame/monaco-vscode-typescript-language-features-default-extension": "~10.1.1", + "@typefox/monaco-editor-react": "~6.0.0-next.5", "express": "~4.21.1", "langium": "~3.2.0", - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "monaco-editor-wrapper": "~6.0.0-next.4", - "monaco-languageclient": "~9.0.0-next.4", - "pyright": "~1.1.385", + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "monaco-editor-wrapper": "~6.0.0-next.5", + "monaco-languageclient": "~9.0.0-next.5", + "pyright": "~1.1.386", "react": "~18.3.1", "react-dom": "~18.3.1", "request-light": "~0.8.0", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1", "vscode-json-languageservice": "~5.4.1", "vscode-languageclient": "~9.0.1", "vscode-languageserver": "~9.0.1", @@ -11737,48 +11661,48 @@ }, "packages/wrapper": { "name": "monaco-editor-wrapper", - "version": "6.0.0-next.4", - "license": "MIT", - "dependencies": { - "@codingame/monaco-vscode-configuration-service-override": "~10.1.0", - "@codingame/monaco-vscode-editor-service-override": "~10.1.0", - "@codingame/monaco-vscode-language-pack-cs": "~10.1.0", - "@codingame/monaco-vscode-language-pack-de": "~10.1.0", - "@codingame/monaco-vscode-language-pack-es": "~10.1.0", - "@codingame/monaco-vscode-language-pack-fr": "~10.1.0", - "@codingame/monaco-vscode-language-pack-it": "~10.1.0", - "@codingame/monaco-vscode-language-pack-ja": "~10.1.0", - "@codingame/monaco-vscode-language-pack-ko": "~10.1.0", - "@codingame/monaco-vscode-language-pack-pl": "~10.1.0", - "@codingame/monaco-vscode-language-pack-pt-br": "~10.1.0", - "@codingame/monaco-vscode-language-pack-qps-ploc": "~10.1.0", - "@codingame/monaco-vscode-language-pack-ru": "~10.1.0", - "@codingame/monaco-vscode-language-pack-tr": "~10.1.0", - "@codingame/monaco-vscode-language-pack-zh-hans": "~10.1.0", - "@codingame/monaco-vscode-language-pack-zh-hant": "~10.1.0", - "@codingame/monaco-vscode-monarch-service-override": "~10.1.0", - "@codingame/monaco-vscode-textmate-service-override": "~10.1.0", - "@codingame/monaco-vscode-theme-defaults-default-extension": "~10.1.0", - "@codingame/monaco-vscode-theme-service-override": "~10.1.0", - "@codingame/monaco-vscode-views-service-override": "~10.1.0", - "@codingame/monaco-vscode-workbench-service-override": "~10.1.0", - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0", + "version": "6.0.0-next.5", + "license": "MIT", + "dependencies": { + "@codingame/monaco-vscode-configuration-service-override": "~10.1.1", + "@codingame/monaco-vscode-editor-service-override": "~10.1.1", + "@codingame/monaco-vscode-language-pack-cs": "~10.1.1", + "@codingame/monaco-vscode-language-pack-de": "~10.1.1", + "@codingame/monaco-vscode-language-pack-es": "~10.1.1", + "@codingame/monaco-vscode-language-pack-fr": "~10.1.1", + "@codingame/monaco-vscode-language-pack-it": "~10.1.1", + "@codingame/monaco-vscode-language-pack-ja": "~10.1.1", + "@codingame/monaco-vscode-language-pack-ko": "~10.1.1", + "@codingame/monaco-vscode-language-pack-pl": "~10.1.1", + "@codingame/monaco-vscode-language-pack-pt-br": "~10.1.1", + "@codingame/monaco-vscode-language-pack-qps-ploc": "~10.1.1", + "@codingame/monaco-vscode-language-pack-ru": "~10.1.1", + "@codingame/monaco-vscode-language-pack-tr": "~10.1.1", + "@codingame/monaco-vscode-language-pack-zh-hans": "~10.1.1", + "@codingame/monaco-vscode-language-pack-zh-hant": "~10.1.1", + "@codingame/monaco-vscode-monarch-service-override": "~10.1.1", + "@codingame/monaco-vscode-textmate-service-override": "~10.1.1", + "@codingame/monaco-vscode-theme-defaults-default-extension": "~10.1.1", + "@codingame/monaco-vscode-theme-service-override": "~10.1.1", + "@codingame/monaco-vscode-views-service-override": "~10.1.1", + "@codingame/monaco-vscode-workbench-service-override": "~10.1.1", + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1", "vscode-languageclient": "~9.0.1", "vscode-languageserver-protocol": "~3.17.5", "vscode-ws-jsonrpc": "~3.3.2" }, "devDependencies": { - "@codingame/monaco-vscode-standalone-css-language-features": "~10.1.0", - "@codingame/monaco-vscode-standalone-html-language-features": "~10.1.0", - "@codingame/monaco-vscode-standalone-json-language-features": "~10.1.0", - "@codingame/monaco-vscode-standalone-languages": "~10.1.0", - "@codingame/monaco-vscode-standalone-typescript-language-features": "~10.1.0" + "@codingame/monaco-vscode-standalone-css-language-features": "~10.1.1", + "@codingame/monaco-vscode-standalone-html-language-features": "~10.1.1", + "@codingame/monaco-vscode-standalone-json-language-features": "~10.1.1", + "@codingame/monaco-vscode-standalone-languages": "~10.1.1", + "@codingame/monaco-vscode-standalone-typescript-language-features": "~10.1.1" }, "peerDependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "monaco-languageclient": "~9.0.0-next.4", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0" + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "monaco-languageclient": "~9.0.0-next.5", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1" }, "peerDependenciesMeta": { "monaco-editor": { @@ -11794,21 +11718,21 @@ }, "packages/wrapper-react": { "name": "@typefox/monaco-editor-react", - "version": "6.0.0-next.4", + "version": "6.0.0-next.5", "license": "MIT", "dependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "monaco-editor-wrapper": "~6.0.0-next.4", - "monaco-languageclient": "~9.0.0-next.4", + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "monaco-editor-wrapper": "~6.0.0-next.5", + "monaco-languageclient": "~9.0.0-next.5", "react": "~18.3.1", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1" }, "peerDependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "monaco-editor-wrapper": "~6.0.0-next.4", - "monaco-languageclient": "~9.0.0-next.4", + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "monaco-editor-wrapper": "~6.0.0-next.5", + "monaco-languageclient": "~9.0.0-next.5", "react": "~18.3.1", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1" }, "peerDependenciesMeta": { "monaco-editor": { diff --git a/package.json b/package.json index ef3d40b46..717918053 100644 --- a/package.json +++ b/package.json @@ -3,17 +3,17 @@ "type": "module", "devDependencies": { "@codingame/esbuild-import-meta-url-plugin": "~1.0.2", - "@codingame/monaco-vscode-rollup-vsix-plugin": "~10.1.0", + "@codingame/monaco-vscode-rollup-vsix-plugin": "~10.1.1", "@eslint/js": "~9.13.0", "@eslint/eslintrc": "~3.1.0", "@stylistic/eslint-plugin": "~2.9.0", "@testing-library/react": "~16.0.1", - "@types/node": "~20.16.13", - "@types/react": "~18.3.10", + "@types/node": "~20.16.15", + "@types/react": "~18.3.12", "@types/react-dom": "~18.3.1", "@types/vscode": "~1.94.0", - "@typescript-eslint/eslint-plugin": "~8.10.0", - "@typescript-eslint/parser": "~8.10.0", + "@typescript-eslint/eslint-plugin": "~8.11.0", + "@typescript-eslint/parser": "~8.11.0", "@vitejs/plugin-react": "~4.3.3", "@vitest/browser": "~2.1.3", "editorconfig": "~2.0.0", @@ -27,7 +27,7 @@ "minimatch": "~10.0.1", "playwright": "~1.48.1", "typescript": "~5.6.3", - "vite": "~5.4.9", + "vite": "~5.4.10", "vite-node": "~2.1.3", "vitest": "~2.1.3", "webdriverio": "~9.2.1" diff --git a/packages/client/CHANGELOG.md b/packages/client/CHANGELOG.md index d999b2f34..0cb5a757c 100644 --- a/packages/client/CHANGELOG.md +++ b/packages/client/CHANGELOG.md @@ -2,12 +2,13 @@ All notable changes to this npm module are documented in this file. -## [9.0.0-next.4] - 2024-10-21 +## [9.0.0-next.5] - 2024-10-23 +- Added `createUrl` to `monaco-languageclient/tools`. Moved it here from `monaco-editor-wrapper`. - Updated to eslint 9 - Support all arguments for monaco-vscode-api `initialize` [#756](https://github.com/TypeFox/monaco-languageclient/pull/756) - Update to monaco-vscode-api 9.0.x [#749](https://github.com/TypeFox/monaco-languageclient/pull/749) - - Updated all `@codingame/monaco-vscode` packages to `10.1.0`. + - Updated all `@codingame/monaco-vscode` packages to `10.1.1`. - Enhancements to logging - monaco-languageclient config improvement, wrapper+languageclientwrapper improvements [#741](https://github.com/TypeFox/monaco-languageclient/pull/741) - Pass MessageTransports directly diff --git a/packages/client/package.json b/packages/client/package.json index 38e164377..d6d2b1507 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "monaco-languageclient", - "version": "9.0.0-next.4", + "version": "9.0.0-next.5", "description": "Monaco Language client implementation", "author": { "name": "TypeFox GmbH", @@ -62,18 +62,18 @@ "LICENSE" ], "dependencies": { - "@codingame/monaco-vscode-extensions-service-override": "~10.1.0", - "@codingame/monaco-vscode-languages-service-override": "~10.1.0", - "@codingame/monaco-vscode-localization-service-override": "~10.1.0", - "@codingame/monaco-vscode-log-service-override": "~10.1.0", - "@codingame/monaco-vscode-model-service-override": "~10.1.0", - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0", + "@codingame/monaco-vscode-extensions-service-override": "~10.1.1", + "@codingame/monaco-vscode-languages-service-override": "~10.1.1", + "@codingame/monaco-vscode-localization-service-override": "~10.1.1", + "@codingame/monaco-vscode-log-service-override": "~10.1.1", + "@codingame/monaco-vscode-model-service-override": "~10.1.1", + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1", "vscode-languageclient": "~9.0.1" }, "peerDependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0" + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1" }, "peerDependenciesMeta": { "monaco-editor": { diff --git a/packages/client/src/tools/index.ts b/packages/client/src/tools/index.ts index afc805174..e7fde78b9 100644 --- a/packages/client/src/tools/index.ts +++ b/packages/client/src/tools/index.ts @@ -4,3 +4,4 @@ * ------------------------------------------------------------------------------------------ */ export * from './logging.js'; +export * from './utils.js'; diff --git a/packages/wrapper/src/utils.ts b/packages/client/src/tools/utils.ts similarity index 70% rename from packages/wrapper/src/utils.ts rename to packages/client/src/tools/utils.ts index 860eb7505..de50d1897 100644 --- a/packages/wrapper/src/utils.ts +++ b/packages/client/src/tools/utils.ts @@ -3,9 +3,7 @@ * Licensed under the MIT License. See LICENSE in the package root for license information. * ------------------------------------------------------------------------------------------ */ -import * as vscode from 'vscode'; import { WebSocketUrlParams, WebSocketUrlString } from 'monaco-languageclient'; -import { CodePlusFileExt, CodePlusUri } from './editorAppBase.js'; export const createUrl = (config: WebSocketUrlParams | WebSocketUrlString) => { let buildUrl = ''; @@ -39,15 +37,3 @@ export const createUrl = (config: WebSocketUrlParams | WebSocketUrlString) => { } return buildUrl; }; - -export const verifyUrlOrCreateDataUrl = (input: string | URL) => { - return (input instanceof URL) ? input.href : new URL(`data:text/plain;base64,${btoa(input)}`).href; -}; - -export const getEditorUri = (id: string, original: boolean, code: CodePlusUri | CodePlusFileExt, basePath?: string) => { - if (Object.hasOwn(code, 'uri')) { - return vscode.Uri.parse((code as CodePlusUri).uri); - } else { - return vscode.Uri.parse(`${basePath ?? '/workspace'}/model${original ? 'Original' : ''}${id}.${(code as CodePlusFileExt).fileExt}`); - } -}; diff --git a/packages/client/test/tools/utils.test.ts b/packages/client/test/tools/utils.test.ts new file mode 100644 index 000000000..265574a84 --- /dev/null +++ b/packages/client/test/tools/utils.test.ts @@ -0,0 +1,130 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) 2024 TypeFox and others. + * Licensed under the MIT License. See LICENSE in the package root for license information. + * ------------------------------------------------------------------------------------------ */ + +import { describe, expect, test } from 'vitest'; +import { WebSocketConfigOptionsParams, WebSocketConfigOptionsUrl } from 'monaco-languageclient'; +import { createUrl } from 'monaco-languageclient/tools'; + +describe('createUrl', () => { + + test('test createUrl: ws', () => { + const url = createUrl({ + secured: false, + host: 'localhost', + port: 30000, + path: 'sampleServer' + } as WebSocketConfigOptionsParams); + + expect(url).toBe('ws://localhost:30000/sampleServer'); + }); + + test('test createUrl: wss', () => { + const url = createUrl({ + secured: true, + host: 'localhost', + port: 30000, + path: 'sampleServer' + } as WebSocketConfigOptionsParams); + + expect(url).toBe('wss://localhost:30000/sampleServer'); + }); + + test('test createUrl: wss, no port, with path', () => { + const url = createUrl({ + secured: true, + host: 'localhost', + path: 'sampleServer' + } as WebSocketConfigOptionsParams); + + expect(url).toBe('wss://localhost/sampleServer'); + }); + + test('test createUrl: wss, with port, no path', () => { + const url = createUrl({ + secured: true, + host: 'localhost', + port: 30000 + } as WebSocketConfigOptionsParams); + + expect(url).toBe('wss://localhost:30000'); + }); + + test('test createUrl: wss, no port, no path', () => { + const url = createUrl({ + secured: true, + host: 'localhost' + } as WebSocketConfigOptionsParams); + + expect(url).toBe('wss://localhost'); + }); + + test('test createUrl: ws, normalize port 80', () => { + const url = createUrl({ + secured: false, + host: 'localhost', + port: 80 + } as WebSocketConfigOptionsParams); + + expect(url).toBe('ws://localhost'); + }); + + test('test createUrl: ws, normalize port 80, with path', () => { + const url = createUrl({ + secured: false, + host: 'localhost', + port: 80, + path: 'sampleServer' + } as WebSocketConfigOptionsParams); + + expect(url).toBe('ws://localhost/sampleServer'); + }); + + test('test createUrl: optionsUrl: ws', () => { + const url = createUrl({ + url: 'ws://localhost:30000/sampleServer' + } as WebSocketConfigOptionsUrl); + + expect(url).toBe('ws://localhost:30000/sampleServer'); + }); + + test('test createUrl: optionsUrl: wss', () => { + const url = createUrl({ + url: 'wss://localhost:30000/sampleServer' + } as WebSocketConfigOptionsUrl); + + expect(url).toBe('wss://localhost:30000/sampleServer'); + }); + + test('test createUrl: optionsUrl, with port, no path', () => { + const url = createUrl({ + url: 'wss://localhost:30000' + } as WebSocketConfigOptionsUrl); + + expect(url).toBe('wss://localhost:30000'); + }); + + test('test createUrl: optionsUrl, no port, with path', () => { + const url = createUrl({ + url: 'ws://localhost/sampleServer' + } as WebSocketConfigOptionsUrl); + + expect(url).toBe('ws://localhost/sampleServer'); + }); + + test('test createUrl: optionsUrl, no port, no path', () => { + const url = createUrl({ + url: 'wss://www.testme.com' + } as WebSocketConfigOptionsUrl); + + expect(url).toBe('wss://www.testme.com'); + }); + + test('test createUrl: ws, not proper url', () => { + expect(() => createUrl({ + url: 'http://www.testme.com:30000/sampleServer' + } as WebSocketConfigOptionsUrl)).toThrowError('This is not a proper websocket url: http://www.testme.com:30000/sampleServer'); + }); + +}); diff --git a/packages/examples/CHANGELOG.md b/packages/examples/CHANGELOG.md index 203a16166..d60e9096d 100644 --- a/packages/examples/CHANGELOG.md +++ b/packages/examples/CHANGELOG.md @@ -2,10 +2,15 @@ All notable changes to this npm module are documented in this file. +## [2024.10.4] - 2024-10-23 + +- Updated to `monaco-languageclient@9.0.0-next.5`, `monaco-editor-wrapper@6.0.0-next.5` and `@typefox/monaco-editor-react@6.0.0-next.5`. +Updated all `@codingame/monaco-vscode` packages to `10.1.1`. + ## [2024.10.3] - 2024-10-21 - Updated to `monaco-languageclient@9.0.0-next.4`, `monaco-editor-wrapper@6.0.0-next.4` and `@typefox/monaco-editor-react@6.0.0-next.4`. -Updated all `@codingame/monaco-vscode` packages to `10.1.0`. +Updated all `@codingame/monaco-vscode` packages to `10.1.`. - Updated to eslint 9 ## [2024.10.2] - 20241-10-11 @@ -14,7 +19,7 @@ Updated all `@codingame/monaco-vscode` packages to `10.1.0`. ## [2024.10.1] - 20241-10-10 -- Updated to `monaco-languageclient@9.0.0-next.2`, `monaco-editor-wrapper@6.0.0-next.2` and `@typefox/monaco-editor-react@6.0.0-next.2`. Updated all `@codingame/monaco-vscode` packages to `10.1.0`. +- Updated to `monaco-languageclient@9.0.0-next.2`, `monaco-editor-wrapper@6.0.0-next.2` and `@typefox/monaco-editor-react@6.0.0-next.2`. Updated all `@codingame/monaco-vscode` packages to `10.0.0`. - Aligend example config. `htmlContainer` is now a required property of `editorAppConfig` - Fixed problems with Statemachine example (two editor and react version) - Json example exports a function for the configuration diff --git a/packages/examples/package.json b/packages/examples/package.json index 1121fc0f2..e7e29026d 100644 --- a/packages/examples/package.json +++ b/packages/examples/package.json @@ -1,6 +1,6 @@ { "name": "monaco-languageclient-examples", - "version": "2024.10.3", + "version": "2024.10.4", "description": "Monaco Language client examples", "author": { "name": "TypeFox GmbH", @@ -54,35 +54,35 @@ } }, "dependencies": { - "@codingame/monaco-vscode-configuration-service-override": "~10.1.0", - "@codingame/monaco-vscode-files-service-override": "~10.1.0", - "@codingame/monaco-vscode-groovy-default-extension": "~10.1.0", - "@codingame/monaco-vscode-keybindings-service-override": "~10.1.0", - "@codingame/monaco-vscode-lifecycle-service-override": "~10.1.0", - "@codingame/monaco-vscode-localization-service-override": "~10.1.0", - "@codingame/monaco-vscode-java-default-extension": "~10.1.0", - "@codingame/monaco-vscode-javascript-default-extension": "~10.1.0", - "@codingame/monaco-vscode-json-default-extension": "~10.1.0", - "@codingame/monaco-vscode-python-default-extension": "~10.1.0", - "@codingame/monaco-vscode-standalone-languages": "~10.1.0", - "@codingame/monaco-vscode-standalone-typescript-language-features": "~10.1.0", - "@codingame/monaco-vscode-standalone-json-language-features": "~10.1.0", - "@codingame/monaco-vscode-textmate-service-override": "~10.1.0", - "@codingame/monaco-vscode-theme-defaults-default-extension": "~10.1.0", - "@codingame/monaco-vscode-theme-service-override": "~10.1.0", - "@codingame/monaco-vscode-typescript-basics-default-extension": "~10.1.0", - "@codingame/monaco-vscode-typescript-language-features-default-extension": "~10.1.0", - "@typefox/monaco-editor-react": "~6.0.0-next.4", + "@codingame/monaco-vscode-configuration-service-override": "~10.1.1", + "@codingame/monaco-vscode-files-service-override": "~10.1.1", + "@codingame/monaco-vscode-groovy-default-extension": "~10.1.1", + "@codingame/monaco-vscode-keybindings-service-override": "~10.1.1", + "@codingame/monaco-vscode-lifecycle-service-override": "~10.1.1", + "@codingame/monaco-vscode-localization-service-override": "~10.1.1", + "@codingame/monaco-vscode-java-default-extension": "~10.1.1", + "@codingame/monaco-vscode-javascript-default-extension": "~10.1.1", + "@codingame/monaco-vscode-json-default-extension": "~10.1.1", + "@codingame/monaco-vscode-python-default-extension": "~10.1.1", + "@codingame/monaco-vscode-standalone-languages": "~10.1.1", + "@codingame/monaco-vscode-standalone-typescript-language-features": "~10.1.1", + "@codingame/monaco-vscode-standalone-json-language-features": "~10.1.1", + "@codingame/monaco-vscode-textmate-service-override": "~10.1.1", + "@codingame/monaco-vscode-theme-defaults-default-extension": "~10.1.1", + "@codingame/monaco-vscode-theme-service-override": "~10.1.1", + "@codingame/monaco-vscode-typescript-basics-default-extension": "~10.1.1", + "@codingame/monaco-vscode-typescript-language-features-default-extension": "~10.1.1", + "@typefox/monaco-editor-react": "~6.0.0-next.5", "express": "~4.21.1", "langium": "~3.2.0", - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "monaco-editor-wrapper": "~6.0.0-next.4", - "monaco-languageclient": "~9.0.0-next.4", - "pyright": "~1.1.385", + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "monaco-editor-wrapper": "~6.0.0-next.5", + "monaco-languageclient": "~9.0.0-next.5", + "pyright": "~1.1.386", "react": "~18.3.1", "react-dom": "~18.3.1", "request-light": "~0.8.0", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1", "vscode-json-languageservice": "~5.4.1", "vscode-languageclient": "~9.0.1", "vscode-languageserver": "~9.0.1", diff --git a/packages/examples/src/python/client/config.ts b/packages/examples/src/python/client/config.ts index 300ff323e..29c253e02 100644 --- a/packages/examples/src/python/client/config.ts +++ b/packages/examples/src/python/client/config.ts @@ -8,9 +8,10 @@ import getEditorServiceOverride from '@codingame/monaco-vscode-editor-service-ov import getKeybindingsServiceOverride from '@codingame/monaco-vscode-keybindings-service-override'; import '@codingame/monaco-vscode-python-default-extension'; import { LogLevel } from 'vscode/services'; -import { createUrl, WrapperConfig } from 'monaco-editor-wrapper'; -import { useOpenEditorStub } from 'monaco-editor-wrapper/vscode/services'; import { MonacoLanguageClient } from 'monaco-languageclient'; +import { createUrl } from 'monaco-languageclient/tools'; +import { WrapperConfig } from 'monaco-editor-wrapper'; +import { useOpenEditorStub } from 'monaco-editor-wrapper/vscode/services'; import { toSocket, WebSocketMessageReader, WebSocketMessageWriter } from 'vscode-ws-jsonrpc'; import { configureMonacoWorkers } from '../../common/client/utils.js'; diff --git a/packages/wrapper-react/CHANGELOG.md b/packages/wrapper-react/CHANGELOG.md index f4de65a87..34ee9ebae 100644 --- a/packages/wrapper-react/CHANGELOG.md +++ b/packages/wrapper-react/CHANGELOG.md @@ -2,14 +2,15 @@ All notable changes to npm module [@typefox/monaco-editor-react](https://www.npmjs.com/package/@typefox/monaco-editor-react) are documented in this file. -## [6.0.0-next.4] - 2024-10-21 +## [6.0.0-next.5] - 2024-10-23 +- Use `didModelContentChange` from `monaco-editor-wrapper` for model content verifications. - Updated to eslint 9 - Clean-up and allow registering a registerModelUpdate callback. This is used to properly handle `onTextChanged` - Support all arguments for monaco-vscode-api `initialize` [#756](https://github.com/TypeFox/monaco-languageclient/pull/756) - On startup the current containerRef is passed to the interal editor app/monaco-editor - Update to monaco-vscode-api 9.0.x [#749](https://github.com/TypeFox/monaco-languageclient/pull/749) - - Updated to `monaco-editor-wrapper@9.0.0-next.4` and `monaco-languageclient@6.0.0-next.4`. Updated all `@codingame/monaco-vscode` packages to `10.1.0`. + - Updated to `monaco-editor-wrapper@9.0.0-next.5` and `monaco-languageclient@6.0.0-next.5`. Updated all `@codingame/monaco-vscode` packages to `10.1.1`. - Enhancements to logging - monaco-languageclient config improvement, wrapper+languageclientwrapper improvements [#741](https://github.com/TypeFox/monaco-languageclient/pull/741) - Turned react component from class to function [#739](https://github.com/TypeFox/monaco-languageclient/pull/739) diff --git a/packages/wrapper-react/package.json b/packages/wrapper-react/package.json index ece1a4c42..04415447e 100644 --- a/packages/wrapper-react/package.json +++ b/packages/wrapper-react/package.json @@ -1,6 +1,6 @@ { "name": "@typefox/monaco-editor-react", - "version": "6.0.0-next.4", + "version": "6.0.0-next.5", "license": "MIT", "description": "React component for Monaco-Editor and Monaco Languageclient", "keywords": [ @@ -42,18 +42,18 @@ "npm": "10.8.3" }, "dependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "monaco-editor-wrapper": "~6.0.0-next.4", - "monaco-languageclient": "~9.0.0-next.4", + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "monaco-editor-wrapper": "~6.0.0-next.5", + "monaco-languageclient": "~9.0.0-next.5", "react": "~18.3.1", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1" }, "peerDependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "monaco-editor-wrapper": "~6.0.0-next.4", - "monaco-languageclient": "~9.0.0-next.4", + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "monaco-editor-wrapper": "~6.0.0-next.5", + "monaco-languageclient": "~9.0.0-next.5", "react": "~18.3.1", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0" + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1" }, "peerDependenciesMeta": { "monaco-editor": { diff --git a/packages/wrapper-react/src/index.tsx b/packages/wrapper-react/src/index.tsx index 75454752b..f26f4f622 100644 --- a/packages/wrapper-react/src/index.tsx +++ b/packages/wrapper-react/src/index.tsx @@ -5,7 +5,7 @@ import * as monaco from 'monaco-editor'; import React, { CSSProperties, useCallback, useEffect, useRef, useState } from 'react'; -import { MonacoEditorLanguageClientWrapper, TextChanges, TextModels, WrapperConfig } from 'monaco-editor-wrapper'; +import { didModelContentChange, MonacoEditorLanguageClientWrapper, TextChanges, TextModels, WrapperConfig } from 'monaco-editor-wrapper'; export type MonacoEditorProps = { style?: CSSProperties; @@ -79,35 +79,22 @@ export const MonacoEditorReactComp: React.FC = (props) => { wrapperRef.current.registerModelUpdate((textModels: TextModels) => { if (textModels.text || textModels.textOriginal) { - const verifyModelContent = () => { - const text = textModels.text?.getValue() ?? ''; - const textOriginal = textModels.textOriginal?.getValue() ?? ''; - const codeResources = wrapperConfig.editorAppConfig.codeResources; - const dirty = text !== codeResources?.main?.text; - const dirtyOriginal = textOriginal !== codeResources?.original?.text; - onTextChanged?.({ - text, - textOriginal, - isDirty: dirty || dirtyOriginal - }); - }; - const newSubscriptions: monaco.IDisposable[] = []; if (textModels.text) { newSubscriptions.push(textModels.text.onDidChangeContent(() => { - verifyModelContent(); + didModelContentChange(textModels, wrapperConfig.editorAppConfig.codeResources, onTextChanged); })); } if (textModels.textOriginal) { newSubscriptions.push(textModels.textOriginal.onDidChangeContent(() => { - verifyModelContent(); + didModelContentChange(textModels, wrapperConfig.editorAppConfig.codeResources, onTextChanged); })); } setOnTextChangedSubscriptions(newSubscriptions); // do it initially - verifyModelContent(); + didModelContentChange(textModels, wrapperConfig.editorAppConfig.codeResources, onTextChanged); } }); diff --git a/packages/wrapper/CHANGELOG.md b/packages/wrapper/CHANGELOG.md index ec1f3382f..c2a7696da 100644 --- a/packages/wrapper/CHANGELOG.md +++ b/packages/wrapper/CHANGELOG.md @@ -2,14 +2,16 @@ All notable changes to npm module [monaco-editor-wrapper](https://www.npmjs.com/package/monaco-editor-wrapper) are documented in this file. -## [6.0.0-next.4] - 2024-10-21 +## [6.0.0-next.5] - 2024-10-23 +- Moved `createUrl` to `monaco-languageclient/tools`, moved editor app specific utils to editorAppbase and create function `didModelContentChange`. +- Added - Updated to eslint 9 - Clean-up and allow registering a registerModelUpdate callback - Support all arguments for monaco-vscode-api `initialize` [#756](https://github.com/TypeFox/monaco-languageclient/pull/756) - This also allows to configure editor-, view- or workspace-service. This is a preparation for further enhancements. - Update to monaco-vscode-api 9.0.x [#749](https://github.com/TypeFox/monaco-languageclient/pull/749) - - Updated to `monaco-languageclient@9.0.0-next.4`. Updated all `@codingame/monaco-vscode` packages to `10.1.0`. + - Updated to `monaco-languageclient@9.0.0-next.5`. Updated all `@codingame/monaco-vscode` packages to `10.1.1`. - Enhancements to logging, worker factory and start order. The worker factory only accepts direct worker loading instructions from now on - monaco-languageclient config improvement, wrapper+languageclientwrapper improvements [#741](https://github.com/TypeFox/monaco-languageclient/pull/741) - Allows to configure more than one language client diff --git a/packages/wrapper/package.json b/packages/wrapper/package.json index 2a661a222..675c10492 100644 --- a/packages/wrapper/package.json +++ b/packages/wrapper/package.json @@ -1,6 +1,6 @@ { "name": "monaco-editor-wrapper", - "version": "6.0.0-next.4", + "version": "6.0.0-next.5", "license": "MIT", "description": "Wrapper for monaco-vscode-editor-api and monaco-languageclient", "keywords": [ @@ -85,45 +85,45 @@ "npm": "10.8.3" }, "dependencies": { - "@codingame/monaco-vscode-configuration-service-override": "~10.1.0", - "@codingame/monaco-vscode-editor-service-override": "~10.1.0", - "@codingame/monaco-vscode-language-pack-cs": "~10.1.0", - "@codingame/monaco-vscode-language-pack-de": "~10.1.0", - "@codingame/monaco-vscode-language-pack-es": "~10.1.0", - "@codingame/monaco-vscode-language-pack-fr": "~10.1.0", - "@codingame/monaco-vscode-language-pack-it": "~10.1.0", - "@codingame/monaco-vscode-language-pack-ja": "~10.1.0", - "@codingame/monaco-vscode-language-pack-ko": "~10.1.0", - "@codingame/monaco-vscode-language-pack-pl": "~10.1.0", - "@codingame/monaco-vscode-language-pack-pt-br": "~10.1.0", - "@codingame/monaco-vscode-language-pack-qps-ploc": "~10.1.0", - "@codingame/monaco-vscode-language-pack-ru": "~10.1.0", - "@codingame/monaco-vscode-language-pack-tr": "~10.1.0", - "@codingame/monaco-vscode-language-pack-zh-hans": "~10.1.0", - "@codingame/monaco-vscode-language-pack-zh-hant": "~10.1.0", - "@codingame/monaco-vscode-monarch-service-override": "~10.1.0", - "@codingame/monaco-vscode-textmate-service-override": "~10.1.0", - "@codingame/monaco-vscode-theme-defaults-default-extension": "~10.1.0", - "@codingame/monaco-vscode-theme-service-override": "~10.1.0", - "@codingame/monaco-vscode-views-service-override": "~10.1.0", - "@codingame/monaco-vscode-workbench-service-override": "~10.1.0", - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0", + "@codingame/monaco-vscode-configuration-service-override": "~10.1.1", + "@codingame/monaco-vscode-editor-service-override": "~10.1.1", + "@codingame/monaco-vscode-language-pack-cs": "~10.1.1", + "@codingame/monaco-vscode-language-pack-de": "~10.1.1", + "@codingame/monaco-vscode-language-pack-es": "~10.1.1", + "@codingame/monaco-vscode-language-pack-fr": "~10.1.1", + "@codingame/monaco-vscode-language-pack-it": "~10.1.1", + "@codingame/monaco-vscode-language-pack-ja": "~10.1.1", + "@codingame/monaco-vscode-language-pack-ko": "~10.1.1", + "@codingame/monaco-vscode-language-pack-pl": "~10.1.1", + "@codingame/monaco-vscode-language-pack-pt-br": "~10.1.1", + "@codingame/monaco-vscode-language-pack-qps-ploc": "~10.1.1", + "@codingame/monaco-vscode-language-pack-ru": "~10.1.1", + "@codingame/monaco-vscode-language-pack-tr": "~10.1.1", + "@codingame/monaco-vscode-language-pack-zh-hans": "~10.1.1", + "@codingame/monaco-vscode-language-pack-zh-hant": "~10.1.1", + "@codingame/monaco-vscode-monarch-service-override": "~10.1.1", + "@codingame/monaco-vscode-textmate-service-override": "~10.1.1", + "@codingame/monaco-vscode-theme-defaults-default-extension": "~10.1.1", + "@codingame/monaco-vscode-theme-service-override": "~10.1.1", + "@codingame/monaco-vscode-views-service-override": "~10.1.1", + "@codingame/monaco-vscode-workbench-service-override": "~10.1.1", + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1", "vscode-languageclient": "~9.0.1", "vscode-languageserver-protocol": "~3.17.5", "vscode-ws-jsonrpc": "~3.3.2" }, "devDependencies": { - "@codingame/monaco-vscode-standalone-languages": "~10.1.0", - "@codingame/monaco-vscode-standalone-css-language-features": "~10.1.0", - "@codingame/monaco-vscode-standalone-html-language-features": "~10.1.0", - "@codingame/monaco-vscode-standalone-json-language-features": "~10.1.0", - "@codingame/monaco-vscode-standalone-typescript-language-features": "~10.1.0" + "@codingame/monaco-vscode-standalone-languages": "~10.1.1", + "@codingame/monaco-vscode-standalone-css-language-features": "~10.1.1", + "@codingame/monaco-vscode-standalone-html-language-features": "~10.1.1", + "@codingame/monaco-vscode-standalone-json-language-features": "~10.1.1", + "@codingame/monaco-vscode-standalone-typescript-language-features": "~10.1.1" }, "peerDependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "monaco-languageclient": "~9.0.0-next.4", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0" + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "monaco-languageclient": "~9.0.0-next.5", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1" }, "peerDependenciesMeta": { "monaco-editor": { diff --git a/packages/wrapper/src/editorAppBase.ts b/packages/wrapper/src/editorAppBase.ts index c7f7a1411..cb8fb828f 100644 --- a/packages/wrapper/src/editorAppBase.ts +++ b/packages/wrapper/src/editorAppBase.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See LICENSE in the package root for license information. * ------------------------------------------------------------------------------------------ */ +import * as vscode from 'vscode'; import * as monaco from 'monaco-editor'; import { createModelReference, ITextFileEditorModel } from 'vscode/monaco'; import { IReference } from '@codingame/monaco-vscode-editor-service-override'; import { Logger } from 'monaco-languageclient/tools'; -import { getEditorUri } from './utils.js'; export interface CodeContent { text: string; @@ -59,6 +59,7 @@ export interface TextContents { export type TextChanges = TextContents & { isDirty: boolean; + isDirtyOriginal: boolean; } /** @@ -264,3 +265,28 @@ export abstract class EditorAppBase { abstract disposeApp(): void; } + +export const verifyUrlOrCreateDataUrl = (input: string | URL) => { + return (input instanceof URL) ? input.href : new URL(`data:text/plain;base64,${btoa(input)}`).href; +}; + +export const getEditorUri = (id: string, original: boolean, code: CodePlusUri | CodePlusFileExt, basePath?: string) => { + if (Object.hasOwn(code, 'uri')) { + return vscode.Uri.parse((code as CodePlusUri).uri); + } else { + return vscode.Uri.parse(`${basePath ?? '/workspace'}/model${original ? 'Original' : ''}${id}.${(code as CodePlusFileExt).fileExt}`); + } +}; + +export const didModelContentChange = (textModels: TextModels, codeResources?: CodeResources, onTextChanged?: (textChanges: TextChanges) => void) => { + const text = textModels.text?.getValue() ?? ''; + const textOriginal = textModels.textOriginal?.getValue() ?? ''; + const isDirty = text !== codeResources?.main?.text; + const isDirtyOriginal = textOriginal !== codeResources?.original?.text; + onTextChanged?.({ + text, + textOriginal, + isDirty, + isDirtyOriginal + }); +}; diff --git a/packages/wrapper/src/editorAppExtended.ts b/packages/wrapper/src/editorAppExtended.ts index 11e73edd3..edc64a91e 100644 --- a/packages/wrapper/src/editorAppExtended.ts +++ b/packages/wrapper/src/editorAppExtended.ts @@ -7,8 +7,7 @@ import type * as vscode from 'vscode'; import * as monaco from 'monaco-editor'; import { registerExtension, IExtensionManifest, ExtensionHostKind } from 'vscode/extensions'; import { Logger } from 'monaco-languageclient/tools'; -import { EditorAppBase, EditorAppConfigBase } from './editorAppBase.js'; -import { verifyUrlOrCreateDataUrl } from './utils.js'; +import { EditorAppBase, EditorAppConfigBase, verifyUrlOrCreateDataUrl } from './editorAppBase.js'; import { DisposableStore } from 'vscode/monaco'; export interface ExtensionConfig { diff --git a/packages/wrapper/src/index.ts b/packages/wrapper/src/index.ts index 1ba893097..d9b8b0093 100644 --- a/packages/wrapper/src/index.ts +++ b/packages/wrapper/src/index.ts @@ -8,4 +8,3 @@ export * from './editorAppClassic.js'; export * from './editorAppExtended.js'; export * from './languageClientWrapper.js'; export * from './wrapper.js'; -export * from './utils.js'; diff --git a/packages/wrapper/src/languageClientWrapper.ts b/packages/wrapper/src/languageClientWrapper.ts index db8112087..3dc83c9c3 100644 --- a/packages/wrapper/src/languageClientWrapper.ts +++ b/packages/wrapper/src/languageClientWrapper.ts @@ -6,9 +6,8 @@ import { BrowserMessageReader, BrowserMessageWriter } from 'vscode-languageserver-protocol/browser.js'; import { CloseAction, ErrorAction, LanguageClientOptions, MessageTransports, State } from 'vscode-languageclient/browser.js'; import { MonacoLanguageClient, ConnetionConfigOptions, WorkerConfigOptionsDirect, WorkerConfigOptionsParams } from 'monaco-languageclient'; -import { Logger } from 'monaco-languageclient/tools'; +import { createUrl, Logger } from 'monaco-languageclient/tools'; import { toSocket, WebSocketMessageReader, WebSocketMessageWriter } from 'vscode-ws-jsonrpc'; -import { createUrl } from './utils.js'; export interface ConnectionConfig { options: ConnetionConfigOptions; diff --git a/packages/wrapper/test/utils.test.ts b/packages/wrapper/test/utils.test.ts index 5b07c0bd5..265574a84 100644 --- a/packages/wrapper/test/utils.test.ts +++ b/packages/wrapper/test/utils.test.ts @@ -5,7 +5,7 @@ import { describe, expect, test } from 'vitest'; import { WebSocketConfigOptionsParams, WebSocketConfigOptionsUrl } from 'monaco-languageclient'; -import { createUrl } from 'monaco-editor-wrapper'; +import { createUrl } from 'monaco-languageclient/tools'; describe('createUrl', () => { diff --git a/verify/angular/package.json b/verify/angular/package.json index b9f01e4fd..4ac199a15 100644 --- a/verify/angular/package.json +++ b/verify/angular/package.json @@ -20,10 +20,10 @@ "@angular/core": "~18.2.8", "@angular/platform-browser": "~18.2.8", "@angular/platform-browser-dynamic": "~18.2.8", - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "monaco-editor-wrapper": "~6.0.0-next.4", - "monaco-languageclient-examples": "~2024.10.3", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0", + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "monaco-editor-wrapper": "~6.0.0-next.5", + "monaco-languageclient-examples": "~2024.10.4", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1", "rxjs": "~7.8.1", "zone.js": "~0.14.10" }, diff --git a/verify/pnpm/package.json b/verify/pnpm/package.json index b5863fea6..7e1d9e030 100644 --- a/verify/pnpm/package.json +++ b/verify/pnpm/package.json @@ -4,10 +4,10 @@ "private": true, "type": "module", "dependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "monaco-editor-wrapper": "~6.0.0-next.4", - "monaco-languageclient-examples": "~2024.10.3", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0" + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "monaco-editor-wrapper": "~6.0.0-next.5", + "monaco-languageclient-examples": "~2024.10.4", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1" }, "devDependencies": { "shx": "~0.3.4", diff --git a/verify/vite/package.json b/verify/vite/package.json index 63fd383cc..5788487e3 100644 --- a/verify/vite/package.json +++ b/verify/vite/package.json @@ -4,10 +4,10 @@ "private": true, "type": "module", "dependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "monaco-editor-wrapper": "~6.0.0-next.4", - "monaco-languageclient-examples": "~2024.10.3", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0" + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "monaco-editor-wrapper": "~6.0.0-next.5", + "monaco-languageclient-examples": "~2024.10.4", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1" }, "devDependencies": { "shx": "~0.3.4", diff --git a/verify/webpack/package.json b/verify/webpack/package.json index b94ec5d6e..e2c37d10a 100644 --- a/verify/webpack/package.json +++ b/verify/webpack/package.json @@ -4,10 +4,10 @@ "private": true, "type": "module", "dependencies": { - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "monaco-editor-wrapper": "~6.0.0-next.4", - "monaco-languageclient-examples": "~2024.10.3", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0" + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "monaco-editor-wrapper": "~6.0.0-next.5", + "monaco-languageclient-examples": "~2024.10.4", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1" }, "devDependencies": { "@types/vscode": "~1.94.0", diff --git a/verify/yarn/package.json b/verify/yarn/package.json index b719232ea..8273abc29 100644 --- a/verify/yarn/package.json +++ b/verify/yarn/package.json @@ -4,11 +4,11 @@ "private": true, "type": "module", "dependencies": { - "@typefox/monaco-editor-react": "~6.0.0-next.4", - "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.0", - "monaco-editor-wrapper": "~6.0.0-next.4", - "monaco-languageclient-examples": "~2024.10.3", - "vscode": "npm:@codingame/monaco-vscode-api@~10.1.0", + "@typefox/monaco-editor-react": "~6.0.0-next.5", + "monaco-editor": "npm:@codingame/monaco-vscode-editor-api@~10.1.1", + "monaco-editor-wrapper": "~6.0.0-next.5", + "monaco-languageclient-examples": "~2024.10.4", + "vscode": "npm:@codingame/monaco-vscode-api@~10.1.1", "vscode-ws-jsonrpc": "~3.3.2" }, "devDependencies": { From 0797856ae467e1beb0164f47275771319e03edfb Mon Sep 17 00:00:00 2001 From: Kai Salmen Date: Wed, 25 Sep 2024 22:14:11 +0200 Subject: [PATCH 2/6] Port clangd browser example to here - Condense code - Make use of new wrapper features --- index.html | 4 + package-lock.json | 10 ++ packages/examples/.gitignore | 1 + packages/examples/clangd.html | 24 +++ packages/examples/package.json | 4 +- .../examples/resources/clangd/build-docker.sh | 69 ++++++++ .../resources/clangd/build.Dockerfile | 6 + .../resources/clangd/build.docker-compose.yml | 10 ++ .../resources/clangd/configure-docker.sh | 32 ++++ .../resources/clangd/configure.Dockerfile | 18 ++ .../clangd/configure.docker-compose.yml | 10 ++ .../clangd/scripts/extractDockerFiles.ts | 18 ++ .../resources/clangd/wait_stdin.patch | 31 ++++ packages/examples/src/clangd/README.md | 5 + packages/examples/src/clangd/client/config.ts | 90 ++++++++++ packages/examples/src/clangd/client/hello.cpp | 9 + packages/examples/src/clangd/client/main.ts | 40 +++++ packages/examples/src/clangd/client/tester.h | 6 + packages/examples/src/clangd/definitions.ts | 15 ++ .../src/clangd/worker/clangd-server.ts | 159 ++++++++++++++++++ .../examples/src/clangd/worker/json_stream.ts | 64 +++++++ packages/examples/src/clangd/worker/server.ts | 29 ++++ packages/examples/src/vite-env.d.ts | 4 + vite.config.ts | 20 ++- 24 files changed, 675 insertions(+), 3 deletions(-) create mode 100644 packages/examples/clangd.html create mode 100644 packages/examples/resources/clangd/build-docker.sh create mode 100644 packages/examples/resources/clangd/build.Dockerfile create mode 100644 packages/examples/resources/clangd/build.docker-compose.yml create mode 100644 packages/examples/resources/clangd/configure-docker.sh create mode 100644 packages/examples/resources/clangd/configure.Dockerfile create mode 100644 packages/examples/resources/clangd/configure.docker-compose.yml create mode 100644 packages/examples/resources/clangd/scripts/extractDockerFiles.ts create mode 100644 packages/examples/resources/clangd/wait_stdin.patch create mode 100644 packages/examples/src/clangd/README.md create mode 100644 packages/examples/src/clangd/client/config.ts create mode 100644 packages/examples/src/clangd/client/hello.cpp create mode 100644 packages/examples/src/clangd/client/main.ts create mode 100644 packages/examples/src/clangd/client/tester.h create mode 100644 packages/examples/src/clangd/definitions.ts create mode 100644 packages/examples/src/clangd/worker/clangd-server.ts create mode 100644 packages/examples/src/clangd/worker/json_stream.ts create mode 100644 packages/examples/src/clangd/worker/server.ts diff --git a/index.html b/index.html index 556cc4b3e..fe4686cde 100644 --- a/index.html +++ b/index.html @@ -54,6 +54,10 @@

Groovy

Groovy Language Client & Language Server (Web Socket)
+

Cpp / Clangd

+ Cpp Language Client & Clangd Language Server (Worker/Wasm) +
+

Multiple Languageclients

Please execute npm run start:example:server:python and npm run start:example:server:json beforehand:
Json & Python Languageclients & Language Server (Web Socket) diff --git a/package-lock.json b/package-lock.json index 304308983..fcc01a0dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -589,6 +589,15 @@ "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" } }, + "node_modules/@codingame/monaco-vscode-cpp-default-extension": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-cpp-default-extension/-/monaco-vscode-cpp-default-extension-10.1.1.tgz", + "integrity": "sha512-PVgq/rA2c1RHApmTxP4OYnpic0OKodJtvEZumydfkr4bOkEgNLkiJS5hldKc4QeY+CHVkd9t5jqOpooRbX9dnQ==", + "license": "MIT", + "dependencies": { + "vscode": "npm:@codingame/monaco-vscode-api@10.1.1" + } + }, "node_modules/@codingame/monaco-vscode-editor-service-override": { "version": "10.1.1", "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-editor-service-override/-/monaco-vscode-editor-service-override-10.1.1.tgz", @@ -11605,6 +11614,7 @@ "license": "MIT", "dependencies": { "@codingame/monaco-vscode-configuration-service-override": "~10.1.1", + "@codingame/monaco-vscode-cpp-default-extension": "~10.1.1", "@codingame/monaco-vscode-files-service-override": "~10.1.1", "@codingame/monaco-vscode-groovy-default-extension": "~10.1.1", "@codingame/monaco-vscode-java-default-extension": "~10.1.1", diff --git a/packages/examples/.gitignore b/packages/examples/.gitignore index 39cdeec57..338f6cb8c 100644 --- a/packages/examples/.gitignore +++ b/packages/examples/.gitignore @@ -1,3 +1,4 @@ +resources/clangd/wasm resources/groovy/external resources/eclipse.jdt.ls/ls resources/eclipse.jdt.ls/*.tar.gz diff --git a/packages/examples/clangd.html b/packages/examples/clangd.html new file mode 100644 index 000000000..905bc23a9 --- /dev/null +++ b/packages/examples/clangd.html @@ -0,0 +1,24 @@ + + + + + Cpp Language Client & Clangd Language Server (Worker/Wasm) + + + + + + +

Cpp Language Client & Clangd Language Server (Worker/Wasm)

+ This example has been derived from: clangd-in-browser
+ + +
+ + + + diff --git a/packages/examples/package.json b/packages/examples/package.json index e7e29026d..e8160c61e 100644 --- a/packages/examples/package.json +++ b/packages/examples/package.json @@ -55,6 +55,7 @@ }, "dependencies": { "@codingame/monaco-vscode-configuration-service-override": "~10.1.1", + "@codingame/monaco-vscode-cpp-default-extension": "~10.1.1", "@codingame/monaco-vscode-files-service-override": "~10.1.1", "@codingame/monaco-vscode-groovy-default-extension": "~10.1.1", "@codingame/monaco-vscode-keybindings-service-override": "~10.1.1", @@ -121,6 +122,7 @@ "start:server:python": "vite-node src/python/server/direct.ts", "start:server:groovy": "vite-node src/groovy/server/direct.ts", "start:server:jdtls": "vite-node src/eclipse.jdt.ls/server/direct.ts", - "langium:generate": "langium generate --file ./src/langium/statemachine/config/langium-config.json" + "langium:generate": "langium generate --file ./src/langium/statemachine/config/langium-config.json", + "extract:docker": "vite-node ./resources/clangd/scripts/extractDockerFiles.ts" } } diff --git a/packages/examples/resources/clangd/build-docker.sh b/packages/examples/resources/clangd/build-docker.sh new file mode 100644 index 000000000..e64b0757c --- /dev/null +++ b/packages/examples/resources/clangd/build-docker.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +# 3b. Build LLVM + +WORKSPACE_DIR=$PWD +# otherwise emcmake is not found +source $WORKSPACE_DIR/emsdk/emsdk_env.sh + +cd llvm-project + +## Build native tools first +cmake -G Ninja -S llvm -B build-native \ + -DCMAKE_BUILD_TYPE=Release \ + -DLLVM_ENABLE_PROJECTS=clang +cmake --build build-native --target llvm-tblgen clang-tblgen + +## Apply a patch for blocking stdin read +git apply $WORKSPACE_DIR/wait_stdin.patch + +## Build clangd (1st time, just for compiler headers) +emcmake cmake -G Ninja -S llvm -B build \ + -DCMAKE_CXX_FLAGS="-pthread -Dwait4=__syscall_wait4" \ + -DCMAKE_EXE_LINKER_FLAGS="-pthread -s ENVIRONMENT=worker -s NO_INVOKE_RUN" \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DLLVM_TARGET_ARCH=wasm32-emscripten \ + -DLLVM_DEFAULT_TARGET_TRIPLE=wasm32-wasi \ + -DLLVM_TARGETS_TO_BUILD=WebAssembly \ + -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" \ + -DLLVM_TABLEGEN=$PWD/build-native/bin/llvm-tblgen \ + -DCLANG_TABLEGEN=$PWD/build-native/bin/clang-tblgen \ + -DLLVM_BUILD_STATIC=ON \ + -DLLVM_INCLUDE_EXAMPLES=OFF \ + -DLLVM_INCLUDE_TESTS=OFF \ + -DLLVM_ENABLE_BACKTRACES=OFF \ + -DLLVM_ENABLE_UNWIND_TABLES=OFF \ + -DLLVM_ENABLE_CRASH_OVERRIDES=OFF \ + -DCLANG_ENABLE_STATIC_ANALYZER=OFF \ + -DLLVM_ENABLE_TERMINFO=OFF \ + -DLLVM_ENABLE_PIC=OFF \ + -DLLVM_ENABLE_ZLIB=OFF \ + -DCLANG_ENABLE_ARCMT=OFF +cmake --build build --target clangd + +## Copy installed headers to WASI sysroot +cp -r build/lib/clang/$LLVM_VER_MAJOR/include/* $WORKSPACE_DIR/wasi-sysroot/include/ + +## Build clangd (2nd time, for the real thing) +emcmake cmake -G Ninja -S llvm -B build \ + -DCMAKE_CXX_FLAGS="-pthread -Dwait4=__syscall_wait4" \ + -DCMAKE_EXE_LINKER_FLAGS="-pthread -s ENVIRONMENT=worker -s NO_INVOKE_RUN -s EXIT_RUNTIME -s INITIAL_MEMORY=2GB -s ALLOW_MEMORY_GROWTH -s MAXIMUM_MEMORY=4GB -s STACK_SIZE=256kB -s EXPORTED_RUNTIME_METHODS=FS,callMain -s MODULARIZE -s EXPORT_ES6 -s WASM_BIGINT -s ASSERTIONS -s ASYNCIFY -s PTHREAD_POOL_SIZE='Math.max(navigator.hardwareConcurrency, 8)' --embed-file=$WORKSPACE_DIR/wasi-sysroot/include@/usr/include" \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DLLVM_TARGET_ARCH=wasm32-emscripten \ + -DLLVM_DEFAULT_TARGET_TRIPLE=wasm32-wasi \ + -DLLVM_TARGETS_TO_BUILD=WebAssembly \ + -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" \ + -DLLVM_TABLEGEN=$PWD/build-native/bin/llvm-tblgen \ + -DCLANG_TABLEGEN=$PWD/build-native/bin/clang-tblgen \ + -DLLVM_BUILD_STATIC=ON \ + -DLLVM_INCLUDE_EXAMPLES=OFF \ + -DLLVM_INCLUDE_TESTS=OFF \ + -DLLVM_ENABLE_BACKTRACES=OFF \ + -DLLVM_ENABLE_UNWIND_TABLES=OFF \ + -DLLVM_ENABLE_CRASH_OVERRIDES=OFF \ + -DCLANG_ENABLE_STATIC_ANALYZER=OFF \ + -DLLVM_ENABLE_TERMINFO=OFF \ + -DLLVM_ENABLE_PIC=OFF \ + -DLLVM_ENABLE_ZLIB=OFF \ + -DCLANG_ENABLE_ARCMT=OFF +cmake --build build --target clangd diff --git a/packages/examples/resources/clangd/build.Dockerfile b/packages/examples/resources/clangd/build.Dockerfile new file mode 100644 index 000000000..e736c1359 --- /dev/null +++ b/packages/examples/resources/clangd/build.Dockerfile @@ -0,0 +1,6 @@ +FROM clangd-clangd-configure + +COPY build-docker.sh /builder/build-docker.sh +COPY wait_stdin.patch /builder/wait_stdin.patch + +RUN (cd /builder; ./build-docker.sh) diff --git a/packages/examples/resources/clangd/build.docker-compose.yml b/packages/examples/resources/clangd/build.docker-compose.yml new file mode 100644 index 000000000..9c3626172 --- /dev/null +++ b/packages/examples/resources/clangd/build.docker-compose.yml @@ -0,0 +1,10 @@ +services: + clangd-build: + build: + dockerfile: ./build.Dockerfile + context: . + # only linux/amd64 for now + platforms: + - "linux/amd64" + platform: linux/amd64 + container_name: clangd-build diff --git a/packages/examples/resources/clangd/configure-docker.sh b/packages/examples/resources/clangd/configure-docker.sh new file mode 100644 index 000000000..69a048849 --- /dev/null +++ b/packages/examples/resources/clangd/configure-docker.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# It's not recommend for you to run this script directly, +# (because I'm not good at writing this sorry) +# but you can use it as a reference for building. + +# 0. Configs + +# sudo apt install vim git build-essential cmake ninja-build python3 + +## Note: Better to make sure WASI SDK version matches the LLVM version +EMSDK_VER=3.1.52 +WASI_SDK_VER=22.0 +WASI_SDK_VER_MAJOR=22 +LLVM_VER=18.1.2 +LLVM_VER_MAJOR=18 + +# 1. Get Emscripten + +git clone --branch $EMSDK_VER --depth 1 https://github.com/emscripten-core/emsdk +pushd emsdk +./emsdk install $EMSDK_VER +./emsdk activate $EMSDK_VER +source ./emsdk_env.sh +popd + +# 2. Prepare WASI sysroot + +wget -O- https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$WASI_SDK_VER_MAJOR/wasi-sysroot-$WASI_SDK_VER.tar.gz | tar -xz + +# 3a. Build LLVM + +git clone --branch llvmorg-$LLVM_VER --depth 1 https://github.com/llvm/llvm-project diff --git a/packages/examples/resources/clangd/configure.Dockerfile b/packages/examples/resources/clangd/configure.Dockerfile new file mode 100644 index 000000000..a4d5a5e57 --- /dev/null +++ b/packages/examples/resources/clangd/configure.Dockerfile @@ -0,0 +1,18 @@ +FROM ubuntu + +RUN apt update \ + && apt upgrade -y \ + && apt install -y curl git wget build-essential cmake ninja-build python3 + +RUN curl https://get.volta.sh | bash +ENV VOLTA_FEATURE_PNPM=1 +ENV VOLTA_HOME "/root/.volta" +ENV PATH "$VOLTA_HOME/bin:$PATH" + +RUN volta install node \ + && volta install pnpm + +RUN mkdir /builder + +COPY configure-docker.sh /builder/configure-docker.sh +RUN (cd /builder; ./configure-docker.sh) diff --git a/packages/examples/resources/clangd/configure.docker-compose.yml b/packages/examples/resources/clangd/configure.docker-compose.yml new file mode 100644 index 000000000..0c6299ad9 --- /dev/null +++ b/packages/examples/resources/clangd/configure.docker-compose.yml @@ -0,0 +1,10 @@ +services: + clangd-configure: + build: + dockerfile: ./configure.Dockerfile + context: . + # only linux/amd64 for now + platforms: + - "linux/amd64" + platform: linux/amd64 + container_name: clangd-configure diff --git a/packages/examples/resources/clangd/scripts/extractDockerFiles.ts b/packages/examples/resources/clangd/scripts/extractDockerFiles.ts new file mode 100644 index 000000000..a4c44a03f --- /dev/null +++ b/packages/examples/resources/clangd/scripts/extractDockerFiles.ts @@ -0,0 +1,18 @@ +import * as fs from "node:fs"; +import child_process from "node:child_process"; + +const outputDir = './resources/clangd/wasm'; + +// clean always +fs.rmSync(outputDir, { + force: true, + recursive: true +}); +fs.mkdirSync(outputDir); + +child_process.execFileSync('docker', ['create', '--name', 'extract-clangd', 'clangd-clangd-build']); +child_process.execFileSync('docker', ['cp', 'extract-clangd:/builder/llvm-project/build/bin/clangd.js', outputDir]); +child_process.execFileSync('docker', ['cp', 'extract-clangd:/builder/llvm-project/build/bin/clangd.wasm', outputDir]); +child_process.execFileSync('docker', ['cp', 'extract-clangd:/builder/llvm-project/build/bin/clangd.worker.js', outputDir]); +child_process.execFileSync('docker', ['cp', 'extract-clangd:/builder/llvm-project/build/bin/clangd.worker.mjs', outputDir]); +child_process.execFileSync('docker', ['rm', 'extract-clangd']); diff --git a/packages/examples/resources/clangd/wait_stdin.patch b/packages/examples/resources/clangd/wait_stdin.patch new file mode 100644 index 000000000..bf82578f0 --- /dev/null +++ b/packages/examples/resources/clangd/wait_stdin.patch @@ -0,0 +1,31 @@ +diff --git a/clang-tools-extra/clangd/JSONTransport.cpp b/clang-tools-extra/clangd/JSONTransport.cpp +index 9dc0df807..b1a4e9bd1 100644 +--- a/clang-tools-extra/clangd/JSONTransport.cpp ++++ b/clang-tools-extra/clangd/JSONTransport.cpp +@@ -1,3 +1,26 @@ ++#ifdef __EMSCRIPTEN__ ++ ++#include ++ ++#include "support/Shutdown.h" ++#include ++ ++EM_ASYNC_JS(void, waitForStdin, (), { ++ await Module.stdinReady(); ++}) ++ ++template ()())> ++Ret doUntilStdinAvailable( ++ const std::enable_if_t& fail, ++ const Fun& f) { ++ waitForStdin(); ++ return clang::clangd::retryAfterSignalUnlessShutdown(fail, f); ++} ++ ++#define retryAfterSignalUnlessShutdown doUntilStdinAvailable ++ ++#endif ++ + //===--- JSONTransport.cpp - sending and receiving LSP messages over JSON -===// + // + // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/packages/examples/src/clangd/README.md b/packages/examples/src/clangd/README.md new file mode 100644 index 000000000..6b4e4e10a --- /dev/null +++ b/packages/examples/src/clangd/README.md @@ -0,0 +1,5 @@ +# Cpp Language Client & Clangd Language Server (Worker/Wasm) + +This example is based on the wonderful [work](https://github.com/guyutongxue/clangd-in-browser) from [Guyutongxue](https://github.com/guyutongxue). + +This example has less features and therefore less code and will be used to test and integrate new features under development. diff --git a/packages/examples/src/clangd/client/config.ts b/packages/examples/src/clangd/client/config.ts new file mode 100644 index 000000000..ad88ae02e --- /dev/null +++ b/packages/examples/src/clangd/client/config.ts @@ -0,0 +1,90 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) 2024 TypeFox and others. + * Licensed under the MIT License. See LICENSE in the package root for license information. + * ------------------------------------------------------------------------------------------ */ + +import * as vscode from 'vscode'; +import getConfigurationServiceOverride from '@codingame/monaco-vscode-configuration-service-override'; +import getTextmateServiceOverride from '@codingame/monaco-vscode-textmate-service-override'; +import getThemeServiceOverride from '@codingame/monaco-vscode-theme-service-override'; +import '@codingame/monaco-vscode-theme-defaults-default-extension'; +// this is required syntax highlighting +import '@codingame/monaco-vscode-cpp-default-extension'; +import { LogLevel } from 'vscode/services'; +import { WrapperConfig } from 'monaco-editor-wrapper'; +import { FILE_PATH, LANGUAGE_ID, WORKSPACE_PATH } from '../definitions.js'; +import { createServer } from '../worker/server.js'; +import { configureMonacoWorkers } from '../../common/client/utils.js'; + +export const createUserConfig = async (code: string): Promise => { + return { + logLevel: LogLevel.Debug, + languageClientConfigs: { + LANGUAGE_ID: { + languageId: LANGUAGE_ID, + name: 'Clangd WASM Language Server', + connection: { + options: { + $type: 'WorkerDirect', + worker: await createServer(), + } + }, + restartOptions: { + retries: 5, + timeout: 1000, + keepWorker: true + }, + clientOptions: { + documentSelector: [LANGUAGE_ID], + workspaceFolder: { + index: 0, + name: 'workspace', + uri: vscode.Uri.file(WORKSPACE_PATH), + } + } + } + }, + serviceConfig: { + workspaceConfig: { + workspaceProvider: { + trusted: true, + workspace: { + workspaceUri: vscode.Uri.file(WORKSPACE_PATH), + }, + async open(p) { + console.log(`Editor open request: ${p}`); + return false; + }, + }, + }, + userServices: { + ...getConfigurationServiceOverride(), + ...getTextmateServiceOverride(), + ...getThemeServiceOverride(), + } + }, + editorAppConfig: { + $type: 'extended', + codeResources: { + main: { + text: code, + uri: FILE_PATH, + }, + }, + userConfiguration: { + json: getUserConfigurationJson(), + }, + useDiffEditor: false, + monacoWorkerFactory: configureMonacoWorkers + } + }; +}; + +const getUserConfigurationJson = () => { + return JSON.stringify({ + 'workbench.colorTheme': 'Default Dark Modern', + 'editor.wordBasedSuggestions': 'off', + 'editor.inlayHints.enabled': 'offUnlessPressed', + 'editor.quickSuggestionsDelay': 200, + }); +}; diff --git a/packages/examples/src/clangd/client/hello.cpp b/packages/examples/src/clangd/client/hello.cpp new file mode 100644 index 000000000..0b3cab5a2 --- /dev/null +++ b/packages/examples/src/clangd/client/hello.cpp @@ -0,0 +1,9 @@ +#include +using namespace std; + +#include "tester.h" + +int main() { + cout << "Hello World!"; + return 0; +} diff --git a/packages/examples/src/clangd/client/main.ts b/packages/examples/src/clangd/client/main.ts new file mode 100644 index 000000000..97b274782 --- /dev/null +++ b/packages/examples/src/clangd/client/main.ts @@ -0,0 +1,40 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) 2024 TypeFox and others. + * Licensed under the MIT License. See LICENSE in the package root for license information. + * ------------------------------------------------------------------------------------------ */ + +import * as vscode from 'vscode'; +import { RegisteredFileSystemProvider, registerFileSystemOverlay, RegisteredMemoryFile } from '@codingame/monaco-vscode-files-service-override'; +import { MonacoEditorLanguageClientWrapper } from 'monaco-editor-wrapper'; +import { createUserConfig } from './config.js'; +import helloCppCode from './hello.cpp?raw'; +import testerHCode from './tester.h?raw'; + +export const runClangdWrapper = () => { + const wrapper = new MonacoEditorLanguageClientWrapper(); + const htmlElement = document.getElementById('monaco-editor-root'); + + try { + document.querySelector('#button-start')?.addEventListener('click', async () => { + const userConfig = await createUserConfig(helloCppCode); + await wrapper.initAndStart(userConfig, htmlElement); + + const helloCppUri = vscode.Uri.file('/home/web_user/hello.cpp'); + const testerHUri = vscode.Uri.file('/home/web_user/tester.h'); + + const fileSystemProvider = new RegisteredFileSystemProvider(false); + fileSystemProvider.registerFile(new RegisteredMemoryFile(helloCppUri, helloCppCode)); + fileSystemProvider.registerFile(new RegisteredMemoryFile(testerHUri, testerHCode)); + + registerFileSystemOverlay(1, fileSystemProvider); + + await vscode.workspace.openTextDocument(helloCppUri); + await vscode.workspace.openTextDocument(testerHUri); + }); + document.querySelector('#button-dispose')?.addEventListener('click', async () => { + await wrapper.dispose(); + }); + } catch (e) { + console.error(e); + } +}; diff --git a/packages/examples/src/clangd/client/tester.h b/packages/examples/src/clangd/client/tester.h new file mode 100644 index 000000000..e1c2e1245 --- /dev/null +++ b/packages/examples/src/clangd/client/tester.h @@ -0,0 +1,6 @@ +namespace Tester { + class MyClass { + public: + void printHelloWorld(); + }; +} diff --git a/packages/examples/src/clangd/definitions.ts b/packages/examples/src/clangd/definitions.ts new file mode 100644 index 000000000..6fd078e13 --- /dev/null +++ b/packages/examples/src/clangd/definitions.ts @@ -0,0 +1,15 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) 2024 TypeFox and others. + * Licensed under the MIT License. See LICENSE in the package root for license information. + * ------------------------------------------------------------------------------------------ */ + +export const LANGUAGE_ID = 'cpp'; +export const WORKSPACE_PATH = '/home/web_user'; +export const FILE_PATH = '/home/web_user/main.cpp'; + +export const COMPILE_ARGS = [ + '-xc++', + '-std=c++2b', + '-pedantic-errors', + '-Wall', +]; diff --git a/packages/examples/src/clangd/worker/clangd-server.ts b/packages/examples/src/clangd/worker/clangd-server.ts new file mode 100644 index 000000000..372c320ca --- /dev/null +++ b/packages/examples/src/clangd/worker/clangd-server.ts @@ -0,0 +1,159 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) 2024 TypeFox and others. + * Licensed under the MIT License. See LICENSE in the package root for license information. + * ------------------------------------------------------------------------------------------ */ + +/// + +import { COMPILE_ARGS, FILE_PATH, WORKSPACE_PATH } from '../definitions.js'; +import { JsonStream } from './json_stream.js'; +import { BrowserMessageReader, BrowserMessageWriter } from 'vscode-languageserver/browser.js'; + +declare const self: DedicatedWorkerGlobalScope; + +// const wasmBase = `${import.meta.env.BASE_URL}packages/examples/resources/clangd/wasm/`; +// const wasmUrl = `${wasmBase}clangd.wasm`; +const clangdWasmUrl = new URL('../../../resources/clangd/wasm/clangd.wasm', import.meta.url); +const clangdJsUrl = new URL('../../../resources/clangd/wasm/clangd.js', import.meta.url); +const jsModule = import( /* @vite-ignore */ `${clangdJsUrl}`); + +// Pre-fetch wasm, and report progress to main +const wasmResponse = await fetch(clangdWasmUrl); +const wasmSize = __WASM_SIZE__; +const wasmReader = wasmResponse.body!.getReader(); +let receivedLength = 0; +const chunks: Uint8Array[] = []; +let loadingComplete = false; +while (!loadingComplete) { + const { done, value } = await wasmReader.read(); + loadingComplete = done; + if (value) { + chunks.push(value); + receivedLength += value.length; + self.postMessage({ + type: 'progress', + value: receivedLength, + max: Number(wasmSize), + }); + } +} +const wasmBlob = new Blob(chunks, { type: 'application/wasm' }); +const wasmDataUrl = URL.createObjectURL(wasmBlob); + +const { default: Clangd } = await jsModule; + +const textEncoder = new TextEncoder(); +let resolveStdinReady = () => { }; +const stdinChunks: string[] = []; +const currentStdinChunk: Array = []; + +const stdin = (): number | null => { + if (currentStdinChunk.length === 0) { + if (stdinChunks.length === 0) { + // Should not reach here + // stdinChunks.push("Content-Length: 0\r\n", "\r\n"); + console.error('Try to fetch exhausted stdin'); + return null; + } + const nextChunk = stdinChunks.shift()!; + currentStdinChunk.push(...textEncoder.encode(nextChunk), null); + } + return currentStdinChunk.shift()!; +}; + +const jsonStream = new JsonStream(); + +const stdout = (charCode: number) => { + const jsonOrNull = jsonStream.insert(charCode); + if (jsonOrNull !== null) { + console.log('%c%s', 'color: green', jsonOrNull); + writer.write(JSON.parse(jsonOrNull)); + } +}; + +const LF = 10; +let stderrLine = ''; +const stderr = (charCode: number) => { + if (charCode === LF) { + console.log('%c%s', 'color: darkorange', stderrLine); + stderrLine = ''; + } else { + stderrLine += String.fromCharCode(charCode); + } +}; + +const stdinReady = async () => { + if (stdinChunks.length === 0) { + return new Promise((r) => (resolveStdinReady = r)); + } +}; + +const onAbort = () => { + writer.end(); + self.reportError('clangd aborted'); +}; + +const clangd = await Clangd({ + thisProgram: '/usr/bin/clangd', + locateFile: (path: string, prefix: string) => { + return path.endsWith('.wasm') ? wasmDataUrl : `${prefix}${path}`; + }, + stdinReady, + stdin, + stdout, + stderr, + onExit: onAbort, + onAbort, +}); +console.log(clangd); + +const flags = [ + ...COMPILE_ARGS, + '--target=wasm32-wasi', + '-isystem/usr/include/c++/v1', + '-isystem/usr/include/wasm32-wasi/c++/v1', + '-isystem/usr/include', + '-isystem/usr/include/wasm32-wasi', +]; + +clangd.FS.writeFile(FILE_PATH, ''); +clangd.FS.writeFile( + `${WORKSPACE_PATH}/.clangd`, + JSON.stringify({ CompileFlags: { Add: flags } }) +); + +clangd.FS.writeFile( + `${WORKSPACE_PATH}/tester.h`, + 'struct Tester {}' +); +// const test2 = clangd.FS.readFile('/usr/include/wasm32-wasi/stdio.h'); +// console.log(String.fromCharCode.apply(null, test2)); + +function startServer() { + console.log('%c%s', 'font-size: 2em; color: green', 'clangd started'); + clangd.callMain([]); +} +startServer(); + +self.postMessage({ type: 'ready' }); + +const reader = new BrowserMessageReader(self); +const writer = new BrowserMessageWriter(self); + +reader.listen((data) => { + // non-ASCII characters cause bad Content-Length. Just escape them. + const body = JSON.stringify(data).replace(/[\u007F-\uFFFF]/g, (ch) => { + return '\\u' + ch.codePointAt(0)!.toString(16).padStart(4, '0'); + }); + const header = `Content-Length: ${body.length}\r\n`; + const delimiter = '\r\n'; + stdinChunks.push(header, delimiter, body); + resolveStdinReady(); + // console.log("%c%s", "color: red", `${header}${delimiter}${body}`); +}); + +// setTimeout(() => { +// // test read back +// const test1 = clangd.FS.readFile(`${WORKSPACE_PATH}/tester.h`) as number[]; +// console.log(String.fromCharCode.apply(null, test1)); +// }, 5000); diff --git a/packages/examples/src/clangd/worker/json_stream.ts b/packages/examples/src/clangd/worker/json_stream.ts new file mode 100644 index 000000000..80b6d578b --- /dev/null +++ b/packages/examples/src/clangd/worker/json_stream.ts @@ -0,0 +1,64 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) 2024 TypeFox and others. + * Licensed under the MIT License. See LICENSE in the package root for license information. + * ------------------------------------------------------------------------------------------ */ + +const QUOT = 34; +const LBRACE = 123; +const RBRACE = 125; +const BACKSLASH = 92; + +export class JsonStream { + #inJson = false; + #rawText: number[] = []; + #unbalancedBraces = 0; + #inString = false; + #inEscape = 0; + readonly #textDecoder = new TextDecoder(); + + constructor() { } + + /** + * Insert a char into current partial JSON + * @param charCode + * @returns Complete JSON string if the inserted char makes the JSON complete, otherwise null + */ + insert(charCode: number): string | null { + if (!this.#inJson && charCode === LBRACE) { + this.#inJson = true; + this.#rawText = []; + } + if (!this.#inJson) { + return null; + } + this.#rawText.push(charCode); + if (this.#inString) { + if (this.#inEscape) { + if (charCode === 75) { + // \uxxxx + this.#inEscape += 4; + } + this.#inEscape--; + } else { + if (charCode === BACKSLASH) { + this.#inEscape = 1; + } else if (charCode === QUOT) { + this.#inString = false; + } + } + } else { + if (charCode === LBRACE) { + this.#unbalancedBraces++; + } else if (charCode === RBRACE) { + this.#unbalancedBraces--; + if (this.#unbalancedBraces === 0) { + this.#inJson = false; + return this.#textDecoder.decode(new Uint8Array(this.#rawText)); + } + } else if (charCode === QUOT) { + this.#inString = true; + } + } + return null; + } +} diff --git a/packages/examples/src/clangd/worker/server.ts b/packages/examples/src/clangd/worker/server.ts new file mode 100644 index 000000000..90f93415c --- /dev/null +++ b/packages/examples/src/clangd/worker/server.ts @@ -0,0 +1,29 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) 2024 TypeFox and others. + * Licensed under the MIT License. See LICENSE in the package root for license information. + * ------------------------------------------------------------------------------------------ */ + +import clangdWorkerUrl from './clangd-server?worker&url'; + +export async function createServer() { + let clangdResolve = () => { }; + const clangdReady = new Promise((r) => (clangdResolve = r)); + const worker = new Worker(clangdWorkerUrl, { + type: 'module', + name: 'Clangd Server Worker', + }); + const readyListener = (e: MessageEvent) => { + switch (e.data?.type) { + case 'ready': { + clangdResolve(); + break; + } + case 'progress': { + break; + } + } + }; + worker.addEventListener('message', readyListener); + await clangdReady; + return worker; +} diff --git a/packages/examples/src/vite-env.d.ts b/packages/examples/src/vite-env.d.ts index a9f5ee94f..3fef01158 100644 --- a/packages/examples/src/vite-env.d.ts +++ b/packages/examples/src/vite-env.d.ts @@ -3,6 +3,10 @@ * Licensed under the MIT License. See LICENSE in the package root for license information. * ------------------------------------------------------------------------------------------ */ +/// + +declare const __WASM_SIZE__: number; + declare module '*?raw' { const content: string; export default content; diff --git a/vite.config.ts b/vite.config.ts index 126cef79b..c6db83cf9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,17 +4,21 @@ * ------------------------------------------------------------------------------------------ */ import { defineConfig } from 'vite'; +import fs from 'node:fs'; import * as path from 'node:path'; import importMetaUrlPlugin from '@codingame/esbuild-import-meta-url-plugin'; import vsixPlugin from '@codingame/monaco-vscode-rollup-vsix-plugin'; import react from '@vitejs/plugin-react'; +const clangdWasmLocation = 'packages/examples/resources/clangd/wasm/clangd.wasm'; + export const definedViteConfig = defineConfig({ build: { target: 'esnext', rollupOptions: { input: { index: path.resolve(__dirname, 'index.html'), + // bare monaco-languageclient bare: path.resolve(__dirname, 'packages/examples/bare.html'), @@ -22,14 +26,20 @@ export const definedViteConfig = defineConfig({ // json wrapperWebSocket: path.resolve(__dirname, 'packages/examples/json.html'), browser: path.resolve(__dirname, 'packages/examples/browser.html'), + // langium wrapperStatemachine: path.resolve(__dirname, 'packages/examples/statemachine.html'), wrapperLangium: path.resolve(__dirname, 'packages/examples/langium.html'), + // python python: path.resolve(__dirname, 'packages/examples/python.html'), + // grrovy groovy: path.resolve(__dirname, 'packages/examples/groovy.html'), + // clangd + clangd: path.resolve(__dirname, 'packages/examples/clangd.html'), + // json & python twoLangaugeClients: path.resolve(__dirname, 'packages/examples/two_langauge_clients.html'), @@ -50,7 +60,11 @@ export const definedViteConfig = defineConfig({ }, server: { origin: 'http://localhost:20001', - port: 20001 + port: 20001, + headers: { + 'Cross-Origin-Opener-Policy': 'same-origin', + 'Cross-Origin-Embedder-Policy': 'require-corp', + } }, optimizeDeps: { esbuildOptions: { @@ -68,7 +82,9 @@ export const definedViteConfig = defineConfig({ react(), ], define: { - rootDirectory: JSON.stringify(__dirname) + rootDirectory: JSON.stringify(__dirname), + // Server-provided Content-Length header may be gzipped, get the real size in build time + __WASM_SIZE__: fs.existsSync(clangdWasmLocation) ? fs.statSync(clangdWasmLocation).size : 0 }, worker: { format: 'es' From f4fd13a521155df9617614617ccb4b3c47d16b9e Mon Sep 17 00:00:00 2001 From: Kai Salmen Date: Fri, 23 Aug 2024 16:08:53 +0200 Subject: [PATCH 3/6] Build containers with GHA - Increase clangd timeout to 150 minutes --- .github/workflows/actions.yml | 1 + .github/workflows/ls-clangd.yml | 88 +++++++++++++++++++ .github/workflows/ls-eclipsejdt.yml | 60 +++++++++++++ .github/workflows/ls-groovy.yml | 60 +++++++++++++ README.md | 4 +- packages/examples/package.json | 2 +- .../resources/clangd/build.Dockerfile | 4 +- .../resources/clangd/build.docker-compose.yml | 5 +- .../resources/clangd/configure.Dockerfile | 2 +- .../clangd/configure.docker-compose.yml | 5 +- .../clangd/scripts/extractDockerFiles.ts | 29 +++--- .../resources/eclipse.jdt.ls/Dockerfile | 6 +- .../eclipse.jdt.ls/docker-compose.yml | 3 +- packages/examples/resources/groovy/Dockerfile | 6 +- .../resources/groovy/docker-compose.yml | 3 +- 15 files changed, 252 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/ls-clangd.yml create mode 100644 .github/workflows/ls-eclipsejdt.yml create mode 100644 .github/workflows/ls-groovy.yml diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 5e0875740..de01ab9c0 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -9,6 +9,7 @@ on: pull_request: branches: - main + workflow_dispatch: jobs: build: diff --git a/.github/workflows/ls-clangd.yml b/.github/workflows/ls-clangd.yml new file mode 100644 index 000000000..106952425 --- /dev/null +++ b/.github/workflows/ls-clangd.yml @@ -0,0 +1,88 @@ +name: Clangd LS Image + +on: + workflow_dispatch: + +env: + REGISTRY: ghcr.io + REPO_NAME: ${{ github.repository }} + PATH_CONTEXT: ./packages/examples/resources/clangd + CONTAINER_NAME_CONFIGURE: clangd-wasm-configure + CONTAINER_NAME_BUILD: clangd-wasm-build + +jobs: + images-clangd-wasm: + name: Build & Deploy Clangd LS + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + attestations: write + id-token: write + + timeout-minutes: 150 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (configure) + id: meta_configure + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.REGISTRY }}/${{ env.REPO_NAME }}/${{ env.CONTAINER_NAME_CONFIGURE }} + # enforce latest tag for now + tags: | + type=raw,value=latest + + - name: Build & Push (configure) + id: push_configure + uses: docker/build-push-action@v6 + with: + context: ${{ env.PATH_CONTEXT }} + file: ${{ env.PATH_CONTEXT }}/configure.Dockerfile + push: true + tags: ${{ steps.meta_configure.outputs.tags }} + labels: ${{ steps.meta_configure.outputs.labels }} + + - name: Attest (configure) + uses: actions/attest-build-provenance@v1 + with: + subject-name: ${{ env.REGISTRY }}/${{ env.REPO_NAME }}/${{ env.CONTAINER_NAME_CONFIGURE }} + subject-digest: ${{ steps.push_configure.outputs.digest }} + push-to-registry: true + + - name: Extract metadata (build) + id: meta_build + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.REGISTRY }}/${{ env.REPO_NAME }}/${{ env.CONTAINER_NAME_BUILD }} + # enforce latest tag for now + tags: | + type=raw,value=latest + + - name: Build & Push (build) + id: push_build + uses: docker/build-push-action@v6 + with: + context: ${{ env.PATH_CONTEXT }} + file: ${{ env.PATH_CONTEXT }}/build.Dockerfile + push: true + tags: ${{ steps.meta_build.outputs.tags }} + labels: ${{ steps.meta_build.outputs.labels }} + + - name: Attest (build) + uses: actions/attest-build-provenance@v1 + with: + subject-name: ${{ env.REGISTRY }}/${{ env.REPO_NAME }}/${{ env.CONTAINER_NAME_BUILD }} + subject-digest: ${{ steps.push_build.outputs.digest }} + push-to-registry: true diff --git a/.github/workflows/ls-eclipsejdt.yml b/.github/workflows/ls-eclipsejdt.yml new file mode 100644 index 000000000..6de9068e4 --- /dev/null +++ b/.github/workflows/ls-eclipsejdt.yml @@ -0,0 +1,60 @@ +name: Eclipse JDT LS Image + +on: + workflow_dispatch: + +env: + REGISTRY: ghcr.io + REPO_NAME: ${{ github.repository }} + PATH_CONTEXT: ./packages/examples/resources/eclipse.jdt.ls + CONTAINER_NAME: eclipse.jdt.ls + +jobs: + image-eclipsejdtls: + name: Build & Deploy Eclipse JDT LS + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + attestations: write + id-token: write + + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.REGISTRY }}/${{ env.REPO_NAME }}/${{ env.CONTAINER_NAME }} + # enforce latest tag for now + tags: | + type=raw,value=latest + + - name: Build & Push + id: push + uses: docker/build-push-action@v6 + with: + context: . + file: ${{ env.PATH_CONTEXT }}/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Attest + uses: actions/attest-build-provenance@v1 + with: + subject-name: ${{ env.REGISTRY }}/${{ env.REPO_NAME }}/${{ env.CONTAINER_NAME }} + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true diff --git a/.github/workflows/ls-groovy.yml b/.github/workflows/ls-groovy.yml new file mode 100644 index 000000000..f8d28e915 --- /dev/null +++ b/.github/workflows/ls-groovy.yml @@ -0,0 +1,60 @@ +name: Groovy LS Image + +on: + workflow_dispatch: + +env: + REGISTRY: ghcr.io + REPO_NAME: ${{ github.repository }} + PATH_CONTEXT: ./packages/examples/resources/groovy + CONTAINER_NAME: groovy.ls + +jobs: + image-groovyls: + name: Build & Deploy Groovy LS + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + attestations: write + id-token: write + + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ${{ env.REGISTRY }}/${{ env.REPO_NAME }}/${{ env.CONTAINER_NAME }} + # enforce latest tag for now + tags: | + type=raw,value=latest + + - name: Build & Push + id: push + uses: docker/build-push-action@v6 + with: + context: . + file: ${{ env.PATH_CONTEXT }}/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Attest + uses: actions/attest-build-provenance@v1 + with: + subject-name: ${{ env.REGISTRY }}/${{ env.REPO_NAME }}/${{ env.CONTAINER_NAME }} + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true diff --git a/README.md b/README.md index 8680e944a..394af1c68 100644 --- a/README.md +++ b/README.md @@ -183,11 +183,11 @@ npm run start:example:server:python ##### Groovy Language Server -For the **groovy-client** example you need to ensure the **groovy-server** example is running. You require **docker-compose** which does not require any manual setup (OpenJDK / Gradle). From the project root run `docker-compose -f ./packages/examples/resources/groovy/docker-compose.yml up -d`. First start up will take longer as the container is built. Use `docker-compose -f ./packages/examples/resources/groovy/docker-compose.yml down` to stop it. +For the **groovy-client** example you need to ensure the **groovy-server** example is running. You require **docker-compose** which does not require any manual setup (OpenJDK / Gradle). From the project root run `docker-compose -f ./packages/examples/resources/groovy/docker-compose.yml up -d`. First start up will take longer as the container is downloaded from GitHub's container registry. Use `docker-compose -f ./packages/examples/resources/groovy/docker-compose.yml down` to stop it. ##### Java Language Server -For the **java-client** example you need to ensure the **java-server** example is running. You require **docker-compose** which does not require any manual setup (OpenJDK / Eclipse JDT LS). From the project root run `docker-compose -f ./packages/examples/resources/eclipse.jdt.ls/docker-compose.yml up -d`. First start up will take longer as the container is built. Use `docker-compose -f ./packages/examples/resources/eclipse.jdt.ls/docker-compose.yml down` to stop it. +For the **java-client** example you need to ensure the **java-server** example is running. You require **docker-compose** which does not require any manual setup (OpenJDK / Eclipse JDT LS). From the project root run `docker-compose -f ./packages/examples/resources/eclipse.jdt.ls/docker-compose.yml up -d`. First start up will take longer as the container is downloaded from GitHub's container registry. Use `docker-compose -f ./packages/examples/resources/eclipse.jdt.ls/docker-compose.yml down` to stop it. ### Verification Examples & Usage diff --git a/packages/examples/package.json b/packages/examples/package.json index e8160c61e..bc41fabf5 100644 --- a/packages/examples/package.json +++ b/packages/examples/package.json @@ -116,7 +116,7 @@ "compile": "tsc --build tsconfig.src.json", "resources:download": "vite-node ./build/downloadResources.mts", "build:msg": "echo Building main examples:", - "build": "npm run build:msg && npm run clean && npm run resources:download && npm run compile", + "build": "npm run build:msg && npm run clean && npm run resources:download && npm run extract:docker && npm run compile", "build:bundle": "vite --config vite.bundle.config.ts build", "start:server:json": "vite-node src/json/server/direct.ts", "start:server:python": "vite-node src/python/server/direct.ts", diff --git a/packages/examples/resources/clangd/build.Dockerfile b/packages/examples/resources/clangd/build.Dockerfile index e736c1359..8f50c8ed6 100644 --- a/packages/examples/resources/clangd/build.Dockerfile +++ b/packages/examples/resources/clangd/build.Dockerfile @@ -1,6 +1,6 @@ -FROM clangd-clangd-configure +FROM ghcr.io/typefox/monaco-languageclient/clangd-wasm-configure:latest COPY build-docker.sh /builder/build-docker.sh COPY wait_stdin.patch /builder/wait_stdin.patch -RUN (cd /builder; ./build-docker.sh) +RUN (cd /builder; bash ./build-docker.sh) diff --git a/packages/examples/resources/clangd/build.docker-compose.yml b/packages/examples/resources/clangd/build.docker-compose.yml index 9c3626172..2bc2595cb 100644 --- a/packages/examples/resources/clangd/build.docker-compose.yml +++ b/packages/examples/resources/clangd/build.docker-compose.yml @@ -1,5 +1,6 @@ services: - clangd-build: + clangd-wasm-build: + image: ghcr.io/typefox/monaco-languageclient/clangd-wasm-build:latest build: dockerfile: ./build.Dockerfile context: . @@ -7,4 +8,4 @@ services: platforms: - "linux/amd64" platform: linux/amd64 - container_name: clangd-build + container_name: clangd-wasm-build diff --git a/packages/examples/resources/clangd/configure.Dockerfile b/packages/examples/resources/clangd/configure.Dockerfile index a4d5a5e57..fcdf677ed 100644 --- a/packages/examples/resources/clangd/configure.Dockerfile +++ b/packages/examples/resources/clangd/configure.Dockerfile @@ -15,4 +15,4 @@ RUN volta install node \ RUN mkdir /builder COPY configure-docker.sh /builder/configure-docker.sh -RUN (cd /builder; ./configure-docker.sh) +RUN (cd /builder; bash ./configure-docker.sh) diff --git a/packages/examples/resources/clangd/configure.docker-compose.yml b/packages/examples/resources/clangd/configure.docker-compose.yml index 0c6299ad9..33c84b044 100644 --- a/packages/examples/resources/clangd/configure.docker-compose.yml +++ b/packages/examples/resources/clangd/configure.docker-compose.yml @@ -1,5 +1,6 @@ services: - clangd-configure: + clangd-wasm-configure: + image: ghcr.io/typefox/monaco-languageclient/clangd-wasm-configure:latest build: dockerfile: ./configure.Dockerfile context: . @@ -7,4 +8,4 @@ services: platforms: - "linux/amd64" platform: linux/amd64 - container_name: clangd-configure + container_name: clangd-wasm-configure diff --git a/packages/examples/resources/clangd/scripts/extractDockerFiles.ts b/packages/examples/resources/clangd/scripts/extractDockerFiles.ts index a4c44a03f..490e8b052 100644 --- a/packages/examples/resources/clangd/scripts/extractDockerFiles.ts +++ b/packages/examples/resources/clangd/scripts/extractDockerFiles.ts @@ -3,16 +3,21 @@ import child_process from "node:child_process"; const outputDir = './resources/clangd/wasm'; -// clean always -fs.rmSync(outputDir, { - force: true, - recursive: true -}); -fs.mkdirSync(outputDir); +try { + child_process.execFileSync('docker', ['create', '--name', 'extract-clangd', 'ghcr.io/typefox/monaco-languageclient/clangd-wasm-build:latest']); -child_process.execFileSync('docker', ['create', '--name', 'extract-clangd', 'clangd-clangd-build']); -child_process.execFileSync('docker', ['cp', 'extract-clangd:/builder/llvm-project/build/bin/clangd.js', outputDir]); -child_process.execFileSync('docker', ['cp', 'extract-clangd:/builder/llvm-project/build/bin/clangd.wasm', outputDir]); -child_process.execFileSync('docker', ['cp', 'extract-clangd:/builder/llvm-project/build/bin/clangd.worker.js', outputDir]); -child_process.execFileSync('docker', ['cp', 'extract-clangd:/builder/llvm-project/build/bin/clangd.worker.mjs', outputDir]); -child_process.execFileSync('docker', ['rm', 'extract-clangd']); + // clean but only if container start was successful + fs.rmSync(outputDir, { + force: true, + recursive: true + }); + fs.mkdirSync(outputDir); + + child_process.execFileSync('docker', ['cp', 'extract-clangd:/builder/llvm-project/build/bin/clangd.js', outputDir]); + child_process.execFileSync('docker', ['cp', 'extract-clangd:/builder/llvm-project/build/bin/clangd.wasm', outputDir]); + child_process.execFileSync('docker', ['cp', 'extract-clangd:/builder/llvm-project/build/bin/clangd.worker.js', outputDir]); + child_process.execFileSync('docker', ['cp', 'extract-clangd:/builder/llvm-project/build/bin/clangd.worker.mjs', outputDir]); + child_process.execFileSync('docker', ['rm', 'extract-clangd']); +} catch (e) { + console.warn('Clangd wasm data was not extracted from container image!'); +} diff --git a/packages/examples/resources/eclipse.jdt.ls/Dockerfile b/packages/examples/resources/eclipse.jdt.ls/Dockerfile index 963718594..f647ff292 100644 --- a/packages/examples/resources/eclipse.jdt.ls/Dockerfile +++ b/packages/examples/resources/eclipse.jdt.ls/Dockerfile @@ -21,6 +21,10 @@ RUN mkdir -p ${PATH_MLC} # copy repo content COPY ./ ${PATH_MLC} +RUN cd ${PATH_MLC} \ + && npm i \ + && npm run build + # download and extract Eclipse JDT LS in target folder RUN mkdir -p ${PATH_ECLIPSE_JDT} \ && cd ${PATH_ECLIPSE_JDT} \ @@ -29,4 +33,4 @@ RUN mkdir -p ${PATH_ECLIPSE_JDT} \ WORKDIR ${PATH_MLC} -CMD ["/bin/bash", "npm i && npm run start:example:server:jdtls"] +CMD ["/bin/bash", "npm run start:example:server:jdtls"] diff --git a/packages/examples/resources/eclipse.jdt.ls/docker-compose.yml b/packages/examples/resources/eclipse.jdt.ls/docker-compose.yml index 6d18ee918..a8d9b28f1 100644 --- a/packages/examples/resources/eclipse.jdt.ls/docker-compose.yml +++ b/packages/examples/resources/eclipse.jdt.ls/docker-compose.yml @@ -1,5 +1,6 @@ services: eclipsejdtls: + image: ghcr.io/typefox/monaco-languageclient/eclipse.jdt.ls:latest build: dockerfile: ./packages/examples/resources/eclipse.jdt.ls/Dockerfile context: ../../../.. @@ -10,7 +11,7 @@ services: # - "linux/arm64" platform: linux/amd64 command: [ - "bash", "-c", "npm i && npm run start:example:server:jdtls" + "bash", "-c", "npm run start:example:server:jdtls" ] ports: - 30003:30003 diff --git a/packages/examples/resources/groovy/Dockerfile b/packages/examples/resources/groovy/Dockerfile index 8b88f6033..89757304c 100644 --- a/packages/examples/resources/groovy/Dockerfile +++ b/packages/examples/resources/groovy/Dockerfile @@ -29,10 +29,14 @@ RUN cd ${HOME_DIR} \ # copy repo content COPY ./ ${PATH_MLC} +RUN cd ${PATH_MLC} \ + && npm i \ + && npm run build + # copy language server to target RUN mkdir -p ${PATH_GROOVY_JAR} \ && cp ${PATH_GLS}/build/libs/groovy-language-server-all.jar ${PATH_GROOVY_JAR} WORKDIR ${PATH_MLC} -CMD ["/bin/bash", "npm i && npm run start:example:server:groovy"] +CMD ["/bin/bash", "npm run start:example:server:groovy"] diff --git a/packages/examples/resources/groovy/docker-compose.yml b/packages/examples/resources/groovy/docker-compose.yml index 0ba6691d4..70cc7c8bf 100644 --- a/packages/examples/resources/groovy/docker-compose.yml +++ b/packages/examples/resources/groovy/docker-compose.yml @@ -1,5 +1,6 @@ services: groovyls: + image: ghcr.io/typefox/monaco-languageclient/groovy.ls:latest build: dockerfile: ./packages/examples/resources/groovy/Dockerfile context: ../../../.. @@ -10,7 +11,7 @@ services: # - "linux/arm64" platform: linux/amd64 command: [ - "bash", "-c", "npm i && npm run start:example:server:groovy" + "bash", "-c", "npm run start:example:server:groovy" ] ports: - 30002:30002 From 8531e4e115c8d7ecbf795569fd18038254b791d5 Mon Sep 17 00:00:00 2001 From: Kai Salmen Date: Wed, 23 Oct 2024 14:03:28 +0200 Subject: [PATCH 4/6] clangd improvements - define file system endpoints - clangd LS uses message port for communication - Use wtm new ComChannelEndpoints for handling async communication of message channels or workers - worker transfers files to client via message channel - clangd example: list open files below editor - Prototype: File system related code added to monaco-languageclient/fs --- README.md | 5 + package-lock.json | 17 +- packages/client/CHANGELOG.md | 1 + packages/client/package.json | 7 + packages/client/src/fs/definitions.ts | 127 + .../src/fs/endpoints/defaultEndpoint.ts | 60 + packages/client/src/fs/index.ts | 7 + .../test/fs/endpoints/emptyEndpoint.test.ts | 58 + packages/examples/CHANGELOG.md | 4 + packages/examples/clangd.html | 7 +- packages/examples/package.json | 4 +- .../resources/clangd/clangd-include.files.md | 6399 +++++++++++++++++ .../resources/clangd/workspace/.clangd | 16 + .../resources/clangd/workspace/hello.cpp | 6 + .../clangd/workspace}/tester.h | 0 packages/examples/src/clangd/client/config.ts | 67 +- packages/examples/src/clangd/client/hello.cpp | 9 - packages/examples/src/clangd/client/main.ts | 124 +- .../client/mainRemoteMessageChannelFs.ts | 89 + .../src/clangd/client/workerHandler.ts | 65 + packages/examples/src/clangd/definitions.ts | 8 - .../src/clangd/worker/clangd-server.ts | 354 +- .../examples/src/clangd/worker/memfs-tools.ts | 43 + packages/examples/src/clangd/worker/server.ts | 29 - .../worker/workerRemoteMessageChannelFs.ts | 113 + tsconfig.json | 3 +- 26 files changed, 7375 insertions(+), 247 deletions(-) create mode 100644 packages/client/src/fs/definitions.ts create mode 100644 packages/client/src/fs/endpoints/defaultEndpoint.ts create mode 100644 packages/client/src/fs/index.ts create mode 100644 packages/client/test/fs/endpoints/emptyEndpoint.test.ts create mode 100644 packages/examples/resources/clangd/clangd-include.files.md create mode 100644 packages/examples/resources/clangd/workspace/.clangd create mode 100644 packages/examples/resources/clangd/workspace/hello.cpp rename packages/examples/{src/clangd/client => resources/clangd/workspace}/tester.h (100%) delete mode 100644 packages/examples/src/clangd/client/hello.cpp create mode 100644 packages/examples/src/clangd/client/mainRemoteMessageChannelFs.ts create mode 100644 packages/examples/src/clangd/client/workerHandler.ts create mode 100644 packages/examples/src/clangd/worker/memfs-tools.ts delete mode 100644 packages/examples/src/clangd/worker/server.ts create mode 100644 packages/examples/src/clangd/worker/workerRemoteMessageChannelFs.ts diff --git a/README.md b/README.md index 394af1c68..577f3786a 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ Click [here](https://www.typefox.io/blog/teaching-the-language-server-protocol-t - [Python Language client and pyright language server example (Location)](#python-language-client-and-pyright-language-server-example-location) - [Groovy Language client and language server example (Location)](#groovy-language-client-and-language-server-example-location) - [Java Language client and language server example (Location)](#java-language-client-and-language-server-example-location) + - [Cpp / Clangd (Location)](#cpp--clangd-location) - [Langium grammar DSL (Location)](#langium-grammar-dsl-location) - [Statemachine DSL (created with Langium) (Location)](#statemachine-dsl-created-with-langium-location) - [bare monaco-languageclient (Location)](#bare-monaco-languageclient-location) @@ -138,6 +139,10 @@ The **java-client** contains the [monaco-editor-wrapper app](./packages/examples Langium examples (here client and server communicate via `vscode-languageserver-protocol/browser` instead of a web socket used in the three examples above +#### Cpp / Clangd ([Location](./packages/examples/src/clangd)) + +It contains both the [language client](./packages/examples/src/clangd/client/main.ts) and the [langauge server (web worker)](./packages/examples/src/clangd/worker/clangd-server.ts). The clangd language server is compiled to wasm so it can be executed in the browser. + #### Langium grammar DSL ([Location](./packages/examples/src/langium/langium-dsl)) It contains both the [language client](./packages/examples/src/langium/langium-dsl/wrapperLangium.ts) and the [langauge server (web worker)](./packages/examples/src/langium/langium-dsl/worker/langium-server.ts). Here you can chose beforehand if the wrapper should be started in classic or extended mode. diff --git a/package-lock.json b/package-lock.json index fcc01a0dd..552201f48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2628,6 +2628,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/emscripten": { + "version": "1.39.13", + "resolved": "https://registry.npmjs.org/@types/emscripten/-/emscripten-1.39.13.tgz", + "integrity": "sha512-cFq+fO/isvhvmuP/+Sl4K4jtU6E23DoivtbO4r50e3odaxAiVdbfSYRDdJ4gCdxx+3aRjhphS5ZMwIH4hFy/Cw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -11434,6 +11441,12 @@ } } }, + "node_modules/wtd-core": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/wtd-core/-/wtd-core-4.0.1.tgz", + "integrity": "sha512-q6sV6Slw47bwlhwbztot0MklWaVzywUAi0wAKWwOuL/LTY4IpVFgoHQ+cnlhG2ZUms/OkJUhyfhsfoHNYkKjzA==", + "license": "MIT" + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -11648,9 +11661,11 @@ "vscode-languageserver": "~9.0.1", "vscode-uri": "~3.0.8", "vscode-ws-jsonrpc": "~3.3.2", - "ws": "~8.18.0" + "ws": "~8.18.0", + "wtd-core": "~4.0.1" }, "devDependencies": { + "@types/emscripten": "~1.39.13", "@types/express": "~5.0.0", "@types/ws": "~8.5.12", "langium-cli": "~3.2.0", diff --git a/packages/client/CHANGELOG.md b/packages/client/CHANGELOG.md index 0cb5a757c..499d42db4 100644 --- a/packages/client/CHANGELOG.md +++ b/packages/client/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to this npm module are documented in this file. ## [9.0.0-next.5] - 2024-10-23 +- Prototype: File system endpoint. - Added `createUrl` to `monaco-languageclient/tools`. Moved it here from `monaco-editor-wrapper`. - Updated to eslint 9 - Support all arguments for monaco-vscode-api `initialize` [#756](https://github.com/TypeFox/monaco-languageclient/pull/756) diff --git a/packages/client/package.json b/packages/client/package.json index d6d2b1507..ac55bb6d5 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -31,6 +31,10 @@ "./vscode/services": { "types": "./lib/vscode/index.d.ts", "default": "./lib/vscode/index.js" + }, + "./fs": { + "types": "./lib/fs/index.d.ts", + "default": "./lib/fs/index.js" } }, "typesVersions": { @@ -43,6 +47,9 @@ ], "vscode/services": [ "lib/vscode/index" + ], + "fs": [ + "lib/fs/index" ] } }, diff --git a/packages/client/src/fs/definitions.ts b/packages/client/src/fs/definitions.ts new file mode 100644 index 000000000..a06a438f0 --- /dev/null +++ b/packages/client/src/fs/definitions.ts @@ -0,0 +1,127 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) 2024 TypeFox and others. + * Licensed under the MIT License. See LICENSE in the package root for license information. + * ------------------------------------------------------------------------------------------ */ + +import { Logger } from 'monaco-languageclient/tools'; + +export interface FileReadRequest { + resourceUri: string +} + +export type FileReadResultStatus = 'success' | 'denied'; + +export interface FileReadRequestResult { + status: FileReadResultStatus + content: string | ArrayBuffer +} + +export interface FileUpdate { + resourceUri: string + content: string | ArrayBuffer +} + +export type FileUpdateResultStatus = 'equal' | 'updated' | 'created' | 'denied'; + +export interface FileUpdateResult { + status: FileUpdateResultStatus + message?: string +} + +export interface DirectoryListingRequest { + directoryUri: string +} + +export interface DirectoryListingRequestResult { + files: string[] +} + +export type StatsRequestType = 'directory' | 'file'; + +export interface StatsRequest { + type: StatsRequestType, + resourceUri: string +} + +export interface StatsRequestResult { + type: StatsRequestType + size: number + name: string + mtime: number +} + +export enum EndpointType { + DRIVER, + FOLLOWER, + LOCAL, + EMPTY +} + +export interface FileSystemCapabilities { + + /** + * Get a text file content + * @param params the resourceUri of the file + * @returns The ReadFileResult containing the content of the file + */ + readFile(params: FileReadRequest): Promise + + /** + * Save a file on the filesystem + * @param params the resourceUri and the content of the file + * @returns The FileUpdateResult containing the result of the operation and an optional message + */ + writeFile(params: FileUpdate): Promise; + + /** + * The implementation has to decide if the file at given uri at need to be updated + * @param params the resourceUri and the content of the file + * @returns The FileUpdateResult containing the result of the operation and an optional message + */ + syncFile(params: FileUpdate): Promise; + + /** + * Get file stats on a given file + * @param params the resourceUri and if a file or a directory is requested + */ + getFileStats(params: StatsRequest): Promise + + /** + * List the files of a directory + * @param resourceUri the Uri of the directory + */ + listFiles(params: DirectoryListingRequest): Promise + +} + +/** + * Defines the APT for a file system endpoint + */ +export interface FileSystemEndpoint extends FileSystemCapabilities { + + /** + * Whatever can't be handled in the constructor should be done here + */ + init?(): void; + + /** + * Set an optional logger + * @param logger the logger implemenation + */ + setLogger?(logger: Logger): void; + + /** + * Get the type of the client + */ + getEndpointType(): EndpointType; + + /** + * Provide info about the file system + */ + getFileSystemInfo(): string; + + /** + * Signal readiness + */ + ready?(): void; +} diff --git a/packages/client/src/fs/endpoints/defaultEndpoint.ts b/packages/client/src/fs/endpoints/defaultEndpoint.ts new file mode 100644 index 000000000..824424d18 --- /dev/null +++ b/packages/client/src/fs/endpoints/defaultEndpoint.ts @@ -0,0 +1,60 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) 2024 TypeFox and others. + * Licensed under the MIT License. See LICENSE in the package root for license information. + * ------------------------------------------------------------------------------------------ */ + +import { Logger } from 'monaco-languageclient/tools'; +import { DirectoryListingRequest, DirectoryListingRequestResult, EndpointType, FileReadRequest, FileReadRequestResult, FileSystemEndpoint, FileUpdate, FileUpdateResult, StatsRequest, StatsRequestResult } from '../definitions.js'; + +export class EmptyFileSystemEndpoint implements FileSystemEndpoint { + + private endpointType: EndpointType; + private logger?: Logger; + + constructor(endpointType: EndpointType) { + this.endpointType = endpointType; + } + + init(): void { } + + getFileSystemInfo(): string { + return 'This file system performs no operations.'; + } + + setLogger(logger: Logger): void { + this.logger = logger; + } + + getEndpointType(): EndpointType { + return this.endpointType; + } + + readFile(params: FileReadRequest): Promise { + this.logger?.info(`Reading file: ${params.resourceUri}`); + return Promise.resolve({ + status: 'denied', + content: '' + }); + } + + writeFile(params: FileUpdate): Promise { + this.logger?.info(`Writing file: ${params.resourceUri}`); + return Promise.resolve({ status: 'denied' }); + } + + syncFile(params: FileUpdate): Promise { + this.logger?.info(`Syncing file: ${params.resourceUri}`); + return Promise.resolve({ status: 'denied' }); + } + + getFileStats(params: StatsRequest): Promise { + this.logger?.info(`Getting file stats for: "${params.resourceUri}" (${params.type})`); + return Promise.reject('No stats available.'); + } + + listFiles(params: DirectoryListingRequest): Promise { + this.logger?.info(`Listing files for directory: "${params.directoryUri}"`); + return Promise.reject('No file listing possible.'); + } + +} diff --git a/packages/client/src/fs/index.ts b/packages/client/src/fs/index.ts new file mode 100644 index 000000000..c3b77aca2 --- /dev/null +++ b/packages/client/src/fs/index.ts @@ -0,0 +1,7 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) 2024 TypeFox and others. + * Licensed under the MIT License. See LICENSE in the package root for license information. + * ------------------------------------------------------------------------------------------ */ + +export * from './definitions.js'; +export * from './endpoints/defaultEndpoint.js'; diff --git a/packages/client/test/fs/endpoints/emptyEndpoint.test.ts b/packages/client/test/fs/endpoints/emptyEndpoint.test.ts new file mode 100644 index 000000000..6696de470 --- /dev/null +++ b/packages/client/test/fs/endpoints/emptyEndpoint.test.ts @@ -0,0 +1,58 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) 2024 TypeFox and others. + * Licensed under the MIT License. See LICENSE in the package root for license information. + * ------------------------------------------------------------------------------------------ */ + +import { describe, expect, test } from 'vitest'; +import { EmptyFileSystemEndpoint, EndpointType } from 'monaco-languageclient/fs'; + +describe('EmptyFileSystemEndpoint Tests', () => { + + const endpoint = new EmptyFileSystemEndpoint(EndpointType.EMPTY); + + test('readFile', async () => { + const result = await endpoint.readFile({ resourceUri: '/tmp/test.js' }); + expect(result).toEqual({ + status: 'denied', + content: '' + }); + }); + + test('writeFile', async () => { + const result = await endpoint.writeFile({ + resourceUri: '/tmp/test.js', + content: 'console.log("Hello World!");' + }); + expect(result).toEqual({ + status: 'denied' + }); + }); + + test('syncFile', async () => { + const result = await endpoint.syncFile({ + resourceUri: '/tmp/test.js', + content: 'console.log("Hello World!");' + }); + expect(result).toEqual({ + status: 'denied' + }); + }); + + test('getFileStats', async () => { + expect(async () => { + await endpoint.getFileStats({ + type: 'file', + resourceUri: '/tmp/test.js' + }); + }).rejects.toThrowError('No stats available.'); + }); + + test('listFiles', async () => { + expect(async () => { + await endpoint.listFiles({ + directoryUri: '/tmp' + }); + }).rejects.toThrowError('No file listing possible.'); + }); + +}); diff --git a/packages/examples/CHANGELOG.md b/packages/examples/CHANGELOG.md index d60e9096d..8a0027511 100644 --- a/packages/examples/CHANGELOG.md +++ b/packages/examples/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this npm module are documented in this file. +## [2024.10.5] - 2024-10-2x + +- Added clangd example. + ## [2024.10.4] - 2024-10-23 - Updated to `monaco-languageclient@9.0.0-next.5`, `monaco-editor-wrapper@6.0.0-next.5` and `@typefox/monaco-editor-react@6.0.0-next.5`. diff --git a/packages/examples/clangd.html b/packages/examples/clangd.html index 905bc23a9..8e955a7e1 100644 --- a/packages/examples/clangd.html +++ b/packages/examples/clangd.html @@ -10,10 +10,13 @@

Cpp Language Client & Clangd Language Server (Worker/Wasm)

- This example has been derived from: clangd-in-browser
+ Heads up: This is a prototype and still evolving.
+ The clangd language server worker has been derived from: clangd-in-browser
-
+ + diff --git a/packages/examples/index.html b/packages/examples/index.html new file mode 100644 index 000000000..150df6036 --- /dev/null +++ b/packages/examples/index.html @@ -0,0 +1,60 @@ + + + + + + + monaco-languageclient Examples + + + + +
+

Examples

+ + This page contains all examples not requiring a backend. + +

Monaco Editor Wrapper

+ +

Langium

+ + Langium Grammar DSL Language Client & Language Server (Worker) +
+ Langium Statemachine Client & Language Server (Worker) +
+ Localizations: + cs - + de - + es - + fr - + it - + ja - + ko - + pl - + pt-br - + qps-ploc - + ru - + tr - + zh-hans - + zh-hant +
+ +

Cpp / Clangd

+ Cpp Language Client & Clangd Language Server (Worker/Wasm) +
+ +

JSON

+ Language Client Pure Browser Example +
+ +

TypeScript

+ TypeScript Extension Host Worker +
+ +

Monaco Editor React

+ React: Langium Statemachine Language Client & Language Server (Worker) +
+
+ + + diff --git a/packages/examples/package.json b/packages/examples/package.json index 3ac399c39..186018acc 100644 --- a/packages/examples/package.json +++ b/packages/examples/package.json @@ -96,8 +96,10 @@ "@types/express": "~5.0.0", "@types/ws": "~8.5.12", "@types/emscripten": "~1.39.13", + "mini-coi": "~0.4.2", "langium-cli": "~3.2.0", "ts-node": "~10.9.1", + "vite-plugin-static-copy": "~2.0.0", "vscode-languageserver-types": "~3.17.5" }, "volta": { @@ -119,12 +121,16 @@ "resources:download": "vite-node ./build/downloadResources.mts", "build:msg": "echo Building main examples:", "build": "npm run build:msg && npm run clean && npm run resources:download && npm run extract:docker && npm run compile", - "build:bundle": "vite --config vite.bundle.config.ts build", "start:server:json": "vite-node src/json/server/direct.ts", "start:server:python": "vite-node src/python/server/direct.ts", "start:server:groovy": "vite-node src/groovy/server/direct.ts", "start:server:jdtls": "vite-node src/eclipse.jdt.ls/server/direct.ts", "langium:generate": "langium generate --file ./src/langium/statemachine/config/langium-config.json", - "extract:docker": "vite-node ./resources/clangd/scripts/extractDockerFiles.ts" + "extract:docker": "vite-node ./resources/clangd/scripts/extractDockerFiles.ts", + "production:clean": "vite-node ../../scripts/clean.ts --relativePath packages/examples --recursive --paths production", + "production:copy:mini-coi": "mini-coi --service-worker production/mini-coi.js", + "production:build": "npm run production:clean && vite --config vite.config.deploy.ts build && npm run production:copy:mini-coi", + "production:preview:build": "npm run production:clean && vite --config vite.config.preview.ts build && npm run production:copy:mini-coi", + "production:preview": "vite --config vite.config.preview.ts preview -d" } } diff --git a/packages/examples/src/clangd/worker/clangd-server.ts b/packages/examples/src/clangd/worker/clangd-server.ts index 0bab4b379..db0bcd2ce 100644 --- a/packages/examples/src/clangd/worker/clangd-server.ts +++ b/packages/examples/src/clangd/worker/clangd-server.ts @@ -66,7 +66,7 @@ export class ClangdInteractionWorker implements ComRouter { private async runClangdLanguageServer() { const clangdWasmUrl = new URL('../../../resources/clangd/wasm/clangd.wasm', import.meta.url); const clangdJsUrl = new URL('../../../resources/clangd/wasm/clangd.js', import.meta.url); - const jsModule = import( /* @vite-ignore */ `${clangdJsUrl}`); + const jsModule = import(`${clangdJsUrl}`); // Pre-fetch wasm, and report progress to main const wasmResponse = await fetch(clangdWasmUrl); diff --git a/packages/examples/src/langium/statemachine/launcher.ts b/packages/examples/src/langium/statemachine/launcher.ts index 61065b6f3..858efad31 100644 --- a/packages/examples/src/langium/statemachine/launcher.ts +++ b/packages/examples/src/langium/statemachine/launcher.ts @@ -3,6 +3,8 @@ * Licensed under the MIT License. See LICENSE in the package root for license information. * ------------------------------------------------------------------------------------------ */ -const { runStatemachineWrapper } = await import('./main.js'); +import { initLocaleLoader } from 'monaco-editor-wrapper/vscode/locale'; +await initLocaleLoader(); +const { runStatemachineWrapper } = await import('./main.js'); runStatemachineWrapper(); diff --git a/packages/examples/src/vite-env.d.ts b/packages/examples/src/vite-env.d.ts index 3fef01158..ca0077c82 100644 --- a/packages/examples/src/vite-env.d.ts +++ b/packages/examples/src/vite-env.d.ts @@ -5,8 +5,6 @@ /// -declare const __WASM_SIZE__: number; - declare module '*?raw' { const content: string; export default content; diff --git a/packages/examples/statemachine.html b/packages/examples/statemachine.html index 7daf75de8..bfd113059 100644 --- a/packages/examples/statemachine.html +++ b/packages/examples/statemachine.html @@ -14,11 +14,7 @@

Langium Statemachine Client & Language Server (Worker)

- + diff --git a/packages/examples/ts.html b/packages/examples/tsExtHost.html similarity index 100% rename from packages/examples/ts.html rename to packages/examples/tsExtHost.html diff --git a/packages/examples/vite.bundle.config.ts b/packages/examples/vite.bundle.config.ts deleted file mode 100644 index e75875cb3..000000000 --- a/packages/examples/vite.bundle.config.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* -------------------------------------------------------------------------------------------- - * Copyright (c) 2024 TypeFox and others. - * Licensed under the MIT License. See LICENSE in the package root for license information. - * ------------------------------------------------------------------------------------------ */ - -import path from 'node:path'; -import { defineConfig } from 'vite'; - -export default defineConfig({ - build: { - lib: { - entry: path.resolve(__dirname, 'src/index.ts'), - name: 'examples-bundle-test', - fileName: () => 'index.js', - formats: ['es'] - }, - outDir: 'bundle', - assetsDir: 'bundle/assets', - emptyOutDir: true, - cssCodeSplit: false, - sourcemap: true, - rollupOptions: { - output: { - name: 'examples-bundle-test', - exports: 'named', - assetFileNames: (assetInfo) => { - return `assets/${assetInfo.name}`; - } - } - } - } -}); diff --git a/packages/examples/vite.config.deploy.ts b/packages/examples/vite.config.deploy.ts new file mode 100644 index 000000000..a95d324be --- /dev/null +++ b/packages/examples/vite.config.deploy.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'vite'; +import { buildBaseProductionConfig } from './vite.production.base.js'; + +export default defineConfig(({ command }) => { + console.log(`Running: ${command}`); + const productionConfig = buildBaseProductionConfig(); + productionConfig.base = 'https://typefox.github.io/monaco-languageclient/'; + return productionConfig; +}); + diff --git a/packages/examples/vite.config.preview.ts b/packages/examples/vite.config.preview.ts new file mode 100644 index 000000000..3fc3545ff --- /dev/null +++ b/packages/examples/vite.config.preview.ts @@ -0,0 +1,20 @@ +import { defineConfig } from 'vite'; +import { buildBaseProductionConfig } from './vite.production.base.js'; + +export default defineConfig(({ command }) => { + console.log(`Running: ${command}`); + const productionConfig = buildBaseProductionConfig(); + productionConfig.base = 'http://localhost:20002/'; + productionConfig.preview = { + port: 20002, + cors: { + origin: '*' + }, + headers: { + 'Cross-Origin-Opener-Policy': 'same-origin', + 'Cross-Origin-Embedder-Policy': 'require-corp' + } + }; + return productionConfig; +}); + diff --git a/packages/examples/vite.production.base.ts b/packages/examples/vite.production.base.ts new file mode 100644 index 000000000..114c2e33d --- /dev/null +++ b/packages/examples/vite.production.base.ts @@ -0,0 +1,47 @@ +import { UserConfig } from 'vite'; +import vsixPlugin from '@codingame/monaco-vscode-rollup-vsix-plugin'; +import { viteStaticCopy } from 'vite-plugin-static-copy'; +import path from 'path'; + +export const buildBaseProductionConfig: () => UserConfig = () => { + return { + build: { + target: 'esnext', + rollupOptions: { + input: { + index: path.resolve(__dirname, 'index.html'), + browser: path.resolve(__dirname, 'browser.html'), + langium: path.resolve(__dirname, 'langium.html'), + statemachine: path.resolve(__dirname, 'statemachine.html'), + clangd: path.resolve(__dirname, 'clangd.html'), + reactStatemachine: path.resolve(__dirname, 'react_statemachine.html'), + tsExtHost: path.resolve(__dirname, 'tsExtHost.html') + } + }, + emptyOutDir: false, + assetsInlineLimit: 0, + outDir: path.resolve(__dirname, 'production') + }, + plugins: [ + vsixPlugin(), + viteStaticCopy({ + targets: [ + { + src: 'resources/clangd/wasm/clangd.js', + dest: 'assets' + }, + { + src: 'resources/clangd/wasm/clangd.worker.mjs', + dest: 'assets' + } + ] + }) + ], + worker: { + format: 'es' + }, + esbuild: { + minifySyntax: false + } + }; +} diff --git a/packages/wrapper/src/vscode/localeLoader.ts b/packages/wrapper/src/vscode/localeLoader.ts index af727c740..988ed4c79 100644 --- a/packages/wrapper/src/vscode/localeLoader.ts +++ b/packages/wrapper/src/vscode/localeLoader.ts @@ -50,7 +50,7 @@ const localeLoader: Partial Promise>> = { export const locales = Object.keys(localeLoader); -export const initLocaleLoader = async (urlToImport?: string, locale = new URLSearchParams(window.location.search).get('locale')) => { +export const initLocaleLoader = async (locale = new URLSearchParams(window.location.search).get('locale')) => { if (locale !== null) { const loader = localeLoader[locale]; if (loader) { @@ -59,7 +59,4 @@ export const initLocaleLoader = async (urlToImport?: string, locale = new URLSea console.error(`Unknown locale ${locale}`); } } - if (urlToImport !== undefined) { - void import(urlToImport); - } }; diff --git a/vite.config.ts b/vite.config.ts index c6db83cf9..27e80b7da 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -24,12 +24,12 @@ export const definedViteConfig = defineConfig({ // monaco-editor-wrapper // json - wrapperWebSocket: path.resolve(__dirname, 'packages/examples/json.html'), + json: path.resolve(__dirname, 'packages/examples/json.html'), browser: path.resolve(__dirname, 'packages/examples/browser.html'), // langium - wrapperStatemachine: path.resolve(__dirname, 'packages/examples/statemachine.html'), - wrapperLangium: path.resolve(__dirname, 'packages/examples/langium.html'), + langium: path.resolve(__dirname, 'packages/examples/langium.html'), + statemachine: path.resolve(__dirname, 'packages/examples/statemachine.html'), // python python: path.resolve(__dirname, 'packages/examples/python.html'), @@ -50,7 +50,7 @@ export const definedViteConfig = defineConfig({ reactPython: path.resolve(__dirname, 'packages/examples/react_python.html'), // other examples - wrapperTs: path.resolve(__dirname, 'packages/examples/ts.html') + tsExtHost: path.resolve(__dirname, 'packages/examples/ts.html') } } }, From 48fa75909c790845aa2432288e95a1db8000a2ee Mon Sep 17 00:00:00 2001 From: Kai Salmen Date: Wed, 23 Oct 2024 15:05:33 +0200 Subject: [PATCH 6/6] Move all code example files out of src into resources, plus small corrections --- index.html | 2 +- .../langium/langium-dsl}/example.langium | 0 .../langium/statemachine}/example-mod.statemachine | 0 .../langium/statemachine}/example.statemachine | 0 .../{src/python/client => resources/python}/bad.py | 0 .../{src/python/client => resources/python}/hello.py | 0 .../{src/python/client => resources/python}/hello2.py | 0 .../src/langium/langium-dsl/config/classicConfig.ts | 5 +---- .../src/langium/langium-dsl/config/extendedConfig.ts | 8 +++----- .../statemachine/config/wrapperStatemachineConfig.ts | 2 +- packages/examples/src/langium/statemachine/main-react.tsx | 2 +- packages/examples/src/langium/statemachine/main.ts | 4 ++-- packages/examples/src/python/client/config.ts | 3 --- packages/examples/src/python/client/main.ts | 4 ++-- packages/examples/src/python/client/reactPython.tsx | 2 +- packages/examples/src/ts/wrapperTs.ts | 1 - packages/examples/tsExtHost.html | 4 ++-- 17 files changed, 14 insertions(+), 23 deletions(-) rename packages/examples/{src/langium/langium-dsl/content => resources/langium/langium-dsl}/example.langium (100%) rename packages/examples/{src/langium/statemachine/content => resources/langium/statemachine}/example-mod.statemachine (100%) rename packages/examples/{src/langium/statemachine/content => resources/langium/statemachine}/example.statemachine (100%) rename packages/examples/{src/python/client => resources/python}/bad.py (100%) rename packages/examples/{src/python/client => resources/python}/hello.py (100%) rename packages/examples/{src/python/client => resources/python}/hello2.py (100%) diff --git a/index.html b/index.html index c1dbd2368..a18c8ef08 100644 --- a/index.html +++ b/index.html @@ -79,7 +79,7 @@

Multiple Languageclients


TypeScript

- TypeScript Extension Host Worker + TypeScript Extension Host Worker

Monaco Editor React

diff --git a/packages/examples/src/langium/langium-dsl/content/example.langium b/packages/examples/resources/langium/langium-dsl/example.langium similarity index 100% rename from packages/examples/src/langium/langium-dsl/content/example.langium rename to packages/examples/resources/langium/langium-dsl/example.langium diff --git a/packages/examples/src/langium/statemachine/content/example-mod.statemachine b/packages/examples/resources/langium/statemachine/example-mod.statemachine similarity index 100% rename from packages/examples/src/langium/statemachine/content/example-mod.statemachine rename to packages/examples/resources/langium/statemachine/example-mod.statemachine diff --git a/packages/examples/src/langium/statemachine/content/example.statemachine b/packages/examples/resources/langium/statemachine/example.statemachine similarity index 100% rename from packages/examples/src/langium/statemachine/content/example.statemachine rename to packages/examples/resources/langium/statemachine/example.statemachine diff --git a/packages/examples/src/python/client/bad.py b/packages/examples/resources/python/bad.py similarity index 100% rename from packages/examples/src/python/client/bad.py rename to packages/examples/resources/python/bad.py diff --git a/packages/examples/src/python/client/hello.py b/packages/examples/resources/python/hello.py similarity index 100% rename from packages/examples/src/python/client/hello.py rename to packages/examples/resources/python/hello.py diff --git a/packages/examples/src/python/client/hello2.py b/packages/examples/resources/python/hello2.py similarity index 100% rename from packages/examples/src/python/client/hello2.py rename to packages/examples/resources/python/hello2.py diff --git a/packages/examples/src/langium/langium-dsl/config/classicConfig.ts b/packages/examples/src/langium/langium-dsl/config/classicConfig.ts index 54ef2d407..88e5414b6 100644 --- a/packages/examples/src/langium/langium-dsl/config/classicConfig.ts +++ b/packages/examples/src/langium/langium-dsl/config/classicConfig.ts @@ -4,16 +4,14 @@ * ------------------------------------------------------------------------------------------ */ import getConfigurationServiceOverride from '@codingame/monaco-vscode-configuration-service-override'; -import getEditorServiceOverride from '@codingame/monaco-vscode-editor-service-override'; import getKeybindingsServiceOverride from '@codingame/monaco-vscode-keybindings-service-override'; -import { useOpenEditorStub } from 'monaco-editor-wrapper/vscode/services'; import { LogLevel } from 'vscode/services'; import { Logger } from 'monaco-languageclient/tools'; import { WrapperConfig } from 'monaco-editor-wrapper'; import { LangiumMonarchContent } from './langium.monarch.js'; import { loadLangiumWorker } from '../wrapperLangium.js'; -import code from '../content/example.langium?raw'; import { useWorkerFactory } from 'monaco-editor-wrapper/workerFactory'; +import code from '../../../../resources/langium/langium-dsl/example.langium?raw'; export const setupLangiumClientClassic = async (): Promise => { const langiumWorker = loadLangiumWorker(); @@ -22,7 +20,6 @@ export const setupLangiumClientClassic = async (): Promise => { vscodeApiConfig: { userServices: { ...getConfigurationServiceOverride(), - ...getEditorServiceOverride(useOpenEditorStub), ...getKeybindingsServiceOverride() } }, diff --git a/packages/examples/src/langium/langium-dsl/config/extendedConfig.ts b/packages/examples/src/langium/langium-dsl/config/extendedConfig.ts index 1f3ace3c3..da237ff5f 100644 --- a/packages/examples/src/langium/langium-dsl/config/extendedConfig.ts +++ b/packages/examples/src/langium/langium-dsl/config/extendedConfig.ts @@ -3,10 +3,9 @@ * Licensed under the MIT License. See LICENSE in the package root for license information. * ------------------------------------------------------------------------------------------ */ -import getEditorServiceOverride from '@codingame/monaco-vscode-editor-service-override'; import getKeybindingsServiceOverride from '@codingame/monaco-vscode-keybindings-service-override'; import '../../../../resources/vsix/github-vscode-theme.vsix'; -import { useOpenEditorStub } from 'monaco-editor-wrapper/vscode/services'; + import { BrowserMessageReader, BrowserMessageWriter } from 'vscode-languageclient/browser.js'; import { LogLevel } from 'vscode/services'; import { WrapperConfig } from 'monaco-editor-wrapper'; @@ -14,7 +13,7 @@ import { loadLangiumWorker } from '../wrapperLangium.js'; import { configureMonacoWorkers } from '../../../common/client/utils.js'; import langiumLanguageConfig from './langium.configuration.json?raw'; import langiumTextmateGrammar from './langium.tmLanguage.json?raw'; -import text from '../content/example.langium?raw'; +import text from '../../../../resources/langium/langium-dsl//example.langium?raw'; export const setupLangiumClientExtended = async (): Promise => { @@ -31,7 +30,6 @@ export const setupLangiumClientExtended = async (): Promise => { logLevel: LogLevel.Debug, vscodeApiConfig: { userServices: { - ...getEditorServiceOverride(useOpenEditorStub), ...getKeybindingsServiceOverride() }, userConfiguration: { @@ -55,7 +53,7 @@ export const setupLangiumClientExtended = async (): Promise => { extensions: [{ config: { name: 'langium-example', - publisher: 'monaco-editor-wrapper-examples', + publisher: 'TypeFox', version: '1.0.0', engines: { vscode: '*' diff --git a/packages/examples/src/langium/statemachine/config/wrapperStatemachineConfig.ts b/packages/examples/src/langium/statemachine/config/wrapperStatemachineConfig.ts index 85980c9fc..2c60278d3 100644 --- a/packages/examples/src/langium/statemachine/config/wrapperStatemachineConfig.ts +++ b/packages/examples/src/langium/statemachine/config/wrapperStatemachineConfig.ts @@ -76,7 +76,7 @@ export const createLangiumGlobalConfig = async (params: { extensions: [{ config: { name: 'statemachine-example', - publisher: 'monaco-editor-wrapper-examples', + publisher: 'TypeFox', version: '1.0.0', engines: { vscode: '*' diff --git a/packages/examples/src/langium/statemachine/main-react.tsx b/packages/examples/src/langium/statemachine/main-react.tsx index 46120724c..93547c786 100644 --- a/packages/examples/src/langium/statemachine/main-react.tsx +++ b/packages/examples/src/langium/statemachine/main-react.tsx @@ -8,7 +8,7 @@ import ReactDOM from 'react-dom/client'; import { MonacoEditorReactComp } from '@typefox/monaco-editor-react'; import { createLangiumGlobalConfig } from './config/wrapperStatemachineConfig.js'; import { loadStatemachineWorkerRegular } from './main.js'; -import text from './content/example.statemachine?raw'; +import text from '../../../resources/langium/statemachine/example.statemachine?raw'; export const runStatemachineReact = async () => { const wrapperConfig = await createLangiumGlobalConfig({ diff --git a/packages/examples/src/langium/statemachine/main.ts b/packages/examples/src/langium/statemachine/main.ts index 0c6e07024..6a35935ef 100644 --- a/packages/examples/src/langium/statemachine/main.ts +++ b/packages/examples/src/langium/statemachine/main.ts @@ -10,8 +10,8 @@ import { BrowserMessageReader, BrowserMessageWriter } from 'vscode-languageclien import { createLangiumGlobalConfig } from './config/wrapperStatemachineConfig.js'; import workerUrl from './worker/statemachine-server?worker&url'; import workerPortUrl from './worker/statemachine-server-port?worker&url'; -import text from './content/example.statemachine?raw'; -import textMod from './content/example-mod.statemachine?raw'; +import text from '../../../resources/langium/statemachine/example.statemachine?raw'; +import textMod from '../../../resources/langium/statemachine/example-mod.statemachine?raw'; const wrapper = new MonacoEditorLanguageClientWrapper(); const wrapper2 = new MonacoEditorLanguageClientWrapper(); diff --git a/packages/examples/src/python/client/config.ts b/packages/examples/src/python/client/config.ts index 29c253e02..8c7a54301 100644 --- a/packages/examples/src/python/client/config.ts +++ b/packages/examples/src/python/client/config.ts @@ -4,14 +4,12 @@ * ------------------------------------------------------------------------------------------ */ import * as vscode from 'vscode'; -import getEditorServiceOverride from '@codingame/monaco-vscode-editor-service-override'; import getKeybindingsServiceOverride from '@codingame/monaco-vscode-keybindings-service-override'; import '@codingame/monaco-vscode-python-default-extension'; import { LogLevel } from 'vscode/services'; import { MonacoLanguageClient } from 'monaco-languageclient'; import { createUrl } from 'monaco-languageclient/tools'; import { WrapperConfig } from 'monaco-editor-wrapper'; -import { useOpenEditorStub } from 'monaco-editor-wrapper/vscode/services'; import { toSocket, WebSocketMessageReader, WebSocketMessageWriter } from 'vscode-ws-jsonrpc'; import { configureMonacoWorkers } from '../../common/client/utils.js'; @@ -67,7 +65,6 @@ export const createUserConfig = (workspaceRoot: string, code: string, codeUri: s logLevel: LogLevel.Debug, vscodeApiConfig: { userServices: { - ...getEditorServiceOverride(useOpenEditorStub), ...getKeybindingsServiceOverride() }, userConfiguration: { diff --git a/packages/examples/src/python/client/main.ts b/packages/examples/src/python/client/main.ts index b63897b71..3b6c6c6d7 100644 --- a/packages/examples/src/python/client/main.ts +++ b/packages/examples/src/python/client/main.ts @@ -9,8 +9,8 @@ import '@codingame/monaco-vscode-python-default-extension'; import { RegisteredFileSystemProvider, registerFileSystemOverlay, RegisteredMemoryFile } from '@codingame/monaco-vscode-files-service-override'; import { MonacoEditorLanguageClientWrapper } from 'monaco-editor-wrapper'; import { createUserConfig } from './config.js'; -import helloPyCode from './hello.py?raw'; -import hello2PyCode from './hello2.py?raw'; +import helloPyCode from '../../../resources/python/hello.py?raw'; +import hello2PyCode from '../../../resources/python/hello2.py?raw'; export const runPythonWrapper = async () => { const helloPyUri = vscode.Uri.file('/workspace/hello.py'); diff --git a/packages/examples/src/python/client/reactPython.tsx b/packages/examples/src/python/client/reactPython.tsx index a43b6258d..77c961653 100644 --- a/packages/examples/src/python/client/reactPython.tsx +++ b/packages/examples/src/python/client/reactPython.tsx @@ -10,7 +10,7 @@ import ReactDOM from 'react-dom/client'; import { MonacoEditorReactComp } from '@typefox/monaco-editor-react'; import { MonacoEditorLanguageClientWrapper, TextChanges } from 'monaco-editor-wrapper'; import { createUserConfig } from './config.js'; -import badPyCode from './bad.py?raw'; +import badPyCode from '../../../resources/python/bad.py?raw'; export const runPythonReact = async () => { const badPyUri = vscode.Uri.file('/workspace/bad.py'); diff --git a/packages/examples/src/ts/wrapperTs.ts b/packages/examples/src/ts/wrapperTs.ts index 79d2c3161..1e8cdca56 100644 --- a/packages/examples/src/ts/wrapperTs.ts +++ b/packages/examples/src/ts/wrapperTs.ts @@ -5,7 +5,6 @@ import * as vscode from 'vscode'; import getKeybindingsServiceOverride from '@codingame/monaco-vscode-keybindings-service-override'; -import '@codingame/monaco-vscode-theme-defaults-default-extension'; import '@codingame/monaco-vscode-typescript-basics-default-extension'; import '@codingame/monaco-vscode-typescript-language-features-default-extension'; import { LogLevel } from 'vscode/services'; diff --git a/packages/examples/tsExtHost.html b/packages/examples/tsExtHost.html index bae94b2d6..2dc5fb760 100644 --- a/packages/examples/tsExtHost.html +++ b/packages/examples/tsExtHost.html @@ -4,12 +4,12 @@ - Monaco Editor Wrapper TypeScript Example + TypeScript Extension Host Worker -

Monaco Editor Wrapper TypeScript Example

+

TypeScript Extension Host Worker