vscode/extensions/vscode-test-resolver/package.json
Connor Peet f5427eed53
remote: first cut at 'inline' remote resolvers
For web, it seems the most feasible direction for resolvers as we make
existing remote extensions 'web enabled' is to allow them to run in the
extension host. However, in no case will there just be a simple
websocket we can connect to ordinarily.

This PR implements a first cut at 'inline' resolvers where messaging is
done in the extension host. I have not yet tested them on web, where I
think some more wiring is needed to mirror desktop. Also, resolution of
URLs is not in yet. I think for this we'd want to do some service-worker
-based 'loopback' approach to run requests inline in the remote
connection, similar to what I did for tunnels...

Resolvers are not yet run in a dedicated extension host, but I think
that should happen, at least on web where resolvers
will always(?) be 'inline'.

Most of the actual changes are genericizing places where we specified
the "host" and "port" previously into an enum. Additionally, instead of
having a single ISocketFactory, there's now a collection of them, which
the extension host manager registers into when a managed resolution
happens.
2023-04-18 15:54:20 -07:00

173 lines
5.2 KiB
JSON

{
"name": "vscode-test-resolver",
"description": "Test resolver for VS Code",
"version": "0.0.1",
"publisher": "vscode",
"license": "MIT",
"enableProposedApi": true,
"enabledApiProposals": [
"resolvers",
"tunnels"
],
"private": true,
"engines": {
"vscode": "^1.25.0"
},
"icon": "media/icon.png",
"extensionKind": [
"ui"
],
"scripts": {
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./",
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-test-resolver"
},
"activationEvents": [
"onResolveRemoteAuthority:test",
"onCommand:vscode-testresolver.newWindow",
"onCommand:vscode-testresolver.currentWindow",
"onCommand:vscode-testresolver.newWindowWithError",
"onCommand:vscode-testresolver.showLog",
"onCommand:vscode-testresolver.openTunnel",
"onCommand:vscode-testresolver.startRemoteServer",
"onCommand:vscode-testresolver.toggleConnectionPause"
],
"main": "./out/extension",
"devDependencies": {
"@types/node": "16.x"
},
"capabilities": {
"untrustedWorkspaces": {
"supported": true
},
"virtualWorkspaces": true
},
"contributes": {
"resourceLabelFormatters": [
{
"scheme": "vscode-remote",
"authority": "test+*",
"formatting": {
"label": "${path}",
"separator": "/",
"tildify": true,
"workspaceSuffix": "TestResolver",
"workspaceTooltip": "Remote running on the same machine"
}
}
],
"commands": [
{
"title": "New TestResolver Window",
"category": "Remote-TestResolver",
"command": "vscode-testresolver.newWindow"
},
{
"title": "Connect to TestResolver in Current Window",
"category": "Remote-TestResolver",
"command": "vscode-testresolver.currentWindow"
},
{
"title": "Connect to TestResolver in Current Window with Managed Connection",
"category": "Remote-TestResolver",
"command": "vscode-testresolver.currentWindowManaged"
},
{
"title": "Show TestResolver Log",
"category": "Remote-TestResolver",
"command": "vscode-testresolver.showLog"
},
{
"title": "Kill Remote Server and Trigger Handled Error",
"category": "Remote-TestResolver",
"command": "vscode-testresolver.killServerAndTriggerHandledError"
},
{
"title": "Open Tunnel...",
"category": "Remote-TestResolver",
"command": "vscode-testresolver.openTunnel"
},
{
"title": "Open a Remote Port...",
"category": "Remote-TestResolver",
"command": "vscode-testresolver.startRemoteServer"
},
{
"title": "Pause Connection (Test Reconnect)",
"category": "Remote-TestResolver",
"command": "vscode-testresolver.toggleConnectionPause"
}
],
"menus": {
"commandPalette": [
{
"command": "vscode-testresolver.openTunnel",
"when": "remoteName == test"
},
{
"command": "vscode-testresolver.startRemoteServer",
"when": "remoteName == test"
},
{
"command": "vscode-testresolver.toggleConnectionPause",
"when": "remoteName == test"
}
],
"statusBar/remoteIndicator": [
{
"command": "vscode-testresolver.newWindow",
"when": "!remoteName && !virtualWorkspace",
"group": "remote_90_test_1_local@2"
},
{
"command": "vscode-testresolver.showLog",
"when": "remoteName == test",
"group": "remote_90_test_1_open@3"
},
{
"command": "vscode-testresolver.newWindow",
"when": "remoteName == test",
"group": "remote_90_test_1_open@1"
},
{
"command": "vscode-testresolver.openTunnel",
"when": "remoteName == test",
"group": "remote_90_test_2_more@4"
},
{
"command": "vscode-testresolver.startRemoteServer",
"when": "remoteName == test",
"group": "remote_90_test_2_more@5"
},
{
"command": "vscode-testresolver.toggleConnectionPause",
"when": "remoteName == test",
"group": "remote_90_test_2_more@6"
}
]
},
"configuration": {
"properties": {
"testresolver.startupDelay": {
"description": "If set, the resolver will delay for the given amount of seconds. Use ths setting for testing a slow resolver",
"type": "number",
"default": 0
},
"testresolver.startupError": {
"description": "If set, the resolver will fail. Use ths setting for testing the failure of a resolver.",
"type": "boolean",
"default": false
},
"testresolver.supportPublicPorts": {
"description": "If set, the test resolver tunnel factory will support mock public ports. Forwarded ports will not actually be public. Requires reload.",
"type": "boolean",
"default": false
}
}
}
},
"repository": {
"type": "git",
"url": "https://github.com/microsoft/vscode.git"
}
}