diff --git a/.ncurc.json b/.ncurc.json index 91219d68..af331494 100644 --- a/.ncurc.json +++ b/.ncurc.json @@ -12,6 +12,8 @@ "vscode-oniguruma", "yazl", "@types/vscode", - "@types/node" + "@types/node", + "vscode-semver", + "@types/vscode-semver" ] } \ No newline at end of file diff --git a/README.md b/README.md index cb2a5c34..f1a10e52 100644 --- a/README.md +++ b/README.md @@ -271,11 +271,14 @@ The reference can then be disposed, the model will only be disposed if there is ## VSCode api usage -You can just import it as if you were in a vscode extension: +To be able to use the VSCode api directly from your code, you need to import `vscode/localExtensionHost` and the services to be initialized. + +You will then be able to import it as if you were in a VSCode extension: ```typescript import * as vscode from 'vscode' import { initialize } from 'vscode/extensions' +import 'vscode/localExtensionHost' await initialize() diff --git a/demo/package-lock.json b/demo/package-lock.json index 7b58b980..a58c94bb 100644 --- a/demo/package-lock.json +++ b/demo/package-lock.json @@ -161,12 +161,12 @@ "@codingame/monaco-vscode-rollup-vsix-plugin": "file:../dist/rollup-vsix-plugin", "@types/dockerode": "^3.3.23", "@types/express": "^4.17.21", - "@types/wicg-file-system-access": "^2023.10.3", - "@types/ws": "^8.5.9", + "@types/wicg-file-system-access": "^2023.10.4", + "@types/ws": "^8.5.10", "fast-glob": "^3.3.2", "ts-node": "^10.9.1", - "typescript": "~5.2.2", - "vite": "~4.4.9" + "typescript": "~5.3.2", + "vite": "~4.4.12" } }, "../dist/default-extension-bat": { @@ -2580,15 +2580,15 @@ "dev": true }, "node_modules/@types/wicg-file-system-access": { - "version": "2023.10.3", - "resolved": "https://registry.npmjs.org/@types/wicg-file-system-access/-/wicg-file-system-access-2023.10.3.tgz", - "integrity": "sha512-HAmuLF6Nfbkpf7DxWfOVStuj8D+n/hdv0xJoijKIaYg6DukcqIZPz6tf0YJYRqSYhW7TwK2GZOISwiKdCWSkqw==", + "version": "2023.10.4", + "resolved": "https://registry.npmjs.org/@types/wicg-file-system-access/-/wicg-file-system-access-2023.10.4.tgz", + "integrity": "sha512-ewOj7hWhsUTS2+aY6zY+7BwlgqGBj5ZXxKuHt3TAWpIJH0bDW/6bO1N1SdUDAzV8r0Nc+/ZtpAEETYTwrehBMw==", "dev": true }, "node_modules/@types/ws": { - "version": "8.5.9", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.9.tgz", - "integrity": "sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==", + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", + "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", "dev": true, "dependencies": { "@types/node": "*" @@ -3481,9 +3481,9 @@ } }, "node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "version": "8.4.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", + "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", "dev": true, "funding": [ { @@ -3500,7 +3500,7 @@ } ], "dependencies": { - "nanoid": "^3.3.6", + "nanoid": "^3.3.7", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -3898,9 +3898,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", + "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -3946,9 +3946,9 @@ } }, "node_modules/vite": { - "version": "4.4.11", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.11.tgz", - "integrity": "sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==", + "version": "4.4.12", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.12.tgz", + "integrity": "sha512-KtPlUbWfxzGVul8Nut8Gw2Qe8sBzWY+8QVc5SL8iRFnpnrcoCaNlzO40c1R6hPmcdTwIPEDkq0Y9+27a5tVbdQ==", "dev": true, "dependencies": { "esbuild": "^0.18.10", diff --git a/demo/package.json b/demo/package.json index b22350b8..3db5c86c 100644 --- a/demo/package.json +++ b/demo/package.json @@ -18,12 +18,12 @@ "@codingame/monaco-vscode-rollup-vsix-plugin": "file:../dist/rollup-vsix-plugin", "@types/dockerode": "^3.3.23", "@types/express": "^4.17.21", - "@types/wicg-file-system-access": "^2023.10.3", - "@types/ws": "^8.5.9", + "@types/wicg-file-system-access": "^2023.10.4", + "@types/ws": "^8.5.10", "fast-glob": "^3.3.2", "ts-node": "^10.9.1", - "typescript": "~5.2.2", - "vite": "~4.4.9" + "typescript": "~5.3.2", + "vite": "~4.4.12" }, "dependencies": { "@codingame/monaco-vscode-log-service-override": "file:../dist/service-override-log", diff --git a/demo/src/features/intellisense.ts b/demo/src/features/intellisense.ts index 5aab5abe..46190591 100644 --- a/demo/src/features/intellisense.ts +++ b/demo/src/features/intellisense.ts @@ -1,12 +1,10 @@ import * as vscode from 'vscode' -import { onExtHostInitialized } from 'vscode/extensions' import '@codingame/monaco-vscode-json-language-features-default-extension' import '@codingame/monaco-vscode-typescript-language-features-default-extension' import '@codingame/monaco-vscode-html-language-features-default-extension' import '@codingame/monaco-vscode-css-language-features-default-extension' import '@codingame/monaco-vscode-markdown-language-features-default-extension' - -await new Promise(resolve => onExtHostInitialized(resolve)) +import '../setup' // import setup file to wait for services initialization vscode.languages.registerCallHierarchyProvider('javascript', { prepareCallHierarchy: function (): vscode.ProviderResult { diff --git a/demo/src/features/notifications.ts b/demo/src/features/notifications.ts index 34893f3c..5e2cf032 100644 --- a/demo/src/features/notifications.ts +++ b/demo/src/features/notifications.ts @@ -1,7 +1,5 @@ import * as vscode from 'vscode' -import { onExtHostInitialized } from 'vscode/extensions' - -await new Promise(resolve => onExtHostInitialized(resolve)) +import '../setup' // import setup file to wait for services initialization void vscode.window.showInformationMessage('Hello', { detail: 'Welcome to the monaco-vscode-api demo', diff --git a/demo/src/features/output.ts b/demo/src/features/output.ts index 66d6c830..6f0dc7cf 100644 --- a/demo/src/features/output.ts +++ b/demo/src/features/output.ts @@ -1,6 +1,4 @@ -import { ExtensionHostKind, onExtHostInitialized, registerExtension } from 'vscode/extensions' - -await new Promise(resolve => onExtHostInitialized(resolve)) +import { ExtensionHostKind, registerExtension } from 'vscode/extensions' const { getApi } = registerExtension({ name: 'outputDemo', diff --git a/demo/src/features/scm.ts b/demo/src/features/scm.ts index ecb1e63f..be0fdea3 100644 --- a/demo/src/features/scm.ts +++ b/demo/src/features/scm.ts @@ -1,61 +1,63 @@ -import { onExtHostInitialized, registerExtension } from 'vscode/extensions' +import type { Uri } from 'vscode' +import { registerExtension } from 'vscode/extensions' -onExtHostInitialized(async () => { - const { getApi } = registerExtension({ - name: 'scm-demo', - publisher: 'codingame', - engines: { - vscode: '*' - }, - version: '1.0.0', - enabledApiProposals: ['scmActionButton'] - }, 1) +const { getApi } = registerExtension({ + name: 'scm-demo', + publisher: 'codingame', + engines: { + vscode: '*' + }, + version: '1.0.0', + enabledApiProposals: ['scmActionButton'] +}, 1) - const vscode = await getApi() +const vscode = await getApi() - const workspaceFolder = vscode.workspace.workspaceFolders![0] - if (workspaceFolder == null) { - throw new Error('No workspace folder') - } +const workspaceFolder = vscode.workspace.workspaceFolders![0] +if (workspaceFolder == null) { + throw new Error('No workspace folder') +} - vscode.commands.registerCommand('scm-demo.click-file', async () => { - await vscode.window.showInformationMessage('You pressed a file!') - }) - vscode.commands.registerCommand('scm-demo.commit', async () => { - await vscode.window.showInformationMessage("You've committed!") - }) +vscode.commands.registerCommand('scm-demo.click-file', async (uri: Uri) => { + await vscode.commands.executeCommand('vscode.open', uri) + await vscode.window.showInformationMessage(`You pressed a file! (${uri.toString()})`) +}) +vscode.commands.registerCommand('scm-demo.commit', async () => { + await vscode.window.showInformationMessage("You've committed!") +}) - const scm = vscode.scm.createSourceControl('demo-source-control', 'Demo Source Control', workspaceFolder.uri) - scm.inputBox.placeholder = 'Hello, you can write anything here!' - scm.acceptInputCommand = { +const scm = vscode.scm.createSourceControl('demo-source-control', 'Demo Source Control', workspaceFolder.uri) +scm.inputBox.placeholder = 'Hello, you can write anything here!' +scm.acceptInputCommand = { + command: 'scm-demo.commit', + title: 'Commit' +} +scm.actionButton = { + command: { command: 'scm-demo.commit', title: 'Commit' + }, + enabled: true +} +scm.count = 2 + +const group = scm.createResourceGroup('working-tree', 'Working Tree') +group.resourceStates = [{ + resourceUri: vscode.Uri.file('/tmp/test.js'), + command: { + title: 'Commit', + command: 'scm-demo.click-file', + arguments: [vscode.Uri.file('/tmp/test.js')] } - scm.actionButton = { - command: { - command: 'scm-demo.commit', - title: 'Commit' - }, - enabled: true +}, { + resourceUri: vscode.Uri.file('/tmp/test_readonly.js'), + command: { + title: 'Commit', + command: 'scm-demo.click-file', + arguments: [vscode.Uri.file('/tmp/test_readonly.js')] + }, + decorations: { + strikeThrough: true, + tooltip: 'File is read-only' } - scm.count = 2 - - const group = scm.createResourceGroup('working-tree', 'Working Tree') - group.resourceStates = [{ - resourceUri: vscode.Uri.file('/tmp/test.js'), - command: { - title: 'Commit', - command: 'scm-demo.click-file' - } - }, { - resourceUri: vscode.Uri.file('/tmp/test_readonly.js'), - command: { - title: 'Commit', - command: 'scm-demo.click-file' - }, - decorations: { - strikeThrough: true, - tooltip: 'File is read-only' - } - }] -}) +}] diff --git a/demo/src/setup.ts b/demo/src/setup.ts index 22eaa1d7..33152303 100644 --- a/demo/src/setup.ts +++ b/demo/src/setup.ts @@ -1,5 +1,4 @@ import { IStorageService, LogLevel, getService, initialize as initializeMonacoService } from 'vscode/services' -import { initialize as initializeVscodeExtensions } from 'vscode/extensions' import getModelServiceOverride from '@codingame/monaco-vscode-model-service-override' import getNotificationServiceOverride from '@codingame/monaco-vscode-notifications-service-override' import getDialogsServiceOverride from '@codingame/monaco-vscode-dialogs-service-override' @@ -48,6 +47,7 @@ import defaultConfiguration from './user/configuration.json?raw' import defaultKeybindings from './user/keybindings.json?raw' import { workerConfig } from './tools/extHostWorker' import { Worker } from './tools/crossOriginWorker' +import 'vscode/localExtensionHost' const userDataProvider = await createIndexedDBProviders() @@ -188,8 +188,6 @@ export async function clearStorage (): Promise { await (await getService(IStorageService) as BrowserStorageService).clear() } -await initializeVscodeExtensions() - for (const { part, element } of [ { part: Parts.TITLEBAR_PART, element: '#titleBar' }, { part: Parts.BANNER_PART, element: '#banner' }, diff --git a/demo/vite.config.ts b/demo/vite.config.ts index 37151795..0ce31a17 100644 --- a/demo/vite.config.ts +++ b/demo/vite.config.ts @@ -55,7 +55,7 @@ export default defineConfig({ // add all local dependencies... ...localDependencies, // and their exports - 'vscode/extensions', 'vscode/services', 'vscode/monaco', + 'vscode/extensions', 'vscode/services', 'vscode/monaco', 'vscode/localExtensionHost', // These 2 lines prevent vite from reloading the whole page when starting a worker (so 2 times in a row after cleaning the vite cache - for the editor then the textmate workers) // it's mainly empirical and probably not the best way, fix me if you find a better way diff --git a/package-lock.json b/package-lock.json index 341274be..4f681171 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,16 +40,16 @@ "yazl": "^2.4.3" }, "devDependencies": { - "@babel/core": "^7.23.3", + "@babel/core": "^7.23.5", "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-decorators": "^7.23.3", - "@babel/preset-env": "^7.23.3", + "@babel/plugin-proposal-decorators": "^7.23.5", + "@babel/preset-env": "^7.23.5", "@babel/preset-typescript": "^7.23.3", "@codingame/eslint-config": "^1.1.10", "@codingame/tsconfig": "^1.1.1", "@octokit/rest": "^20.0.2", "@rollup/plugin-commonjs": "^25.0.7", - "@rollup/plugin-dynamic-import-vars": "^2.1.0", + "@rollup/plugin-dynamic-import-vars": "^2.1.2", "@rollup/plugin-json": "^6.0.1", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-replace": "^5.0.5", @@ -57,18 +57,18 @@ "@types/diff": "^5.0.8", "@types/mime-types": "^2.1.4", "@types/node": "^18.17.15", - "@types/semver": "^7.5.5", + "@types/semver": "^7.5.6", "@types/vscode": "~1.83.0", "@types/vscode-semver": "npm:@types/semver@=5.5.0", "@types/yauzl": "^2.10.3", - "@typescript-eslint/eslint-plugin": "^6.11.0", - "@typescript-eslint/parser": "^6.11.0", + "@typescript-eslint/eslint-plugin": "^6.13.1", + "@typescript-eslint/parser": "^6.13.1", "@vscode/iconv-lite-umd": "^0.7.0", "@web/rollup-plugin-import-meta-assets": "^2.2.1", "change-package-name": "^1.0.5", "css-url-parser": "^1.1.3", "diff": "^5.1.0", - "eslint": "^8.53.0", + "eslint": "^8.55.0", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-n": "^16.3.1", @@ -84,15 +84,15 @@ "pascal-case": "^3.1.2", "patch-package": "^8.0.0", "recast": "^0.23.4", - "rollup": "^4.4.1", + "rollup": "^4.6.1", "rollup-plugin-copy": "^3.5.0", "rollup-plugin-dts": "^6.1.0", "rollup-plugin-styles": "^4.0.0", "semver": "^7.5.4", - "ts-morph": "^20.0.0", + "ts-morph": "^21.0.1", "ts-node": "^10.9.1", - "type-fest": "^4.8.1", - "typescript": "5.2.2", + "type-fest": "^4.8.3", + "typescript": "5.3.2", "xterm-headless": "^5.3.0", "zx": "^7.2.3" } @@ -120,12 +120,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dev": true, "dependencies": { - "@babel/highlight": "^7.22.13", + "@babel/highlight": "^7.23.4", "chalk": "^2.4.2" }, "engines": { @@ -133,30 +133,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.3.tgz", - "integrity": "sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", + "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.3.tgz", - "integrity": "sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.5.tgz", + "integrity": "sha512-Cwc2XjUrG4ilcfOw4wBAK+enbdgwAcAJCfGUItPBKR7Mjw4aEfAFYrLxeRp4jWgtNIKn3n2AlBOfwwafl+42/g==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.3", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.5", "@babel/helper-compilation-targets": "^7.22.15", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.2", - "@babel/parser": "^7.23.3", + "@babel/helpers": "^7.23.5", + "@babel/parser": "^7.23.5", "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.3", - "@babel/types": "^7.23.3", + "@babel/traverse": "^7.23.5", + "@babel/types": "^7.23.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -181,12 +181,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.3.tgz", - "integrity": "sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.5.tgz", + "integrity": "sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA==", "dev": true, "dependencies": { - "@babel/types": "^7.23.3", + "@babel/types": "^7.23.5", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -245,17 +245,17 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.15.tgz", - "integrity": "sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.5.tgz", + "integrity": "sha512-QELlRWxSpgdwdJzSJn4WAhKC+hvw/AtHbbrIoncKHkhKKR/luAlKkgBDcri1EzWAo8f8VvYVryEHN4tax/V67A==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-member-expression-to-functions": "^7.23.0", "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.9", + "@babel/helper-replace-supers": "^7.22.20", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", "semver": "^6.3.1" @@ -353,12 +353,12 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.15.tgz", - "integrity": "sha512-qLNsZbgrNh0fDQBCPocSL8guki1hcPvltGDv/NxvUoABwFq7GkKSu1nRXeJkVZc+wJvne2E0RKQz+2SQrz6eAA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", + "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", "dev": true, "dependencies": { - "@babel/types": "^7.22.15" + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -487,9 +487,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -505,9 +505,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", - "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "dev": true, "engines": { "node": ">=6.9.0" @@ -528,26 +528,26 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", - "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.5.tgz", + "integrity": "sha512-oO7us8FzTEsG3U6ag9MfdF1iA/7Z6dz+MtFhifZk8C8o453rGJFFWUP1t+ULM9TUIAzC9uxXEiXjOiVMyd7QPg==", "dev": true, "dependencies": { "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.2", - "@babel/types": "^7.23.0" + "@babel/traverse": "^7.23.5", + "@babel/types": "^7.23.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz", - "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, @@ -556,9 +556,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.3.tgz", - "integrity": "sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz", + "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -632,12 +632,12 @@ } }, "node_modules/@babel/plugin-proposal-decorators": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.23.3.tgz", - "integrity": "sha512-u8SwzOcP0DYSsa++nHd/9exlHb0NAlHCb890qtZZbSwPX2bFv8LBEztxwN7Xg/dS8oAFFidhrI9PBcLBJSkGRQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.23.5.tgz", + "integrity": "sha512-6IsY8jOeWibsengGlWIezp7cuZEFzNlAghFpzh9wiZwhQ42/hRcPnY/QV9HJoKTlujupinSlnQPiEy/u2C1ZfQ==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.15", + "@babel/helper-create-class-features-plugin": "^7.23.5", "@babel/helper-plugin-utils": "^7.22.5", "@babel/helper-replace-supers": "^7.22.20", "@babel/helper-split-export-declaration": "^7.22.6", @@ -958,9 +958,9 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.3.tgz", - "integrity": "sha512-59GsVNavGxAXCDDbakWSMJhajASb4kBCqDjqJsv+p5nKdbz7istmZ3HrX3L2LuiI80+zsOADCvooqQH3qGCucQ==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.4.tgz", + "integrity": "sha512-efdkfPhHYTtn0G6n2ddrESE91fgXxjlqLsnUtPWnJs4a4mZIbUaK7ffqKIIUKXSHwcDvaCVX6GXkaJJFqtX7jw==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", @@ -1008,9 +1008,9 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.3.tgz", - "integrity": "sha512-QPZxHrThbQia7UdvfpaRRlq/J9ciz1J4go0k+lPBXbgaNeY7IQrBj/9ceWjvMMI07/ZBzHl/F0R/2K0qH7jCVw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.4.tgz", + "integrity": "sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5" @@ -1039,9 +1039,9 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.3.tgz", - "integrity": "sha512-PENDVxdr7ZxKPyi5Ffc0LjXdnJyrJxyqF5T5YjlVg4a0VFfQHW0r8iAtRiDXkfHlu1wwcvdtnndGYIeJLSuRMQ==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.4.tgz", + "integrity": "sha512-nsWu/1M+ggti1SOALj3hfx5FXzAY06fwPJsUZD4/A5e1bWi46VUIWtD+kOX6/IdhXGsXBWllLFDSnqSCdUNydQ==", "dev": true, "dependencies": { "@babel/helper-create-class-features-plugin": "^7.22.15", @@ -1056,9 +1056,9 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.3.tgz", - "integrity": "sha512-FGEQmugvAEu2QtgtU0uTASXevfLMFfBeVCIIdcQhn/uBQsMTjBajdnAtanQlOcuihWh10PZ7+HWvc7NtBwP74w==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.5.tgz", + "integrity": "sha512-jvOTR4nicqYC9yzOHIhXG5emiFEOpappSJAl73SDSEDcybD+Puuze8Tnpb9p9qEyYup24tq891gkaygIFvWDqg==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", @@ -1141,9 +1141,9 @@ } }, "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.3.tgz", - "integrity": "sha512-vTG+cTGxPFou12Rj7ll+eD5yWeNl5/8xvQvF08y5Gv3v4mZQoyFf8/n9zg4q5vvCWt5jmgymfzMAldO7orBn7A==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.4.tgz", + "integrity": "sha512-V6jIbLhdJK86MaLh4Jpghi8ho5fGzt3imHOBu/x0jlBaPYqDoWz4RDXjmMOfnh+JWNaQleEAByZLV0QzBT4YQQ==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1173,9 +1173,9 @@ } }, "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.3.tgz", - "integrity": "sha512-yCLhW34wpJWRdTxxWtFZASJisihrfyMOTOQexhVzA78jlU+dH7Dw+zQgcPepQ5F3C6bAIiblZZ+qBggJdHiBAg==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.4.tgz", + "integrity": "sha512-GzuSBcKkx62dGzZI1WVgTWvkkz84FZO5TC5T8dl/Tht/rAla6Dg/Mz9Yhypg+ezVACf/rgDuQt3kbWEv7LdUDQ==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1221,9 +1221,9 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.3.tgz", - "integrity": "sha512-H9Ej2OiISIZowZHaBwF0tsJOih1PftXJtE8EWqlEIwpc7LMTGq0rPOrywKLQ4nefzx8/HMR0D3JGXoMHYvhi0A==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.4.tgz", + "integrity": "sha512-81nTOqM1dMwZ/aRXQ59zVubN9wHGqk6UtqRK+/q+ciXmRy8fSolhGVvG09HHRGo4l6fr/c4ZhXUQH0uFW7PZbg==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1252,9 +1252,9 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.3.tgz", - "integrity": "sha512-+pD5ZbxofyOygEp+zZAfujY2ShNCXRpDRIPOiBmTO693hhyOEteZgl876Xs9SAHPQpcV0vz8LvA/T+w8AzyX8A==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.4.tgz", + "integrity": "sha512-Mc/ALf1rmZTP4JKKEhUwiORU+vcfarFVLfcFiolKUo6sewoxSEgl36ak5t+4WamRsNr6nzjZXQjM35WsU+9vbg==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1381,9 +1381,9 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.3.tgz", - "integrity": "sha512-xzg24Lnld4DYIdysyf07zJ1P+iIfJpxtVFOzX4g+bsJ3Ng5Le7rXx9KwqKzuyaUeRnt+I1EICwQITqc0E2PmpA==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.4.tgz", + "integrity": "sha512-jHE9EVVqHKAQx+VePv5LLGHjmHSJR76vawFPTdlxR/LVJPfOEGxREQwQfjuZEOPTwG92X3LINSh3M40Rv4zpVA==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1397,9 +1397,9 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.3.tgz", - "integrity": "sha512-s9GO7fIBi/BLsZ0v3Rftr6Oe4t0ctJ8h4CCXfPoEJwmvAPMyNrfkOOJzm6b9PX9YXcCJWWQd/sBF/N26eBiMVw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.4.tgz", + "integrity": "sha512-mps6auzgwjRrwKEZA05cOwuDc9FAzoyFS4ZsG/8F43bTLf/TgkJg7QXOrPO1JO599iA3qgK9MXdMGOEC8O1h6Q==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1413,9 +1413,9 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.3.tgz", - "integrity": "sha512-VxHt0ANkDmu8TANdE9Kc0rndo/ccsmfe2Cx2y5sI4hu3AukHQ5wAu4cM7j3ba8B9548ijVyclBU+nuDQftZsog==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz", + "integrity": "sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g==", "dev": true, "dependencies": { "@babel/compat-data": "^7.23.3", @@ -1448,9 +1448,9 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.3.tgz", - "integrity": "sha512-LxYSb0iLjUamfm7f1D7GpiS4j0UAC8AOiehnsGAP8BEsIX8EOi3qV6bbctw8M7ZvLtcoZfZX5Z7rN9PlWk0m5A==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.4.tgz", + "integrity": "sha512-XIq8t0rJPHf6Wvmbn9nFxU6ao4c7WhghTR5WyV8SrJfUFzyxhCm4nhC+iAp3HFhbAKLfYpgzhJ6t4XCtVwqO5A==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1464,9 +1464,9 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.3.tgz", - "integrity": "sha512-zvL8vIfIUgMccIAK1lxjvNv572JHFJIKb4MWBz5OGdBQA0fB0Xluix5rmOby48exiJc987neOmP/m9Fnpkz3Tg==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.4.tgz", + "integrity": "sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -1512,9 +1512,9 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.3.tgz", - "integrity": "sha512-a5m2oLNFyje2e/rGKjVfAELTVI5mbA0FeZpBnkOWWV7eSmKQ+T/XW0Vf+29ScLzSxX+rnsarvU0oie/4m6hkxA==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz", + "integrity": "sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", @@ -1733,15 +1733,15 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.3.tgz", - "integrity": "sha512-ovzGc2uuyNfNAs/jyjIGxS8arOHS5FENZaNn4rtE7UdKMMkqHCvboHfcuhWLZNX5cB44QfcGNWjaevxMzzMf+Q==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.5.tgz", + "integrity": "sha512-0d/uxVD6tFGWXGDSfyMD1p2otoaKmu6+GD+NfAx0tMaH+dxORnp7T9TaVQ6mKyya7iBtCIVxHjWT7MuzzM9z+A==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.23.3", + "@babel/compat-data": "^7.23.5", "@babel/helper-compilation-targets": "^7.22.15", "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.15", + "@babel/helper-validator-option": "^7.23.5", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.23.3", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.23.3", "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.23.3", @@ -1765,25 +1765,25 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.23.3", - "@babel/plugin-transform-async-generator-functions": "^7.23.3", + "@babel/plugin-transform-async-generator-functions": "^7.23.4", "@babel/plugin-transform-async-to-generator": "^7.23.3", "@babel/plugin-transform-block-scoped-functions": "^7.23.3", - "@babel/plugin-transform-block-scoping": "^7.23.3", + "@babel/plugin-transform-block-scoping": "^7.23.4", "@babel/plugin-transform-class-properties": "^7.23.3", - "@babel/plugin-transform-class-static-block": "^7.23.3", - "@babel/plugin-transform-classes": "^7.23.3", + "@babel/plugin-transform-class-static-block": "^7.23.4", + "@babel/plugin-transform-classes": "^7.23.5", "@babel/plugin-transform-computed-properties": "^7.23.3", "@babel/plugin-transform-destructuring": "^7.23.3", "@babel/plugin-transform-dotall-regex": "^7.23.3", "@babel/plugin-transform-duplicate-keys": "^7.23.3", - "@babel/plugin-transform-dynamic-import": "^7.23.3", + "@babel/plugin-transform-dynamic-import": "^7.23.4", "@babel/plugin-transform-exponentiation-operator": "^7.23.3", - "@babel/plugin-transform-export-namespace-from": "^7.23.3", + "@babel/plugin-transform-export-namespace-from": "^7.23.4", "@babel/plugin-transform-for-of": "^7.23.3", "@babel/plugin-transform-function-name": "^7.23.3", - "@babel/plugin-transform-json-strings": "^7.23.3", + "@babel/plugin-transform-json-strings": "^7.23.4", "@babel/plugin-transform-literals": "^7.23.3", - "@babel/plugin-transform-logical-assignment-operators": "^7.23.3", + "@babel/plugin-transform-logical-assignment-operators": "^7.23.4", "@babel/plugin-transform-member-expression-literals": "^7.23.3", "@babel/plugin-transform-modules-amd": "^7.23.3", "@babel/plugin-transform-modules-commonjs": "^7.23.3", @@ -1791,15 +1791,15 @@ "@babel/plugin-transform-modules-umd": "^7.23.3", "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", "@babel/plugin-transform-new-target": "^7.23.3", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.3", - "@babel/plugin-transform-numeric-separator": "^7.23.3", - "@babel/plugin-transform-object-rest-spread": "^7.23.3", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4", + "@babel/plugin-transform-numeric-separator": "^7.23.4", + "@babel/plugin-transform-object-rest-spread": "^7.23.4", "@babel/plugin-transform-object-super": "^7.23.3", - "@babel/plugin-transform-optional-catch-binding": "^7.23.3", - "@babel/plugin-transform-optional-chaining": "^7.23.3", + "@babel/plugin-transform-optional-catch-binding": "^7.23.4", + "@babel/plugin-transform-optional-chaining": "^7.23.4", "@babel/plugin-transform-parameters": "^7.23.3", "@babel/plugin-transform-private-methods": "^7.23.3", - "@babel/plugin-transform-private-property-in-object": "^7.23.3", + "@babel/plugin-transform-private-property-in-object": "^7.23.4", "@babel/plugin-transform-property-literals": "^7.23.3", "@babel/plugin-transform-regenerator": "^7.23.3", "@babel/plugin-transform-reserved-words": "^7.23.3", @@ -1901,19 +1901,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.3.tgz", - "integrity": "sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.5.tgz", + "integrity": "sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.3", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.5", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.3", - "@babel/types": "^7.23.3", + "@babel/parser": "^7.23.5", + "@babel/types": "^7.23.5", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1922,12 +1922,12 @@ } }, "node_modules/@babel/types": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.3.tgz", - "integrity": "sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.5.tgz", + "integrity": "sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-string-parser": "^7.23.4", "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, @@ -2003,9 +2003,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", - "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -2053,9 +2053,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", - "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", + "version": "8.55.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz", + "integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2498,9 +2498,9 @@ } }, "node_modules/@rollup/plugin-dynamic-import-vars": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-dynamic-import-vars/-/plugin-dynamic-import-vars-2.1.0.tgz", - "integrity": "sha512-hv+gJohx8HLPByLcuNxzzZw1/Ioi96qBzyMf3DIh/Zz0AHr7W/mknRYjqQaW/SF9UcuM2iYueSI+R4orbraj2Q==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-dynamic-import-vars/-/plugin-dynamic-import-vars-2.1.2.tgz", + "integrity": "sha512-4lr2oXxs9hcxtGGaK8s0i9evfjzDrAs7ngw28TqruWKTEm0+U4Eljb+F6HXGYdFv8xRojQlrQwV7M/yxeh3yzQ==", "dev": true, "dependencies": { "@rollup/pluginutils": "^5.0.1", @@ -2636,9 +2636,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.4.1.tgz", - "integrity": "sha512-Ss4suS/sd+6xLRu+MLCkED2mUrAyqHmmvZB+zpzZ9Znn9S8wCkTQCJaQ8P8aHofnvG5L16u9MVnJjCqioPErwQ==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.6.1.tgz", + "integrity": "sha512-0WQ0ouLejaUCRsL93GD4uft3rOmB8qoQMU05Kb8CmMtMBe7XUDLAltxVZI1q6byNqEtU7N1ZX1Vw5lIpgulLQA==", "cpu": [ "arm" ], @@ -2649,9 +2649,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.4.1.tgz", - "integrity": "sha512-sRSkGTvGsARwWd7TzC8LKRf8FiPn7257vd/edzmvG4RIr9x68KBN0/Ek48CkuUJ5Pj/Dp9vKWv6PEupjKWjTYA==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.6.1.tgz", + "integrity": "sha512-1TKm25Rn20vr5aTGGZqo6E4mzPicCUD79k17EgTLAsXc1zysyi4xXKACfUbwyANEPAEIxkzwue6JZ+stYzWUTA==", "cpu": [ "arm64" ], @@ -2662,9 +2662,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.4.1.tgz", - "integrity": "sha512-nz0AiGrrXyaWpsmBXUGOBiRDU0wyfSXbFuF98pPvIO8O6auQsPG6riWsfQqmCCC5FNd8zKQ4JhgugRNAkBJ8mQ==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.6.1.tgz", + "integrity": "sha512-cEXJQY/ZqMACb+nxzDeX9IPLAg7S94xouJJCNVE5BJM8JUEP4HeTF+ti3cmxWeSJo+5D+o8Tc0UAWUkfENdeyw==", "cpu": [ "arm64" ], @@ -2675,9 +2675,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.4.1.tgz", - "integrity": "sha512-Ogqvf4/Ve/faMaiPRvzsJEqajbqs00LO+8vtrPBVvLgdw4wBg6ZDXdkDAZO+4MLnrc8mhGV6VJAzYScZdPLtJg==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.6.1.tgz", + "integrity": "sha512-LoSU9Xu56isrkV2jLldcKspJ7sSXmZWkAxg7sW/RfF7GS4F5/v4EiqKSMCFbZtDu2Nc1gxxFdQdKwkKS4rwxNg==", "cpu": [ "x64" ], @@ -2688,9 +2688,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.4.1.tgz", - "integrity": "sha512-9zc2tqlr6HfO+hx9+wktUlWTRdje7Ub15iJqKcqg5uJZ+iKqmd2CMxlgPpXi7+bU7bjfDIuvCvnGk7wewFEhCg==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.6.1.tgz", + "integrity": "sha512-EfI3hzYAy5vFNDqpXsNxXcgRDcFHUWSx5nnRSCKwXuQlI5J9dD84g2Usw81n3FLBNsGCegKGwwTVsSKK9cooSQ==", "cpu": [ "arm" ], @@ -2701,9 +2701,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.4.1.tgz", - "integrity": "sha512-phLb1fN3rq2o1j1v+nKxXUTSJnAhzhU0hLrl7Qzb0fLpwkGMHDem+o6d+ZI8+/BlTXfMU4kVWGvy6g9k/B8L6Q==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.6.1.tgz", + "integrity": "sha512-9lhc4UZstsegbNLhH0Zu6TqvDfmhGzuCWtcTFXY10VjLLUe4Mr0Ye2L3rrtHaDd/J5+tFMEuo5LTCSCMXWfUKw==", "cpu": [ "arm64" ], @@ -2714,9 +2714,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.4.1.tgz", - "integrity": "sha512-M2sDtw4tf57VPSjbTAN/lz1doWUqO2CbQuX3L9K6GWIR5uw9j+ROKCvvUNBY8WUbMxwaoc8mH9HmmBKsLht7+w==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.6.1.tgz", + "integrity": "sha512-FfoOK1yP5ksX3wwZ4Zk1NgyGHZyuRhf99j64I5oEmirV8EFT7+OhUZEnP+x17lcP/QHJNWGsoJwrz4PJ9fBEXw==", "cpu": [ "arm64" ], @@ -2727,9 +2727,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.4.1.tgz", - "integrity": "sha512-mHIlRLX+hx+30cD6c4BaBOsSqdnCE4ok7/KDvjHYAHoSuveoMMxIisZFvcLhUnyZcPBXDGZTuBoalcuh43UfQQ==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.6.1.tgz", + "integrity": "sha512-DNGZvZDO5YF7jN5fX8ZqmGLjZEXIJRdJEdTFMhiyXqyXubBa0WVLDWSNlQ5JR2PNgDbEV1VQowhVRUh+74D+RA==", "cpu": [ "x64" ], @@ -2740,9 +2740,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.4.1.tgz", - "integrity": "sha512-tB+RZuDi3zxFx7vDrjTNGVLu2KNyzYv+UY8jz7e4TMEoAj7iEt8Qk6xVu6mo3pgjnsHj6jnq3uuRsHp97DLwOA==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.6.1.tgz", + "integrity": "sha512-RkJVNVRM+piYy87HrKmhbexCHg3A6Z6MU0W9GHnJwBQNBeyhCJG9KDce4SAMdicQnpURggSvtbGo9xAWOfSvIQ==", "cpu": [ "x64" ], @@ -2753,9 +2753,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.4.1.tgz", - "integrity": "sha512-Hdn39PzOQowK/HZzYpCuZdJC91PE6EaGbTe2VCA9oq2u18evkisQfws0Smh9QQGNNRa/T7MOuGNQoLeXhhE3PQ==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.6.1.tgz", + "integrity": "sha512-v2FVT6xfnnmTe3W9bJXl6r5KwJglMK/iRlkKiIFfO6ysKs0rDgz7Cwwf3tjldxQUrHL9INT/1r4VA0n9L/F1vQ==", "cpu": [ "arm64" ], @@ -2766,9 +2766,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.4.1.tgz", - "integrity": "sha512-tLpKb1Elm9fM8c5w3nl4N1eLTP4bCqTYw9tqUBxX8/hsxqHO3dxc2qPbZ9PNkdK4tg4iLEYn0pOUnVByRd2CbA==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.6.1.tgz", + "integrity": "sha512-YEeOjxRyEjqcWphH9dyLbzgkF8wZSKAKUkldRY6dgNR5oKs2LZazqGB41cWJ4Iqqcy9/zqYgmzBkRoVz3Q9MLw==", "cpu": [ "ia32" ], @@ -2779,9 +2779,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.4.1.tgz", - "integrity": "sha512-eAhItDX9yQtZVM3yvXS/VR3qPqcnXvnLyx1pLXl4JzyNMBNO3KC986t/iAg2zcMzpAp9JSvxB5VZGnBiNoA98w==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.6.1.tgz", + "integrity": "sha512-0zfTlFAIhgz8V2G8STq8toAjsYYA6eci1hnXuyOTUFnymrtJwnS6uGKiv3v5UrPZkBlamLvrLV2iiaeqCKzb0A==", "cpu": [ "x64" ], @@ -2833,14 +2833,14 @@ } }, "node_modules/@ts-morph/common": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.21.0.tgz", - "integrity": "sha512-ES110Mmne5Vi4ypUKrtVQfXFDtCsDXiUiGxF6ILVlE90dDD4fdpC1LSjydl/ml7xJWKSDZwUYD2zkOePMSrPBA==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.22.0.tgz", + "integrity": "sha512-HqNBuV/oIlMKdkLshXd1zKBqNQCsuPEsgQOkfFQ/eUKjRlwndXW1AjN9LVkBEIukm00gGXSRmfkl0Wv5VXLnlw==", "dev": true, "dependencies": { - "fast-glob": "^3.2.12", - "minimatch": "^7.4.3", - "mkdirp": "^2.1.6", + "fast-glob": "^3.3.2", + "minimatch": "^9.0.3", + "mkdirp": "^3.0.1", "path-browserify": "^1.0.1" } }, @@ -2854,15 +2854,15 @@ } }, "node_modules/@ts-morph/common/node_modules/minimatch": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", - "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -3003,9 +3003,9 @@ "dev": true }, "node_modules/@types/semver": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.5.tgz", - "integrity": "sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", + "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", "dev": true }, "node_modules/@types/vscode": { @@ -3037,16 +3037,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.11.0.tgz", - "integrity": "sha512-uXnpZDc4VRjY4iuypDBKzW1rz9T5YBBK0snMn8MaTSNd2kMlj50LnLBABELjJiOL5YHk7ZD8hbSpI9ubzqYI0w==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.1.tgz", + "integrity": "sha512-5bQDGkXaxD46bPvQt08BUz9YSaO4S0fB1LB5JHQuXTfkGPI3+UUeS387C/e9jRie5GqT8u5kFTrMvAjtX4O5kA==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.11.0", - "@typescript-eslint/type-utils": "6.11.0", - "@typescript-eslint/utils": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0", + "@typescript-eslint/scope-manager": "6.13.1", + "@typescript-eslint/type-utils": "6.13.1", + "@typescript-eslint/utils": "6.13.1", + "@typescript-eslint/visitor-keys": "6.13.1", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -3072,15 +3072,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.11.0.tgz", - "integrity": "sha512-+whEdjk+d5do5nxfxx73oanLL9ghKO3EwM9kBCkUtWMRwWuPaFv9ScuqlYfQ6pAD6ZiJhky7TZ2ZYhrMsfMxVQ==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.13.1.tgz", + "integrity": "sha512-fs2XOhWCzRhqMmQf0eicLa/CWSaYss2feXsy7xBD/pLyWke/jCIVc2s1ikEAtSW7ina1HNhv7kONoEfVNEcdDQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.11.0", - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/typescript-estree": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0", + "@typescript-eslint/scope-manager": "6.13.1", + "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/typescript-estree": "6.13.1", + "@typescript-eslint/visitor-keys": "6.13.1", "debug": "^4.3.4" }, "engines": { @@ -3100,13 +3100,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.11.0.tgz", - "integrity": "sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.13.1.tgz", + "integrity": "sha512-BW0kJ7ceiKi56GbT2KKzZzN+nDxzQK2DS6x0PiSMPjciPgd/JRQGMibyaN2cPt2cAvuoH0oNvn2fwonHI+4QUQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0" + "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/visitor-keys": "6.13.1" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -3117,13 +3117,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.11.0.tgz", - "integrity": "sha512-nA4IOXwZtqBjIoYrJcYxLRO+F9ri+leVGoJcMW1uqr4r1Hq7vW5cyWrA43lFbpRvQ9XgNrnfLpIkO3i1emDBIA==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.13.1.tgz", + "integrity": "sha512-A2qPlgpxx2v//3meMqQyB1qqTg1h1dJvzca7TugM3Yc2USDY+fsRBiojAEo92HO7f5hW5mjAUF6qobOPzlBCBQ==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.11.0", - "@typescript-eslint/utils": "6.11.0", + "@typescript-eslint/typescript-estree": "6.13.1", + "@typescript-eslint/utils": "6.13.1", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -3144,9 +3144,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.11.0.tgz", - "integrity": "sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.1.tgz", + "integrity": "sha512-gjeEskSmiEKKFIbnhDXUyiqVma1gRCQNbVZ1C8q7Zjcxh3WZMbzWVfGE9rHfWd1msQtPS0BVD9Jz9jded44eKg==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -3157,13 +3157,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.11.0.tgz", - "integrity": "sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.1.tgz", + "integrity": "sha512-sBLQsvOC0Q7LGcUHO5qpG1HxRgePbT6wwqOiGLpR8uOJvPJbfs0mW3jPA3ujsDvfiVwVlWUDESNXv44KtINkUQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0", + "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/visitor-keys": "6.13.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3184,17 +3184,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.11.0.tgz", - "integrity": "sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.13.1.tgz", + "integrity": "sha512-ouPn/zVoan92JgAegesTXDB/oUp6BP1v8WpfYcqh649ejNc9Qv+B4FF2Ff626kO1xg0wWwwG48lAJ4JuesgdOw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.11.0", - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/typescript-estree": "6.11.0", + "@typescript-eslint/scope-manager": "6.13.1", + "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/typescript-estree": "6.13.1", "semver": "^7.5.4" }, "engines": { @@ -3209,12 +3209,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.11.0.tgz", - "integrity": "sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.1.tgz", + "integrity": "sha512-NDhQUy2tg6XGNBGDRm1XybOHSia8mcXmlbKWoQP+nm1BIIMxa55shyJfZkHpEBN62KNPLrocSM2PdPcaLgDKMQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/types": "6.13.1", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -4661,15 +4661,15 @@ } }, "node_modules/eslint": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", - "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", + "version": "8.55.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz", + "integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.53.0", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.55.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -6757,9 +6757,9 @@ } }, "node_modules/mkdirp": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz", - "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", "dev": true, "bin": { "mkdirp": "dist/cjs/src/bin.js" @@ -8410,9 +8410,9 @@ } }, "node_modules/rollup": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.4.1.tgz", - "integrity": "sha512-idZzrUpWSblPJX66i+GzrpjKE3vbYrlWirUHteoAbjKReZwa0cohAErOYA5efoMmNCdvG9yrJS+w9Kl6csaH4w==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.6.1.tgz", + "integrity": "sha512-jZHaZotEHQaHLgKr8JnQiDT1rmatjgKlMekyksz+yk9jt/8z9quNjnKNRoaM0wd9DC2QKXjmWWuDYtM3jfF8pQ==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -8422,18 +8422,18 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.4.1", - "@rollup/rollup-android-arm64": "4.4.1", - "@rollup/rollup-darwin-arm64": "4.4.1", - "@rollup/rollup-darwin-x64": "4.4.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.4.1", - "@rollup/rollup-linux-arm64-gnu": "4.4.1", - "@rollup/rollup-linux-arm64-musl": "4.4.1", - "@rollup/rollup-linux-x64-gnu": "4.4.1", - "@rollup/rollup-linux-x64-musl": "4.4.1", - "@rollup/rollup-win32-arm64-msvc": "4.4.1", - "@rollup/rollup-win32-ia32-msvc": "4.4.1", - "@rollup/rollup-win32-x64-msvc": "4.4.1", + "@rollup/rollup-android-arm-eabi": "4.6.1", + "@rollup/rollup-android-arm64": "4.6.1", + "@rollup/rollup-darwin-arm64": "4.6.1", + "@rollup/rollup-darwin-x64": "4.6.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.6.1", + "@rollup/rollup-linux-arm64-gnu": "4.6.1", + "@rollup/rollup-linux-arm64-musl": "4.6.1", + "@rollup/rollup-linux-x64-gnu": "4.6.1", + "@rollup/rollup-linux-x64-musl": "4.6.1", + "@rollup/rollup-win32-arm64-msvc": "4.6.1", + "@rollup/rollup-win32-ia32-msvc": "4.6.1", + "@rollup/rollup-win32-x64-msvc": "4.6.1", "fsevents": "~2.3.2" } }, @@ -9176,12 +9176,12 @@ } }, "node_modules/ts-morph": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-20.0.0.tgz", - "integrity": "sha512-JVmEJy2Wow5n/84I3igthL9sudQ8qzjh/6i4tmYCm6IqYyKFlNbJZi7oBdjyqcWSWYRu3CtL0xbT6fS03ESZIg==", + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-21.0.1.tgz", + "integrity": "sha512-dbDtVdEAncKctzrVZ+Nr7kHpHkv+0JDJb2MjjpBaj8bFeCkePU9rHfMklmhuLFnpeq/EJZk2IhStY6NzqgjOkg==", "dev": true, "dependencies": { - "@ts-morph/common": "~0.21.0", + "@ts-morph/common": "~0.22.0", "code-block-writer": "^12.0.0" } }, @@ -9290,9 +9290,9 @@ } }, "node_modules/type-fest": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.8.1.tgz", - "integrity": "sha512-ShaaYnjf+0etG8W/FumARKMjjIToy/haCaTjN2dvcewOSoNqCQzdgG7m2JVOlM5qndGTHjkvsrWZs+k/2Z7E0Q==", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.8.3.tgz", + "integrity": "sha512-//BaTm14Q/gHBn09xlnKNqfI8t6bmdzx2DXYfPBNofN0WUybCEUDcbCWcTa0oF09lzLjZgPphXAsvRiMK0V6Bw==", "dev": true, "engines": { "node": ">=16" @@ -9367,9 +9367,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", + "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index e093ed7a..48f0823b 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "compile-treemending-script": "rollup --config rollup/rollup.treemending-script.config.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config-treemending-script.json`, include: [`./rollup/rollup.treemending-script.config.ts`, `./rollup/rollup-metadata-plugin.ts`]}'", "compile-rollup-plugins": "rollup --config rollup/rollup.rollup-plugins.config.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config-plugins.json`, include: [`./rollup/rollup.rollup-plugins.config.ts`, `./rollup/rollup-metadata-plugin.ts`]}'", "copy-monaco-editor": "cp -R node_modules/monaco-editor dist/ && (cd dist/monaco-editor; change-package-name \"@codingame/monaco-editor-treemended\")", - "preprepare": "./scripts/install-vscode && node --loader ts-node/esm src/monaco-treemending.ts && patch-package", + "preprepare": "patch-package && ./scripts/install-vscode && node --loader ts-node/esm src/monaco-treemending.ts", "lint": "eslint '{src/**/*.ts,rollup/*.ts,*.ts}'", "generate-types": "./scripts/generate-types", "update-vscode-dependencies": "node --loader ts-node/esm scripts/update-vscode-dependencies.ts", @@ -39,16 +39,16 @@ } }, "devDependencies": { - "@babel/core": "^7.23.3", + "@babel/core": "^7.23.5", "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-decorators": "^7.23.3", - "@babel/preset-env": "^7.23.3", + "@babel/plugin-proposal-decorators": "^7.23.5", + "@babel/preset-env": "^7.23.5", "@babel/preset-typescript": "^7.23.3", "@codingame/eslint-config": "^1.1.10", "@codingame/tsconfig": "^1.1.1", "@octokit/rest": "^20.0.2", "@rollup/plugin-commonjs": "^25.0.7", - "@rollup/plugin-dynamic-import-vars": "^2.1.0", + "@rollup/plugin-dynamic-import-vars": "^2.1.2", "@rollup/plugin-json": "^6.0.1", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-replace": "^5.0.5", @@ -56,18 +56,18 @@ "@types/diff": "^5.0.8", "@types/mime-types": "^2.1.4", "@types/node": "^18.17.15", - "@types/semver": "^7.5.5", + "@types/semver": "^7.5.6", "@types/vscode-semver": "npm:@types/semver@=5.5.0", "@types/vscode": "~1.83.0", "@types/yauzl": "^2.10.3", - "@typescript-eslint/eslint-plugin": "^6.11.0", - "@typescript-eslint/parser": "^6.11.0", + "@typescript-eslint/eslint-plugin": "^6.13.1", + "@typescript-eslint/parser": "^6.13.1", "@vscode/iconv-lite-umd": "^0.7.0", "@web/rollup-plugin-import-meta-assets": "^2.2.1", "change-package-name": "^1.0.5", "css-url-parser": "^1.1.3", "diff": "^5.1.0", - "eslint": "^8.53.0", + "eslint": "^8.55.0", "eslint-config-standard": "^17.1.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-n": "^16.3.1", @@ -83,15 +83,15 @@ "pascal-case": "^3.1.2", "patch-package": "^8.0.0", "recast": "^0.23.4", - "rollup": "^4.4.1", + "rollup": "^4.6.1", "rollup-plugin-copy": "^3.5.0", "rollup-plugin-dts": "^6.1.0", "rollup-plugin-styles": "^4.0.0", "semver": "^7.5.4", - "ts-morph": "^20.0.0", + "ts-morph": "^21.0.1", "ts-node": "^10.9.1", - "type-fest": "^4.8.1", - "typescript": "5.2.2", + "type-fest": "^4.8.3", + "typescript": "5.3.2", "xterm-headless": "^5.3.0", "zx": "^7.2.3" }, @@ -127,11 +127,11 @@ "yazl": "^2.4.3" }, "overrides": { - "typescript": "5.2.2", - "rollup": "^4.4.1", - "recast": "^0.23.4", - "xterm": "5.4.0-beta.27", - "@typescript-eslint/eslint-plugin": "^6.11.0" + "typescript": "$typescript", + "rollup": "$rollup", + "recast": "$recast", + "xterm": "$xterm", + "@typescript-eslint/eslint-plugin": "$@typescript-eslint/eslint-plugin" }, "volta": { "node": "18.18.0", diff --git a/patches/ts-node+10.9.1.patch b/patches/ts-node+10.9.1.patch new file mode 100644 index 00000000..bff6bb39 --- /dev/null +++ b/patches/ts-node+10.9.1.patch @@ -0,0 +1,12 @@ +diff --git a/node_modules/ts-node/dist/ts-internals.js b/node_modules/ts-node/dist/ts-internals.js +index 97ea748..2050fdb 100644 +--- a/node_modules/ts-node/dist/ts-internals.js ++++ b/node_modules/ts-node/dist/ts-internals.js +@@ -40,6 +40,7 @@ function createTsInternalsUncached(_ts) { + const resolved = ts.nodeModuleNameResolver(extendedConfig, combinePaths(basePath, 'tsconfig.json'), { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, + /*cache*/ undefined, + /*projectRefs*/ undefined, ++ /*conditionsOrIsConfigLookup*/ undefined, + /*lookupConfig*/ true); + if (resolved.resolvedModule) { + return resolved.resolvedModule.resolvedFileName; diff --git a/rollup/rollup.config.ts b/rollup/rollup.config.ts index ecf4f31a..1c13780d 100644 --- a/rollup/rollup.config.ts +++ b/rollup/rollup.config.ts @@ -464,6 +464,7 @@ function resolveVscode (importee: string, importer?: string) { const input = { api: './src/api.ts', + localExtensionHost: './src/localExtensionHost.ts', extensions: './src/extensions.ts', services: './src/services.ts', l10n: './src/l10n.ts', @@ -875,6 +876,10 @@ export default (args: Record): rollup.RollupOptions[] => { types: './services.d.ts', default: './services.js' }, + './localExtensionHost': { + types: './localExtensionHost.d.ts', + default: './localExtensionHost.js' + }, './extensions': { types: './extensions.d.ts', default: './extensions.js' @@ -1032,7 +1037,7 @@ export default (args: Record): rollup.RollupOptions[] => { const isVscodeFile = resolved.startsWith(VSCODE_SRC_DIST_DIR) const isServiceOverride = path.dirname(resolved) === DIST_SERVICE_OVERRIDE_DIR_MAIN const isNotExclusive = (isVscodeFile || isServiceOverride) && !exclusiveModules.has(resolvedWithExtension) - const shouldBeShared = ['monaco.js', 'assets.js', 'lifecycle.js', 'workbench.js', 'missing-services.js'].includes(path.relative(DIST_DIR_MAIN, resolvedWithExtension)) + const shouldBeShared = ['services.js', 'extensions.js', 'monaco.js', 'assets.js', 'lifecycle.js', 'workbench.js', 'missing-services.js'].includes(path.relative(DIST_DIR_MAIN, resolvedWithExtension)) if (isNotExclusive || shouldBeShared) { // Those modules will be imported from external monaco-vscode-api diff --git a/rollup/rollup.types.config.ts b/rollup/rollup.types.config.ts index e4df0b03..a8a0092d 100644 --- a/rollup/rollup.types.config.ts +++ b/rollup/rollup.types.config.ts @@ -102,9 +102,7 @@ export default rollup.defineConfig((<{input: Record, output: str return chunkInfo.name.replace('node_modules', 'external') + '.ts' } return '[name].ts' - }, - // the extension file exposes a way to get the vscode API, so we should reference the proposed vscode types here too - banner: (chunk) => chunk.fileName === 'extensions.d.ts' ? '/// ' : '' + } }, external: (id) => isExternal(id, main), plugins: [ @@ -216,6 +214,23 @@ export default rollup.defineConfig((<{input: Record, output: str return code.replace('export import Severity = BaseSeverity;', 'type Severity = BaseSeverity; export { Severity }') } }, + { + name: 'resolve-vscode-proposed-types', + transform (code) { + return code.replace(/\/\/\/ /g, '/// ') + }, + async generateBundle () { + const types = await fastGlob('vscode.proposed.*.d.ts', { + cwd: VSCODE_SRC_DTS_DIR + }) + await Promise.all(types.map(async file => this.emitFile({ + type: 'asset', + needsCodeReference: false, + fileName: `vscode-dts/${file}`, + source: await fsPromise.readFile(path.resolve(VSCODE_SRC_DTS_DIR, file)) + }))) + } + }, { name: 'replace-interfaces', load (id) { @@ -280,21 +295,6 @@ export default rollup.defineConfig((<{input: Record, output: str return undefined } }, - { - name: 'vscode-proposed', - async generateBundle () { - const types = await fastGlob('vscode.proposed.*.d.ts', { - cwd: VSCODE_SRC_DTS_DIR - }) - const contents = await Promise.all(types.map(file => fsPromise.readFile(path.resolve(VSCODE_SRC_DTS_DIR, file)))) - this.emitFile({ - type: 'asset', - needsCodeReference: false, - fileName: 'vscode.proposed.d.ts', - source: contents.join('\n\n') - }) - } - }, dts({ respectExternal: true }) diff --git a/src/api.ts b/src/api.ts index 30130174..fe4fd7d1 100644 --- a/src/api.ts +++ b/src/api.ts @@ -27,7 +27,7 @@ function createProxy (key: T): typeof vscode[T] { return new Proxy({}, { get (target, p) { if (defaultApi == null) { - throw new Error('Default api is not ready yet, do not forget to call `initialize` from \'vscode/extensions\'') + throw new Error('Default api is not ready yet, do not forget to import \'vscode/localExtensionHost\' and wait for services initialization') } // eslint-disable-next-line @typescript-eslint/no-explicit-any return (defaultApi[key] as any)[p] diff --git a/src/extensions.ts b/src/extensions.ts index 0e25d570..5553e49c 100644 --- a/src/extensions.ts +++ b/src/extensions.ts @@ -7,25 +7,23 @@ import { DisposableStore, IDisposable } from 'vs/base/common/lifecycle' import { ITranslations } from 'vs/platform/extensionManagement/common/extensionNls' import { joinPath } from 'vs/base/common/resources' import { FileAccess, Schemas } from 'vs/base/common/network' -import { Barrier } from 'vs/base/common/async' import { ExtensionHostKind } from 'vs/workbench/services/extensions/common/extensionHostKind' import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService' import { parse } from 'vs/base/common/json' import { IFileService } from 'vs/platform/files/common/files' import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' -import { IExtensionWithExtHostKind, ExtensionServiceOverride, getLocalExtHostExtensionService } from './service-override/extensions' +import { IExtensionWithExtHostKind, ExtensionServiceOverride } from './service-override/extensions' import { CustomSchemas, registerExtensionFile } from './service-override/files' -import { setDefaultApi } from './api' import { getService } from './services' import { ExtensionManifestTranslator } from './tools/l10n' import { throttle } from './tools' +import { setDefaultApi } from './api' + +export type ApiFactory = (extensionId?: string) => Promise -const defaultApiInitializeBarrier = new Barrier() -export async function initialize (): Promise { - await getLocalExtHostExtensionService().then(async (extHostExtensionService) => { - setDefaultApi(await extHostExtensionService.getApi()) - defaultApiInitializeBarrier.open() - }) +let apiFactory: ApiFactory | undefined +export function registerLocalApiFactory (_apiFactory: ApiFactory): void { + apiFactory = _apiFactory } interface RegisterExtensionParams { @@ -155,7 +153,10 @@ export function registerExtension (manifest: IExtensionManifest, extHostKind?: E if (extHostKind === ExtensionHostKind.LocalProcess) { async function getApi () { await addExtensionPromise - return (await getLocalExtHostExtensionService()).getApi(id) + if (apiFactory == null) { + throw new Error('The local api can\'t be used without registering the local extension host by importing `vscode/localExtensionHost`') + } + return apiFactory(id) } api = { @@ -170,14 +171,9 @@ export function registerExtension (manifest: IExtensionManifest, extHostKind?: E return api } -function onExtHostInitialized (fct: () => void): void { - void defaultApiInitializeBarrier.wait().then(fct) -} - export { IExtensionManifest, ITranslations, IExtensionContributions, - onExtHostInitialized, ExtensionHostKind } diff --git a/src/localExtensionHost.ts b/src/localExtensionHost.ts new file mode 100644 index 00000000..dab435a5 --- /dev/null +++ b/src/localExtensionHost.ts @@ -0,0 +1,245 @@ +// We need to import missing service here because extHost.common.services registers ILoggerService and we want the implementation from missing-service to win +import './missing-services' +// We need it for the local extHost +import 'vs/workbench/api/common/extHost.common.services' +import type * as vscode from 'vscode' +import { ExtensionHostMain } from 'vs/workbench/api/common/extensionHostMain' +import { BufferedEmitter } from 'vs/base/parts/ipc/common/ipc.net' +import { VSBuffer } from 'vs/base/common/buffer' +import { isLoggingOnly } from 'vs/platform/telemetry/common/telemetryUtils' +import { joinPath } from 'vs/base/common/resources' +import { IExtensionHostInitData, UIKind } from 'vs/workbench/services/extensions/common/extensionHostProtocol' +import * as platform from 'vs/base/common/platform' +import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc' +import { LocalProcessRunningLocation } from 'vs/workbench/services/extensions/common/extensionRunningLocation' +import { IExtHostExtensionService, IHostUtils } from 'vs/workbench/api/common/extHostExtensionService' +import { ExtensionHostExtensions, ExtensionHostStartup, IExtensionHost, nullExtensionDescription } from 'vs/workbench/services/extensions/common/extensions' +import { IWebWorkerExtensionHostDataProvider } from 'vs/workbench/services/extensions/browser/webWorkerExtensionHost' +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry' +import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace' +import { ILabelService } from 'vs/platform/label/common/label' +import { ILogService, ILoggerService } from 'vs/platform/log/common/log' +import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService' +import { IProductService } from 'vs/platform/product/common/productService' +import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile' +import { URI } from 'vs/base/common/uri' +import { Event } from 'vs/base/common/event' +import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions' +import { ExtensionStoragePaths, IExtensionStoragePaths } from 'vs/workbench/api/common/extHostStoragePaths' +import { ExtHostExtensionService } from 'vs/workbench/api/worker/extHostExtensionService' +import { ExtensionIdentifierMap } from 'vs/platform/extensions/common/extensions' +import { DeferredPromise } from 'vs/base/common/async' +import { setLocalExtensionHost } from './service-override/extensions' +import { unsupported } from './tools' +import { ApiFactory, registerLocalApiFactory } from './extensions' +import { setDefaultApi } from './api' +import { registerServiceInitializePostParticipant } from './lifecycle' + +const apiFactoryDeferred = new DeferredPromise() + +class LocalExtHostExtensionService extends ExtHostExtensionService { + private _defaultApiImpl?: typeof vscode + + private readonly _extApiImpl = new ExtensionIdentifierMap() + + public async getApi (extensionId?: string): Promise { + const [myRegistry, configProvider] = await Promise.all([ + this.getExtensionRegistry(), + this._extHostConfiguration.getConfigProvider() + ]) + const extensionRegistry = { mine: myRegistry, all: this._globalRegistry } + + const ext = extensionId != null ? myRegistry.getExtensionDescription(extensionId) : undefined + if (ext != null) { + let apiImpl = this._extApiImpl.get(ext.identifier) + if (apiImpl == null) { + apiImpl = this._apiFactory!(ext, extensionRegistry, configProvider) + this._extApiImpl.set(ext.identifier, apiImpl) + } + return apiImpl + } + + // fall back to a default implementation + if (this._defaultApiImpl == null) { + this._defaultApiImpl = this._apiFactory!(nullExtensionDescription, extensionRegistry, configProvider) + } + return this._defaultApiImpl + } +} + +registerSingleton(IExtHostExtensionService, LocalExtHostExtensionService, InstantiationType.Eager) +registerSingleton(IExtensionStoragePaths, ExtensionStoragePaths, InstantiationType.Eager) + +function createMessagePassingProtocolPair (): [IMessagePassingProtocol, IMessagePassingProtocol] { + const emitterA = new BufferedEmitter() + const emitterB = new BufferedEmitter() + + class SimpleMessagePassingProtocol implements IMessagePassingProtocol { + constructor ( + private readonly emitterIn: BufferedEmitter, + private readonly emitterOut: BufferedEmitter + ) {} + + send (buffer: VSBuffer): void { + this.emitterOut.fire(buffer) + } + + onMessage = this.emitterIn.event + } + + return [new SimpleMessagePassingProtocol(emitterA, emitterB), new SimpleMessagePassingProtocol(emitterB, emitterA)] +} + +const hostUtil = new class implements IHostUtils { + declare readonly _serviceBrand: undefined + public readonly pid = undefined + exit = unsupported + + async exists (_path: string): Promise { + return true + } + + async realpath (path: string): Promise { + return path + } +}() + +class LocalExtensionHost implements IExtensionHost { + public readonly remoteAuthority = null + public extensions: ExtensionHostExtensions | null = null + private readonly _extensionHostLogsLocation: URI + private _protocolPromise: Promise | null + + constructor ( + public readonly runningLocation: LocalProcessRunningLocation, + public readonly startup: ExtensionHostStartup, + private readonly _initDataProvider: IWebWorkerExtensionHostDataProvider, + @ITelemetryService private readonly _telemetryService: ITelemetryService, + @IWorkspaceContextService private readonly _contextService: IWorkspaceContextService, + @ILabelService private readonly _labelService: ILabelService, + @ILogService private readonly _logService: ILogService, + @ILoggerService private readonly _loggerService: ILoggerService, + @IBrowserWorkbenchEnvironmentService private readonly _environmentService: IBrowserWorkbenchEnvironmentService, + @IProductService private readonly _productService: IProductService, + @IUserDataProfilesService private readonly _userDataProfilesService: IUserDataProfilesService + ) { + this._protocolPromise = null + this._extensionHostLogsLocation = joinPath(this._environmentService.extHostLogsPath, 'local') + } + + onExit = Event.None + public async start (): Promise { + if (this._protocolPromise == null) { + this._protocolPromise = this._start() + } + return this._protocolPromise + } + + async _start (): Promise { + const [mainThreadMessagePassingProtocol, extHostMessagePassingProtocol] = createMessagePassingProtocolPair() + const initData = await this._createExtHostInitData() + + // eslint-disable-next-line no-new + const hostMain = new ExtensionHostMain( + extHostMessagePassingProtocol, + initData, + hostUtil, + null + ) + + const localExtHostExtensionService = hostMain.getExtHostExtensionService() as LocalExtHostExtensionService + + await apiFactoryDeferred.complete((extensionId?: string) => localExtHostExtensionService.getApi(extensionId)) + + return mainThreadMessagePassingProtocol + } + + private async _createExtHostInitData (): Promise { + const initData = await this._initDataProvider.getInitData() + this.extensions = initData.extensions + const workspace = this._contextService.getWorkspace() + const nlsBaseUrl = this._productService.extensionsGallery?.nlsBaseUrl + let nlsUrlWithDetails: URI | undefined + // Only use the nlsBaseUrl if we are using a language other than the default, English. + if (nlsBaseUrl != null && this._productService.commit != null && !platform.Language.isDefaultVariant()) { + nlsUrlWithDetails = URI.joinPath(URI.parse(nlsBaseUrl), this._productService.commit, this._productService.version, platform.Language.value()) + } + return { + commit: this._productService.commit, + version: this._productService.version, + quality: this._productService.quality, + parentPid: 0, + environment: { + isExtensionDevelopmentDebug: this._environmentService.debugRenderer, + appName: this._productService.nameLong, + appHost: this._productService.embedderIdentifier ?? (platform.isWeb ? 'web' : 'desktop'), + appUriScheme: this._productService.urlProtocol, + appLanguage: platform.language, + extensionTelemetryLogResource: this._environmentService.extHostTelemetryLogFile, + isExtensionTelemetryLoggingOnly: isLoggingOnly(this._productService, this._environmentService), + extensionDevelopmentLocationURI: this._environmentService.extensionDevelopmentLocationURI, + extensionTestsLocationURI: this._environmentService.extensionTestsLocationURI, + globalStorageHome: this._userDataProfilesService.defaultProfile.globalStorageHome, + workspaceStorageHome: this._environmentService.workspaceStorageHome, + extensionLogLevel: this._environmentService.extensionLogLevel + }, + workspace: this._contextService.getWorkbenchState() === WorkbenchState.EMPTY + ? undefined + : { + configuration: workspace.configuration ?? undefined, + id: workspace.id, + name: this._labelService.getWorkspaceLabel(workspace), + transient: workspace.transient + }, + consoleForward: { + includeStack: false, + logNative: this._environmentService.debugRenderer + }, + extensions: initData.extensions.toSnapshot(), + nlsBaseUrl: nlsUrlWithDetails, + telemetryInfo: { + sessionId: this._telemetryService.sessionId, + machineId: this._telemetryService.machineId, + firstSessionDate: this._telemetryService.firstSessionDate, + msftInternal: this._telemetryService.msftInternal + }, + logLevel: this._logService.getLevel(), + loggers: [...this._loggerService.getRegisteredLoggers()], + logsLocation: this._extensionHostLogsLocation, + autoStart: (this.startup === ExtensionHostStartup.EagerAutoStart), + remote: { + authority: this._environmentService.remoteAuthority, + connectionData: null, + isRemote: false + }, + uiKind: platform.isWeb ? UIKind.Web : UIKind.Desktop + } + } + + getInspectPort (): number | undefined { + return undefined + } + + enableInspectPort (): Promise { + return Promise.resolve(false) + } + + dispose (): void { + } +} + +export type { + LocalExtensionHost +} + +async function createLocalApi (extensionId?: string): Promise { + const apiFactory = await apiFactoryDeferred.p + return apiFactory(extensionId) +} + +setLocalExtensionHost(LocalExtensionHost) +registerLocalApiFactory(createLocalApi) + +registerServiceInitializePostParticipant(async () => { + setDefaultApi(await createLocalApi()) +}) diff --git a/src/service-override/configuration.ts b/src/service-override/configuration.ts index 935eb0ff..e0e0fd19 100644 --- a/src/service-override/configuration.ts +++ b/src/service-override/configuration.ts @@ -14,7 +14,6 @@ import { IColorCustomizations, IThemeScopedColorCustomizations } from 'vs/workbe import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile' import { IPolicyService } from 'vs/platform/policy/common/policy' import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' -import type * as vscode from 'vscode' import { IUserDataProfileService } from 'vs/workbench/services/userDataProfile/common/userDataProfile' import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService' import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity' @@ -32,6 +31,7 @@ import { AbstractWorkspaceEditingService } from 'vs/workbench/services/workspace import { URI } from 'vs/base/common/uri' import 'vs/workbench/api/common/configurationExtensionPoint' import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService' +import { IDisposable } from 'vs/base/common/lifecycle' import getFileServiceOverride, { initFile } from './files' import { memoizedConstructor, unsupported } from '../tools' import { registerServiceInitializePreParticipant } from '../lifecycle' @@ -61,7 +61,7 @@ async function getUserConfiguration (): Promise { return (await StandaloneServices.get(IFileService).readFile(userDataProfilesService.defaultProfile.settingsResource)).value.toString() } -function onUserConfigurationChange (callback: () => void): vscode.Disposable { +function onUserConfigurationChange (callback: () => void): IDisposable { const userDataProfilesService = StandaloneServices.get(IUserDataProfilesService) return StandaloneServices.get(IFileService).onDidFilesChange(e => { if (e.affects(userDataProfilesService.defaultProfile.settingsResource)) { diff --git a/src/service-override/extensionGallery.ts b/src/service-override/extensionGallery.ts index 44147a5f..e36b0193 100644 --- a/src/service-override/extensionGallery.ts +++ b/src/service-override/extensionGallery.ts @@ -27,7 +27,9 @@ import { ExtensionEnablementService } from 'vs/workbench/services/extensionManag import 'vs/workbench/contrib/extensions/browser/extensions.contribution' import 'vs/workbench/contrib/extensions/browser/extensions.web.contribution' import { ExtensionUrlHandler, IExtensionUrlHandler } from 'vs/workbench/services/extensions/browser/extensionUrlHandler' -import { IInstantiationService, ILabelService, IRemoteAgentService } from '../services' +import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService' +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' +import { ILabelService } from 'vs/platform/label/common/label' import { registerAssets } from '../assets' // plugin-import-meta-asset only allows relative paths diff --git a/src/service-override/extensions.ts b/src/service-override/extensions.ts index 4ef14283..25199bfe 100644 --- a/src/service-override/extensions.ts +++ b/src/service-override/extensions.ts @@ -1,14 +1,13 @@ import { IFileService } from 'vs/platform/files/common/files' import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle' -import { ExtensionHostExtensions, ExtensionHostStartup, IExtensionHost, IExtensionService, nullExtensionDescription, toExtensionDescription } from 'vs/workbench/services/extensions/common/extensions' +import { ExtensionHostStartup, IExtensionHost, IExtensionService, toExtensionDescription } from 'vs/workbench/services/extensions/common/extensions' import { ILogService, ILoggerService } from 'vs/platform/log/common/log' -import { ExtensionIdentifier, ExtensionIdentifierMap, IExtension, IExtensionDescription, IRelaxedExtensionDescription } from 'vs/platform/extensions/common/extensions' -import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace' +import { ExtensionIdentifier, IExtension, IExtensionDescription, IRelaxedExtensionDescription } from 'vs/platform/extensions/common/extensions' +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace' import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' import { INotificationService } from 'vs/platform/notification/common/notification' import { DeltaExtensionsQueueItem } from 'vs/workbench/services/extensions/common/abstractExtensionService' import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry' -import { Event } from 'vs/base/common/event' import { IDialogService } from 'vs/platform/dialogs/common/dialogs' import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver' import { IRemoteExtensionsScannerService } from 'vs/platform/remote/common/remoteExtensionsScanner' @@ -24,24 +23,10 @@ import { IUserDataInitializationService } from 'vs/workbench/services/userData/b import { ExtensionsProposedApi } from 'vs/workbench/services/extensions/common/extensionsProposedApi' import { BrowserExtensionHostFactory, BrowserExtensionHostKindPicker, ExtensionService } from 'vs/workbench/services/extensions/browser/extensionService' import { ExtensionHostKind, ExtensionRunningPreference } from 'vs/workbench/services/extensions/common/extensionHostKind' -import { ExtensionRunningLocation, LocalProcessRunningLocation, LocalWebWorkerRunningLocation } from 'vs/workbench/services/extensions/common/extensionRunningLocation' +import { ExtensionRunningLocation, LocalWebWorkerRunningLocation } from 'vs/workbench/services/extensions/common/extensionRunningLocation' import { ExtensionRunningLocationTracker } from 'vs/workbench/services/extensions/common/extensionRunningLocationTracker' -import { IExtHostExtensionService, IHostUtils } from 'vs/workbench/api/common/extHostExtensionService' -import { ExtHostExtensionService } from 'vs/workbench/api/worker/extHostExtensionService' -import type * as vscode from 'vscode' import { URI } from 'vs/base/common/uri' -import * as platform from 'vs/base/common/platform' -import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions' -import { ExtensionStoragePaths, IExtensionStoragePaths } from 'vs/workbench/api/common/extHostStoragePaths' -import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc' import { IWebWorkerExtensionHostDataProvider, WebWorkerExtensionHost } from 'vs/workbench/services/extensions/browser/webWorkerExtensionHost' -import { ExtensionHostMain } from 'vs/workbench/api/common/extensionHostMain' -import { BufferedEmitter } from 'vs/base/parts/ipc/common/ipc.net' -import { VSBuffer } from 'vs/base/common/buffer' -import { isLoggingOnly } from 'vs/platform/telemetry/common/telemetryUtils' -import { joinPath } from 'vs/base/common/resources' -import { DeferredPromise } from 'vs/base/common/async' -import { IExtensionHostInitData, UIKind } from 'vs/workbench/services/extensions/common/extensionHostProtocol' import { IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile' import { ILayoutService } from 'vs/platform/layout/browser/layoutService' import { IStorageService } from 'vs/platform/storage/common/storage' @@ -55,205 +40,9 @@ import { ExtensionResourceLoaderService } from 'vs/platform/extensionResourceLoa import { IExtensionResourceLoaderService } from 'vs/platform/extensionResourceLoader/common/extensionResourceLoader' import { changeUrlDomain } from './tools/url' import { CustomSchemas } from './files' +import type { LocalExtensionHost } from '../localExtensionHost' import { registerAssets } from '../assets' -import { unsupported } from '../tools' import 'vs/workbench/api/browser/extensionHost.contribution' -// We need to import missing service here because extHost.common.services registers ILoggerService and we want the implementation from missing-service to win -import '../missing-services' -// We need it for the local extHost -import 'vs/workbench/api/common/extHost.common.services' - -function createMessagePassingProtocolPair (): [IMessagePassingProtocol, IMessagePassingProtocol] { - const emitterA = new BufferedEmitter() - const emitterB = new BufferedEmitter() - - class SimpleMessagePassingProtocol implements IMessagePassingProtocol { - constructor ( - private readonly emitterIn: BufferedEmitter, - private readonly emitterOut: BufferedEmitter - ) {} - - send (buffer: VSBuffer): void { - this.emitterOut.fire(buffer) - } - - onMessage = this.emitterIn.event - } - - return [new SimpleMessagePassingProtocol(emitterA, emitterB), new SimpleMessagePassingProtocol(emitterB, emitterA)] -} - -export class LocalExtHostExtensionService extends ExtHostExtensionService { - private _defaultApiImpl?: typeof vscode - - private readonly _extApiImpl = new ExtensionIdentifierMap() - - public async getApi (extensionId?: string): Promise { - const [myRegistry, configProvider] = await Promise.all([ - this.getExtensionRegistry(), - this._extHostConfiguration.getConfigProvider() - ]) - const extensionRegistry = { mine: myRegistry, all: this._globalRegistry } - - const ext = extensionId != null ? myRegistry.getExtensionDescription(extensionId) : undefined - if (ext != null) { - let apiImpl = this._extApiImpl.get(ext.identifier) - if (apiImpl == null) { - apiImpl = this._apiFactory!(ext, extensionRegistry, configProvider) - this._extApiImpl.set(ext.identifier, apiImpl) - } - return apiImpl - } - - // fall back to a default implementation - if (this._defaultApiImpl == null) { - this._defaultApiImpl = this._apiFactory!(nullExtensionDescription, extensionRegistry, configProvider) - } - return this._defaultApiImpl - } -} - -registerSingleton(IExtHostExtensionService, LocalExtHostExtensionService, InstantiationType.Eager) -registerSingleton(IExtensionStoragePaths, ExtensionStoragePaths, InstantiationType.Eager) - -const hostUtil = new class implements IHostUtils { - declare readonly _serviceBrand: undefined - public readonly pid = undefined - exit = unsupported - - async exists (_path: string): Promise { - return true - } - - async realpath (path: string): Promise { - return path - } -}() - -const localExtHostDeferred = new DeferredPromise() -const localExtHostPromise = localExtHostDeferred.p - -class LocalExtensionHost implements IExtensionHost { - public readonly remoteAuthority = null - public extensions: ExtensionHostExtensions | null = null - private readonly _extensionHostLogsLocation: URI - private _protocolPromise: Promise | null - - constructor ( - public readonly runningLocation: LocalProcessRunningLocation, - public readonly startup: ExtensionHostStartup, - private readonly _initDataProvider: IWebWorkerExtensionHostDataProvider, - @ITelemetryService private readonly _telemetryService: ITelemetryService, - @IWorkspaceContextService private readonly _contextService: IWorkspaceContextService, - @ILabelService private readonly _labelService: ILabelService, - @ILogService private readonly _logService: ILogService, - @ILoggerService private readonly _loggerService: ILoggerService, - @IBrowserWorkbenchEnvironmentService private readonly _environmentService: IBrowserWorkbenchEnvironmentService, - @IProductService private readonly _productService: IProductService, - @IUserDataProfilesService private readonly _userDataProfilesService: IUserDataProfilesService - ) { - this._protocolPromise = null - this._extensionHostLogsLocation = joinPath(this._environmentService.extHostLogsPath, 'local') - } - - onExit = Event.None - public async start (): Promise { - if (this._protocolPromise == null) { - this._protocolPromise = this._start() - } - return this._protocolPromise - } - - async _start (): Promise { - const [mainThreadMessagePassingProtocol, extHostMessagePassingProtocol] = createMessagePassingProtocolPair() - const initData = await this._createExtHostInitData() - - // eslint-disable-next-line no-new - const hostMain = new ExtensionHostMain( - extHostMessagePassingProtocol, - initData, - hostUtil, - null - ) - - await localExtHostDeferred.complete(hostMain.getExtHostExtensionService() as LocalExtHostExtensionService) - - return mainThreadMessagePassingProtocol - } - - private async _createExtHostInitData (): Promise { - const initData = await this._initDataProvider.getInitData() - this.extensions = initData.extensions - const workspace = this._contextService.getWorkspace() - const nlsBaseUrl = this._productService.extensionsGallery?.nlsBaseUrl - let nlsUrlWithDetails: URI | undefined - // Only use the nlsBaseUrl if we are using a language other than the default, English. - if (nlsBaseUrl != null && this._productService.commit != null && !platform.Language.isDefaultVariant()) { - nlsUrlWithDetails = URI.joinPath(URI.parse(nlsBaseUrl), this._productService.commit, this._productService.version, platform.Language.value()) - } - return { - commit: this._productService.commit, - version: this._productService.version, - quality: this._productService.quality, - parentPid: 0, - environment: { - isExtensionDevelopmentDebug: this._environmentService.debugRenderer, - appName: this._productService.nameLong, - appHost: this._productService.embedderIdentifier ?? (platform.isWeb ? 'web' : 'desktop'), - appUriScheme: this._productService.urlProtocol, - appLanguage: platform.language, - extensionTelemetryLogResource: this._environmentService.extHostTelemetryLogFile, - isExtensionTelemetryLoggingOnly: isLoggingOnly(this._productService, this._environmentService), - extensionDevelopmentLocationURI: this._environmentService.extensionDevelopmentLocationURI, - extensionTestsLocationURI: this._environmentService.extensionTestsLocationURI, - globalStorageHome: this._userDataProfilesService.defaultProfile.globalStorageHome, - workspaceStorageHome: this._environmentService.workspaceStorageHome, - extensionLogLevel: this._environmentService.extensionLogLevel - }, - workspace: this._contextService.getWorkbenchState() === WorkbenchState.EMPTY - ? undefined - : { - configuration: workspace.configuration ?? undefined, - id: workspace.id, - name: this._labelService.getWorkspaceLabel(workspace), - transient: workspace.transient - }, - consoleForward: { - includeStack: false, - logNative: this._environmentService.debugRenderer - }, - extensions: initData.extensions.toSnapshot(), - nlsBaseUrl: nlsUrlWithDetails, - telemetryInfo: { - sessionId: this._telemetryService.sessionId, - machineId: this._telemetryService.machineId, - firstSessionDate: this._telemetryService.firstSessionDate, - msftInternal: this._telemetryService.msftInternal - }, - logLevel: this._logService.getLevel(), - loggers: [...this._loggerService.getRegisteredLoggers()], - logsLocation: this._extensionHostLogsLocation, - autoStart: (this.startup === ExtensionHostStartup.EagerAutoStart), - remote: { - authority: this._environmentService.remoteAuthority, - connectionData: null, - isRemote: false - }, - uiKind: platform.isWeb ? UIKind.Web : UIKind.Desktop - } - } - - getInspectPort (): number | undefined { - return undefined - } - - enableInspectPort (): Promise { - return Promise.resolve(false) - } - - dispose (): void { - } -} export interface WorkerConfig { url: string @@ -292,7 +81,12 @@ class EsmWebWorkerExtensionHost extends WebWorkerExtensionHost { } } -class LocalBrowserExtensionHostFactory extends BrowserExtensionHostFactory { +let localExtensionHost: (typeof LocalExtensionHost) | undefined +function setLocalExtensionHost (_localExtensionHost: typeof LocalExtensionHost): void { + localExtensionHost = _localExtensionHost +} + +class BrowserExtensionHostFactoryOverride extends BrowserExtensionHostFactory { constructor ( private readonly workerConfig: WorkerConfig | undefined, _extensionsProposedApi: ExtensionsProposedApi, @@ -310,7 +104,10 @@ class LocalBrowserExtensionHostFactory extends BrowserExtensionHostFactory { override createExtensionHost (runningLocations: ExtensionRunningLocationTracker, runningLocation: ExtensionRunningLocation, isInitialStart: boolean): IExtensionHost | null { switch (runningLocation.kind) { case ExtensionHostKind.LocalProcess: { - return this._instantiationService.createInstance(LocalExtensionHost, runningLocation, ExtensionHostStartup.EagerAutoStart, this._createLocalExtensionHostDataProvider(runningLocations, runningLocation, isInitialStart)) + if (localExtensionHost == null) { + return null + } + return this._instantiationService.createInstance(localExtensionHost, runningLocation, ExtensionHostStartup.EagerAutoStart, this._createLocalExtensionHostDataProvider(runningLocations, runningLocation, isInitialStart)) } case ExtensionHostKind.LocalWebWorker: { if (this.workerConfig == null) { @@ -391,7 +188,7 @@ export class ExtensionServiceOverride extends ExtensionService implements IExten @IDialogService dialogService: IDialogService ) { const extensionsProposedApi = instantiationService.createInstance(ExtensionsProposedApi) - const extensionHostFactory = new LocalBrowserExtensionHostFactory( + const extensionHostFactory = new BrowserExtensionHostFactoryOverride( workerConfig, extensionsProposedApi, async () => this._scanWebExtensions(), @@ -492,10 +289,7 @@ export default function getServiceOverride (workerConfig?: WorkerConfig, _iframe } } -export function getLocalExtHostExtensionService (): Promise { - return localExtHostPromise -} - export { - ExtensionHostKind + ExtensionHostKind, + setLocalExtensionHost } diff --git a/tsconfig.types.json b/tsconfig.types.json index a1b9ed85..af58a417 100644 --- a/tsconfig.types.json +++ b/tsconfig.types.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "module": "es2020", + "module": "es2022", "moduleResolution": "node", "target": "es2020", "outDir": "dist/types", @@ -61,6 +61,7 @@ "src/services.ts", "src/types.d.ts", "src/extensions.ts", + "src/localExtensionHost.ts", "src/service-override/*.ts", "src/monaco.ts", "src/l10n.ts",