@codingame/monaco-vscode-api 1.83.14 → 1.83.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.js +1 -1
- package/contributions.js +36 -0
- package/extensions.d.ts +83 -4
- package/extensions.js +9 -14
- package/lifecycle.js +4 -1
- package/localExtensionHost.js +207 -0
- package/missing-services.js +15 -3
- package/monaco-editor-treemending.patch +966 -955
- package/monaco.js +4 -36
- package/package.json +10 -6
- package/service-override/tools/editor.d.ts +6 -6
- package/services.d.ts +18 -18
- package/services.js +1 -0
- package/vscode/src/vs/base/common/errors.d.ts +1 -8
- package/vscode/src/vs/base/common/uri.d.ts +1 -7
- package/vscode/src/vs/platform/terminal/common/terminal.d.ts +2 -27
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.d.ts +39 -1
- package/vscode/src/vs/platform/workspace/common/workspace.d.ts +1 -44
- package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +160 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +564 -11
- package/vscode/src/vs/workbench/contrib/scm/common/scm.js +9 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +1 -0
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +594 -2
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +307 -1
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +10 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.d.ts +2 -37
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostProtocol.d.ts +2 -73
- package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +1 -5
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.js +6 -2
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +174 -0
- package/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts +49 -0
- package/vscode-dts/vscode.proposed.authGetSessions.d.ts +62 -0
- package/vscode-dts/vscode.proposed.authSession.d.ts +13 -0
- package/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts +47 -0
- package/vscode-dts/vscode.proposed.chat.d.ts +25 -0
- package/vscode-dts/vscode.proposed.chatAgents.d.ts +39 -0
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +38 -0
- package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +47 -0
- package/vscode-dts/vscode.proposed.chatSlashCommands.d.ts +47 -0
- package/vscode-dts/vscode.proposed.chatVariables.d.ts +35 -0
- package/vscode-dts/vscode.proposed.codiconDecoration.d.ts +48 -0
- package/vscode-dts/vscode.proposed.commentsDraftState.d.ts +18 -0
- package/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts +10 -0
- package/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribEditSessions.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribShareMenu.d.ts +7 -0
- package/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribViewsRemote.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts +6 -0
- package/vscode-dts/vscode.proposed.customEditorMove.d.ts +29 -0
- package/vscode-dts/vscode.proposed.debugFocus.d.ts +74 -0
- package/vscode-dts/vscode.proposed.diffCommand.d.ts +38 -0
- package/vscode-dts/vscode.proposed.diffContentOptions.d.ts +16 -0
- package/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts +13 -0
- package/vscode-dts/vscode.proposed.documentPaste.d.ts +111 -0
- package/vscode-dts/vscode.proposed.dropMetadata.d.ts +60 -0
- package/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts +71 -0
- package/vscode-dts/vscode.proposed.editorInsets.d.ts +22 -0
- package/vscode-dts/vscode.proposed.extensionRuntime.d.ts +24 -0
- package/vscode-dts/vscode.proposed.extensionsAny.d.ts +40 -0
- package/vscode-dts/vscode.proposed.externalUriOpener.d.ts +163 -0
- package/vscode-dts/vscode.proposed.fileComments.d.ts +85 -0
- package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +67 -0
- package/vscode-dts/vscode.proposed.findTextInFiles.d.ts +104 -0
- package/vscode-dts/vscode.proposed.fsChunks.d.ts +16 -0
- package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +31 -0
- package/vscode-dts/vscode.proposed.idToken.d.ts +16 -0
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +71 -0
- package/vscode-dts/vscode.proposed.interactive.d.ts +227 -0
- package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +70 -0
- package/vscode-dts/vscode.proposed.interactiveWindow.d.ts +25 -0
- package/vscode-dts/vscode.proposed.ipc.d.ts +37 -0
- package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +42 -0
- package/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts +52 -0
- package/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts +17 -0
- package/vscode-dts/vscode.proposed.notebookDeprecated.d.ts +16 -0
- package/vscode-dts/vscode.proposed.notebookExecution.d.ts +39 -0
- package/vscode-dts/vscode.proposed.notebookKernelSource.d.ts +46 -0
- package/vscode-dts/vscode.proposed.notebookLiveShare.d.ts +21 -0
- package/vscode-dts/vscode.proposed.notebookMessaging.d.ts +68 -0
- package/vscode-dts/vscode.proposed.notebookMime.d.ts +33 -0
- package/vscode-dts/vscode.proposed.portsAttributes.d.ts +100 -0
- package/vscode-dts/vscode.proposed.profileContentHandlers.d.ts +19 -0
- package/vscode-dts/vscode.proposed.quickDiffProvider.d.ts +17 -0
- package/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts +16 -0
- package/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts +16 -0
- package/vscode-dts/vscode.proposed.readonlyMessage.d.ts +14 -0
- package/vscode-dts/vscode.proposed.resolvers.d.ts +371 -0
- package/vscode-dts/vscode.proposed.saveEditor.d.ts +35 -0
- package/vscode-dts/vscode.proposed.scmActionButton.d.ts +19 -0
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +77 -0
- package/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts +22 -0
- package/vscode-dts/vscode.proposed.scmTextDocument.d.ts +19 -0
- package/vscode-dts/vscode.proposed.scmValidation.d.ts +60 -0
- package/vscode-dts/vscode.proposed.shareProvider.d.ts +74 -0
- package/vscode-dts/vscode.proposed.showLocal.d.ts +19 -0
- package/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts +25 -0
- package/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts +16 -0
- package/vscode-dts/vscode.proposed.telemetry.d.ts +36 -0
- package/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts +32 -0
- package/vscode-dts/vscode.proposed.terminalDimensions.d.ts +39 -0
- package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +46 -0
- package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +83 -0
- package/vscode-dts/vscode.proposed.terminalSelection.d.ts +16 -0
- package/vscode-dts/vscode.proposed.testCoverage.d.ts +198 -0
- package/vscode-dts/vscode.proposed.testMessageContextValue.d.ts +45 -0
- package/vscode-dts/vscode.proposed.testObserver.d.ts +184 -0
- package/vscode-dts/vscode.proposed.textSearchProvider.d.ts +281 -0
- package/vscode-dts/vscode.proposed.timeline.d.ts +163 -0
- package/vscode-dts/vscode.proposed.tokenInformation.d.ts +26 -0
- package/vscode-dts/vscode.proposed.treeViewActiveItem.d.ts +30 -0
- package/vscode-dts/vscode.proposed.treeViewMarkdownMessage.d.ts +28 -0
- package/vscode-dts/vscode.proposed.treeViewReveal.d.ts +13 -0
- package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +44 -0
- package/vscode-dts/vscode.proposed.tunnels.d.ts +64 -0
- package/vscode-dts/vscode.proposed.windowActivity.d.ts +17 -0
- package/vscode-dts/vscode.proposed.workspaceTrust.d.ts +30 -0
- package/vscode/src/vs/base/common/ternarySearchTree.d.ts +0 -46
- package/vscode/src/vs/base/common/uriIpc.d.ts +0 -10
- package/vscode/src/vs/platform/workspace/common/editSessions.d.ts +0 -7
- package/vscode/src/vs/workbench/services/extensions/common/proxyIdentifier.d.ts +0 -44
- package/vscode/src/vs/workbench/services/search/common/search.d.ts +0 -52
- package/vscode.proposed.d.ts +0 -4787
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/126280 @mjbvz
|
|
9
|
+
|
|
10
|
+
export interface NotebookCellData {
|
|
11
|
+
/**
|
|
12
|
+
* Mime type determines how the cell's `value` is interpreted.
|
|
13
|
+
*
|
|
14
|
+
* The mime selects which notebook renders is used to render the cell.
|
|
15
|
+
*
|
|
16
|
+
* If not set, internally the cell is treated as having a mime type of `text/plain`.
|
|
17
|
+
* Cells that set `language` to `markdown` instead are treated as `text/markdown`.
|
|
18
|
+
*/
|
|
19
|
+
mime?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface NotebookCell {
|
|
23
|
+
/**
|
|
24
|
+
* Mime type determines how the markup cell's `value` is interpreted.
|
|
25
|
+
*
|
|
26
|
+
* The mime selects which notebook renders is used to render the cell.
|
|
27
|
+
*
|
|
28
|
+
* If not set, internally the cell is treated as having a mime type of `text/plain`.
|
|
29
|
+
* Cells that set `language` to `markdown` instead are treated as `text/markdown`.
|
|
30
|
+
*/
|
|
31
|
+
mime: string | undefined;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/115616 @alexr00
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The action that should be taken when a port is discovered through automatic port forwarding discovery.
|
|
12
|
+
*/
|
|
13
|
+
export enum PortAutoForwardAction {
|
|
14
|
+
/**
|
|
15
|
+
* Notify the user that the port is being forwarded. This is the default action.
|
|
16
|
+
*/
|
|
17
|
+
Notify = 1,
|
|
18
|
+
/**
|
|
19
|
+
* Once the port is forwarded, open the user's web browser to the forwarded port.
|
|
20
|
+
*/
|
|
21
|
+
OpenBrowser = 2,
|
|
22
|
+
/**
|
|
23
|
+
* Once the port is forwarded, open the preview browser to the forwarded port.
|
|
24
|
+
*/
|
|
25
|
+
OpenPreview = 3,
|
|
26
|
+
/**
|
|
27
|
+
* Forward the port silently.
|
|
28
|
+
*/
|
|
29
|
+
Silent = 4,
|
|
30
|
+
/**
|
|
31
|
+
* Do not forward the port.
|
|
32
|
+
*/
|
|
33
|
+
Ignore = 5
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The attributes that a forwarded port can have.
|
|
38
|
+
*/
|
|
39
|
+
export class PortAttributes {
|
|
40
|
+
/**
|
|
41
|
+
* The action to be taken when this port is detected for auto forwarding.
|
|
42
|
+
*/
|
|
43
|
+
autoForwardAction: PortAutoForwardAction;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Creates a new PortAttributes object
|
|
47
|
+
* @param port the port number
|
|
48
|
+
* @param autoForwardAction the action to take when this port is detected
|
|
49
|
+
*/
|
|
50
|
+
constructor(autoForwardAction: PortAutoForwardAction);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A provider of port attributes. Port attributes are used to determine what action should be taken when a port is discovered.
|
|
55
|
+
*/
|
|
56
|
+
export interface PortAttributesProvider {
|
|
57
|
+
/**
|
|
58
|
+
* Provides attributes for the given port. For ports that your extension doesn't know about, simply
|
|
59
|
+
* return undefined. For example, if `providePortAttributes` is called with ports 3000 but your
|
|
60
|
+
* extension doesn't know anything about 3000 you should return undefined.
|
|
61
|
+
* @param port The port number of the port that attributes are being requested for.
|
|
62
|
+
* @param pid The pid of the process that is listening on the port. If the pid is unknown, undefined will be passed.
|
|
63
|
+
* @param commandLine The command line of the process that is listening on the port. If the command line is unknown, undefined will be passed.
|
|
64
|
+
* @param token A cancellation token that indicates the result is no longer needed.
|
|
65
|
+
*/
|
|
66
|
+
providePortAttributes(attributes: { port: number; pid?: number; commandLine?: string }, token: CancellationToken): ProviderResult<PortAttributes>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* A selector that will be used to filter which {@link PortAttributesProvider} should be called for each port.
|
|
71
|
+
*/
|
|
72
|
+
export interface PortAttributesSelector {
|
|
73
|
+
/**
|
|
74
|
+
* Specifying a port range will cause your provider to only be called for ports within the range.
|
|
75
|
+
* The start is inclusive and the end is exclusive.
|
|
76
|
+
*/
|
|
77
|
+
portRange?: [number, number] | number;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Specifying a command pattern will cause your provider to only be called for processes whose command line matches the pattern.
|
|
81
|
+
*/
|
|
82
|
+
commandPattern?: RegExp;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export namespace workspace {
|
|
86
|
+
/**
|
|
87
|
+
* If your extension listens on ports, consider registering a PortAttributesProvider to provide information
|
|
88
|
+
* about the ports. For example, a debug extension may know about debug ports in it's debuggee. By providing
|
|
89
|
+
* this information with a PortAttributesProvider the extension can tell the editor that these ports should be
|
|
90
|
+
* ignored, since they don't need to be user facing.
|
|
91
|
+
*
|
|
92
|
+
* The results of the PortAttributesProvider are merged with the user setting `remote.portsAttributes`. If the values conflict, the user setting takes precedence.
|
|
93
|
+
*
|
|
94
|
+
* @param portSelector It is best practice to specify a port selector to avoid unnecessary calls to your provider.
|
|
95
|
+
* If you don't specify a port selector your provider will be called for every port, which will result in slower port forwarding for the user.
|
|
96
|
+
* @param provider The {@link PortAttributesProvider PortAttributesProvider}.
|
|
97
|
+
*/
|
|
98
|
+
export function registerPortAttributesProvider(portSelector: PortAttributesSelector, provider: PortAttributesProvider): Disposable;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
export interface ProfileContentHandler {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly description?: string;
|
|
11
|
+
saveProfile(name: string, content: string, token: CancellationToken): Thenable<{ readonly id: string; readonly link: Uri } | null>;
|
|
12
|
+
readProfile(idOrUri: string | Uri, token: CancellationToken): Thenable<string | null>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export namespace window {
|
|
16
|
+
export function registerProfileContentHandler(id: string, profileContentHandler: ProfileContentHandler): Disposable;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/169012
|
|
9
|
+
|
|
10
|
+
export namespace window {
|
|
11
|
+
export function registerQuickDiffProvider(selector: DocumentSelector, quickDiffProvider: QuickDiffProvider, label: string, rootUri?: Uri): Disposable;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface QuickDiffProvider {
|
|
15
|
+
label?: string;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/175662
|
|
9
|
+
|
|
10
|
+
export interface QuickPickItem {
|
|
11
|
+
/**
|
|
12
|
+
* A tooltip that is rendered when hovering over the item.
|
|
13
|
+
*/
|
|
14
|
+
tooltip?: string | MarkdownString;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
// https://github.com/microsoft/vscode/issues/73904
|
|
9
|
+
|
|
10
|
+
export interface QuickPick<T extends QuickPickItem> extends QuickInput {
|
|
11
|
+
/**
|
|
12
|
+
* An optional flag to sort the final results by index of first query match in label. Defaults to true.
|
|
13
|
+
*/
|
|
14
|
+
sortByLabel: boolean;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
// https://github.com/microsoft/vscode/issues/166971
|
|
7
|
+
|
|
8
|
+
declare module 'vscode' {
|
|
9
|
+
|
|
10
|
+
export namespace workspace {
|
|
11
|
+
|
|
12
|
+
export function registerFileSystemProvider(scheme: string, provider: FileSystemProvider, options?: { readonly isCaseSensitive?: boolean; readonly isReadonly?: boolean | MarkdownString }): Disposable;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
|
|
8
|
+
//resolvers: @alexdima
|
|
9
|
+
|
|
10
|
+
export interface MessageOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Do not render a native message box.
|
|
13
|
+
*/
|
|
14
|
+
useCustom?: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface RemoteAuthorityResolverContext {
|
|
18
|
+
resolveAttempt: number;
|
|
19
|
+
/**
|
|
20
|
+
* Exec server from a recursively-resolved remote authority. If the
|
|
21
|
+
* remote authority includes nested authorities delimited by `@`, it is
|
|
22
|
+
* resolved from outer to inner authorities with ExecServer passed down
|
|
23
|
+
* to each resolver in the chain.
|
|
24
|
+
*/
|
|
25
|
+
execServer?: ExecServer;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export class ResolvedAuthority {
|
|
29
|
+
readonly host: string;
|
|
30
|
+
readonly port: number;
|
|
31
|
+
readonly connectionToken: string | undefined;
|
|
32
|
+
|
|
33
|
+
constructor(host: string, port: number, connectionToken?: string);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ManagedMessagePassing {
|
|
37
|
+
onDidReceiveMessage: Event<Uint8Array>;
|
|
38
|
+
onDidClose: Event<Error | undefined>;
|
|
39
|
+
onDidEnd: Event<void>;
|
|
40
|
+
|
|
41
|
+
send: (data: Uint8Array) => void;
|
|
42
|
+
end: () => void;
|
|
43
|
+
drain?: () => Thenable<void>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export class ManagedResolvedAuthority {
|
|
47
|
+
readonly makeConnection: () => Thenable<ManagedMessagePassing>;
|
|
48
|
+
readonly connectionToken: string | undefined;
|
|
49
|
+
|
|
50
|
+
constructor(makeConnection: () => Thenable<ManagedMessagePassing>, connectionToken?: string);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface ResolvedOptions {
|
|
54
|
+
extensionHostEnv?: { [key: string]: string | null };
|
|
55
|
+
|
|
56
|
+
isTrusted?: boolean;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* When provided, remote server will be initialized with the extensions synced using the given user account.
|
|
60
|
+
*/
|
|
61
|
+
authenticationSessionForInitializingExtensions?: AuthenticationSession & { providerId: string };
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface TunnelPrivacy {
|
|
65
|
+
themeIcon: string;
|
|
66
|
+
id: string;
|
|
67
|
+
label: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export namespace env {
|
|
71
|
+
/** Quality of the application. May be undefined if running from sources. */
|
|
72
|
+
export const appQuality: string | undefined;
|
|
73
|
+
/** Commit of the application. May be undefined if running from sources. */
|
|
74
|
+
export const appCommit: string | undefined;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface TunnelOptions {
|
|
78
|
+
remoteAddress: { port: number; host: string };
|
|
79
|
+
// The desired local port. If this port can't be used, then another will be chosen.
|
|
80
|
+
localAddressPort?: number;
|
|
81
|
+
label?: string;
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Use privacy instead
|
|
84
|
+
*/
|
|
85
|
+
public?: boolean;
|
|
86
|
+
privacy?: string;
|
|
87
|
+
protocol?: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
interface TunnelDescription {
|
|
91
|
+
remoteAddress: { port: number; host: string };
|
|
92
|
+
//The complete local address(ex. localhost:1234)
|
|
93
|
+
localAddress: { port: number; host: string } | string;
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated Use privacy instead
|
|
96
|
+
*/
|
|
97
|
+
public?: boolean;
|
|
98
|
+
privacy?: string;
|
|
99
|
+
// If protocol is not provided it is assumed to be http, regardless of the localAddress.
|
|
100
|
+
protocol?: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
interface Tunnel extends TunnelDescription {
|
|
104
|
+
// Implementers of Tunnel should fire onDidDispose when dispose is called.
|
|
105
|
+
onDidDispose: Event<void>;
|
|
106
|
+
dispose(): void | Thenable<void>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Used as part of the ResolverResult if the extension has any candidate,
|
|
111
|
+
* published, or forwarded ports.
|
|
112
|
+
*/
|
|
113
|
+
export interface TunnelInformation {
|
|
114
|
+
/**
|
|
115
|
+
* Tunnels that are detected by the extension. The remotePort is used for display purposes.
|
|
116
|
+
* The localAddress should be the complete local address (ex. localhost:1234) for connecting to the port. Tunnels provided through
|
|
117
|
+
* detected are read-only from the forwarded ports UI.
|
|
118
|
+
*/
|
|
119
|
+
environmentTunnels?: TunnelDescription[];
|
|
120
|
+
|
|
121
|
+
tunnelFeatures?: {
|
|
122
|
+
elevation: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* One of the the options must have the ID "private".
|
|
125
|
+
*/
|
|
126
|
+
privacyOptions: TunnelPrivacy[];
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface TunnelCreationOptions {
|
|
131
|
+
/**
|
|
132
|
+
* True when the local operating system will require elevation to use the requested local port.
|
|
133
|
+
*/
|
|
134
|
+
elevationRequired?: boolean;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export enum CandidatePortSource {
|
|
138
|
+
None = 0,
|
|
139
|
+
Process = 1,
|
|
140
|
+
Output = 2
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export type ResolverResult = (ResolvedAuthority | ManagedResolvedAuthority) & ResolvedOptions & TunnelInformation;
|
|
144
|
+
|
|
145
|
+
export class RemoteAuthorityResolverError extends Error {
|
|
146
|
+
static NotAvailable(message?: string, handled?: boolean): RemoteAuthorityResolverError;
|
|
147
|
+
static TemporarilyNotAvailable(message?: string): RemoteAuthorityResolverError;
|
|
148
|
+
|
|
149
|
+
constructor(message?: string);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* An ExecServer allows spawning processes on a remote machine. An ExecServer is provided by resolvers. It can be
|
|
154
|
+
* acquired by `workspace.getRemoteExecServer` or from the context when in a resolver (`RemoteAuthorityResolverContext.execServer`).
|
|
155
|
+
*/
|
|
156
|
+
export interface ExecServer {
|
|
157
|
+
/**
|
|
158
|
+
* Spawns a given subprocess with the given command and arguments.
|
|
159
|
+
* @param command The command to execute.
|
|
160
|
+
* @param args The arguments to pass to the command.
|
|
161
|
+
* @param options Additional options for the spawned process.
|
|
162
|
+
* @returns A promise that gives access to the process' stdin, stdout and stderr streams, as well as the process' exit code.
|
|
163
|
+
*/
|
|
164
|
+
spawn(command: string, args: string[], options?: ExecServerSpawnOptions): Thenable<SpawnedCommand>;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Spawns an connector that allows to start a remote server. It is assumed the command starts a Code CLI. Additional
|
|
168
|
+
* arguments will be passed to the connector.
|
|
169
|
+
* @param command The command to execute. It is assumed the command spawns a Code CLI executable.
|
|
170
|
+
* @param args The arguments to pass to the connector
|
|
171
|
+
* @param options Additional options for the spawned process.
|
|
172
|
+
* @returns A promise that gives access to the spawned {@link RemoteServerConnector}. It also provides a stream to which standard
|
|
173
|
+
* log messages are written.
|
|
174
|
+
*/
|
|
175
|
+
spawnRemoteServerConnector?(command: string, args: string[], options?: ExecServerSpawnOptions): Thenable<RemoteServerConnector>;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Downloads the CLI executable of the desired platform and quality and pipes it to the
|
|
179
|
+
* provided process' stdin.
|
|
180
|
+
* @param buildTarget The CLI build target to download.
|
|
181
|
+
* @param command The command to execute. The downloaded bits will be piped to the command's stdin.
|
|
182
|
+
* @param args The arguments to pass to the command.
|
|
183
|
+
* @param options Additional options for the spawned process.
|
|
184
|
+
* @returns A promise that resolves when the process exits with a {@link ProcessExit} object.
|
|
185
|
+
*/
|
|
186
|
+
downloadCliExecutable?(buildTarget: CliBuild, command: string, args: string[], options?: ExecServerSpawnOptions): Thenable<ProcessExit>;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Gets the environment where the exec server is running.
|
|
190
|
+
* @returns A promise that resolves to an {@link ExecEnvironment} object.
|
|
191
|
+
*/
|
|
192
|
+
env(): Thenable<ExecEnvironment>;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Access to the file system of the remote.
|
|
196
|
+
*/
|
|
197
|
+
readonly fs: RemoteFileSystem;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export type ProcessEnv = Record<string, string>;
|
|
201
|
+
|
|
202
|
+
export interface ExecServerSpawnOptions {
|
|
203
|
+
readonly env?: ProcessEnv;
|
|
204
|
+
readonly cwd?: string;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface SpawnedCommand {
|
|
208
|
+
readonly stdin: WriteStream;
|
|
209
|
+
readonly stdout: ReadStream;
|
|
210
|
+
readonly stderr: ReadStream;
|
|
211
|
+
readonly onExit: Thenable<ProcessExit>;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface RemoteServerConnector {
|
|
215
|
+
readonly logs: ReadStream;
|
|
216
|
+
readonly onExit: Thenable<ProcessExit>;
|
|
217
|
+
/**
|
|
218
|
+
* Connect to a new code server, returning a stream that can be used to communicate with it.
|
|
219
|
+
* @param params The parameters for the code server.
|
|
220
|
+
* @returns A promise that resolves to a {@link ManagedMessagePassing} object that can be used with a resolver
|
|
221
|
+
*/
|
|
222
|
+
connect(params: ServeParams): Thenable<ManagedMessagePassing>;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export interface ProcessExit {
|
|
226
|
+
readonly status: number;
|
|
227
|
+
readonly message?: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export interface ReadStream {
|
|
231
|
+
readonly onDidReceiveMessage: Event<Uint8Array>;
|
|
232
|
+
readonly onEnd: Thenable<void>;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export interface WriteStream {
|
|
236
|
+
write(data: Uint8Array): void;
|
|
237
|
+
end(): void;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface ServeParams {
|
|
241
|
+
readonly socketId: number;
|
|
242
|
+
readonly commit?: string;
|
|
243
|
+
readonly quality: string;
|
|
244
|
+
readonly extensions: string[];
|
|
245
|
+
/** Whether server traffic should be compressed. */
|
|
246
|
+
readonly compress?: boolean;
|
|
247
|
+
/** Optional explicit connection token for the server. */
|
|
248
|
+
readonly connectionToken?: string;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export interface CliBuild {
|
|
252
|
+
readonly quality: string;
|
|
253
|
+
/** 'LinuxAlpineX64' | 'LinuxX64' | 'LinuxARM64' | 'LinuxARM32' | 'DarwinX64' | 'DarwinARM64' | 'WindowsX64' | 'WindowsX86' | 'WindowsARM64' */
|
|
254
|
+
readonly buildTarget: string;
|
|
255
|
+
readonly commit: string;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface ExecEnvironment {
|
|
259
|
+
readonly env: ProcessEnv;
|
|
260
|
+
/** 'darwin' | 'linux' | 'win32' */
|
|
261
|
+
readonly osPlatform: string;
|
|
262
|
+
/** uname.version or windows version number, undefined if it could not be read. */
|
|
263
|
+
readonly osRelease?: string;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export interface RemoteFileSystem {
|
|
267
|
+
/**
|
|
268
|
+
* Retrieve metadata about a file.
|
|
269
|
+
*
|
|
270
|
+
* @param path The path of the file to retrieve metadata about.
|
|
271
|
+
* @returns The file metadata about the file.
|
|
272
|
+
* @throws an exception when `path` doesn't exist.
|
|
273
|
+
*/
|
|
274
|
+
stat(path: string): Thenable<FileStat>;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export interface RemoteAuthorityResolver {
|
|
278
|
+
/**
|
|
279
|
+
* Resolve the authority part of the current opened `vscode-remote://` URI.
|
|
280
|
+
*
|
|
281
|
+
* This method will be invoked once during the startup of the editor and again each time
|
|
282
|
+
* the editor detects a disconnection.
|
|
283
|
+
*
|
|
284
|
+
* @param authority The authority part of the current opened `vscode-remote://` URI.
|
|
285
|
+
* @param context A context indicating if this is the first call or a subsequent call.
|
|
286
|
+
*/
|
|
287
|
+
resolve(authority: string, context: RemoteAuthorityResolverContext): ResolverResult | Thenable<ResolverResult>;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Resolves an exec server interface for the authority. Called if an
|
|
291
|
+
* authority is a midpoint in a transit to the desired remote.
|
|
292
|
+
*
|
|
293
|
+
* @param authority The authority part of the current opened `vscode-remote://` URI.
|
|
294
|
+
* @returns The exec server interface, as defined in a contract between extensions.
|
|
295
|
+
*/
|
|
296
|
+
resolveExecServer?(remoteAuthority: string, context: RemoteAuthorityResolverContext): ExecServer | Thenable<ExecServer>;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Get the canonical URI (if applicable) for a `vscode-remote://` URI.
|
|
300
|
+
*
|
|
301
|
+
* @returns The canonical URI or undefined if the uri is already canonical.
|
|
302
|
+
*/
|
|
303
|
+
getCanonicalURI?(uri: Uri): ProviderResult<Uri>;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Can be optionally implemented if the extension can forward ports better than the core.
|
|
307
|
+
* When not implemented, the core will use its default forwarding logic.
|
|
308
|
+
* When implemented, the core will use this to forward ports.
|
|
309
|
+
*
|
|
310
|
+
* To enable the "Change Local Port" action on forwarded ports, make sure to set the `localAddress` of
|
|
311
|
+
* the returned `Tunnel` to a `{ port: number, host: string; }` and not a string.
|
|
312
|
+
*/
|
|
313
|
+
tunnelFactory?: (tunnelOptions: TunnelOptions, tunnelCreationOptions: TunnelCreationOptions) => Thenable<Tunnel> | undefined;
|
|
314
|
+
|
|
315
|
+
/**p
|
|
316
|
+
* Provides filtering for candidate ports.
|
|
317
|
+
*/
|
|
318
|
+
showCandidatePort?: (host: string, port: number, detail: string) => Thenable<boolean>;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* @deprecated Return tunnelFeatures as part of the resolver result in tunnelInformation.
|
|
322
|
+
*/
|
|
323
|
+
tunnelFeatures?: {
|
|
324
|
+
elevation: boolean;
|
|
325
|
+
public: boolean;
|
|
326
|
+
privacyOptions: TunnelPrivacy[];
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
candidatePortSource?: CandidatePortSource;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export interface ResourceLabelFormatter {
|
|
333
|
+
scheme: string;
|
|
334
|
+
authority?: string;
|
|
335
|
+
formatting: ResourceLabelFormatting;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export interface ResourceLabelFormatting {
|
|
339
|
+
label: string; // myLabel:/${path}
|
|
340
|
+
// For historic reasons we use an or string here. Once we finalize this API we should start using enums instead and adopt it in extensions.
|
|
341
|
+
// eslint-disable-next-line local/vscode-dts-literal-or-types, local/vscode-dts-string-type-literals
|
|
342
|
+
separator: '/' | '\\' | '';
|
|
343
|
+
tildify?: boolean;
|
|
344
|
+
normalizeDriveLetter?: boolean;
|
|
345
|
+
workspaceSuffix?: string;
|
|
346
|
+
workspaceTooltip?: string;
|
|
347
|
+
authorityPrefix?: string;
|
|
348
|
+
stripPathStartingSeparator?: boolean;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export namespace workspace {
|
|
352
|
+
export function registerRemoteAuthorityResolver(authorityPrefix: string, resolver: RemoteAuthorityResolver): Disposable;
|
|
353
|
+
export function registerResourceLabelFormatter(formatter: ResourceLabelFormatter): Disposable;
|
|
354
|
+
export function getRemoteExecServer(authority: string): Thenable<ExecServer | undefined>;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export namespace env {
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* The authority part of the current opened `vscode-remote://` URI.
|
|
361
|
+
* Defined by extensions, e.g. `ssh-remote+${host}` for remotes using a secure shell.
|
|
362
|
+
*
|
|
363
|
+
* *Note* that the value is `undefined` when there is no remote extension host but that the
|
|
364
|
+
* value is defined in all extension hosts (local and remote) in case a remote extension host
|
|
365
|
+
* exists. Use {@link Extension.extensionKind} to know if
|
|
366
|
+
* a specific extension runs remote or not.
|
|
367
|
+
*/
|
|
368
|
+
export const remoteAuthority: string | undefined;
|
|
369
|
+
|
|
370
|
+
}
|
|
371
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
// https://github.com/microsoft/vscode/issues/178713
|
|
7
|
+
|
|
8
|
+
declare module 'vscode' {
|
|
9
|
+
|
|
10
|
+
export namespace workspace {
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Saves the editor identified by the given resource and returns the resulting resource or `undefined`
|
|
14
|
+
* if save was not successful or no editor with the given resource was found.
|
|
15
|
+
*
|
|
16
|
+
* **Note** that an editor with the provided resource must be opened in order to be saved.
|
|
17
|
+
*
|
|
18
|
+
* @param uri the associated uri for the opened editor to save.
|
|
19
|
+
* @return A thenable that resolves when the save operation has finished.
|
|
20
|
+
*/
|
|
21
|
+
export function save(uri: Uri): Thenable<Uri | undefined>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Saves the editor identified by the given resource to a new file name as provided by the user and
|
|
25
|
+
* returns the resulting resource or `undefined` if save was not successful or cancelled or no editor
|
|
26
|
+
* with the given resource was found.
|
|
27
|
+
*
|
|
28
|
+
* **Note** that an editor with the provided resource must be opened in order to be saved as.
|
|
29
|
+
*
|
|
30
|
+
* @param uri the associated uri for the opened editor to save as.
|
|
31
|
+
* @return A thenable that resolves when the save-as operation has finished.
|
|
32
|
+
*/
|
|
33
|
+
export function saveAs(uri: Uri): Thenable<Uri | undefined>;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
declare module 'vscode' {
|
|
7
|
+
// https://github.com/microsoft/vscode/issues/133935
|
|
8
|
+
|
|
9
|
+
export interface SourceControlActionButton {
|
|
10
|
+
command: Command;
|
|
11
|
+
secondaryCommands?: Command[][];
|
|
12
|
+
description?: string;
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface SourceControl {
|
|
17
|
+
actionButton?: SourceControlActionButton;
|
|
18
|
+
}
|
|
19
|
+
}
|