@codingame/monaco-vscode-rollup-vsix-plugin 11.1.2 → 12.0.0

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.
Files changed (138) hide show
  1. package/package.json +7 -6
  2. package/rollup-vsix-plugin.d.ts +1597 -2
  3. package/rollup-vsix-plugin.js +265 -219
  4. package/vscode/src/vs/base/common/jsonSchema.d.ts +0 -90
  5. package/vscode/src/vs/platform/action/common/action.d.ts +0 -12
  6. package/vscode/src/vs/platform/environment/common/environment.d.ts +0 -8
  7. package/vscode/src/vs/platform/extensions/common/extensions.d.ts +0 -1494
  8. package/vscode-dts/vscode.proposed.activeComment.d.ts +0 -23
  9. package/vscode-dts/vscode.proposed.aiRelatedInformation.d.ts +0 -49
  10. package/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts +0 -71
  11. package/vscode-dts/vscode.proposed.aiTextSearchProviderNew.d.ts +0 -40
  12. package/vscode-dts/vscode.proposed.attributableCoverage.d.ts +0 -46
  13. package/vscode-dts/vscode.proposed.authLearnMore.d.ts +0 -16
  14. package/vscode-dts/vscode.proposed.authSession.d.ts +0 -13
  15. package/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts +0 -47
  16. package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +0 -391
  17. package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +0 -119
  18. package/vscode-dts/vscode.proposed.chatProvider.d.ts +0 -90
  19. package/vscode-dts/vscode.proposed.chatReferenceBinaryData.d.ts +0 -33
  20. package/vscode-dts/vscode.proposed.chatTab.d.ts +0 -17
  21. package/vscode-dts/vscode.proposed.chatVariableResolver.d.ts +0 -110
  22. package/vscode-dts/vscode.proposed.codeActionAI.d.ts +0 -16
  23. package/vscode-dts/vscode.proposed.codeActionRanges.d.ts +0 -15
  24. package/vscode-dts/vscode.proposed.codiconDecoration.d.ts +0 -48
  25. package/vscode-dts/vscode.proposed.commentReactor.d.ts +0 -13
  26. package/vscode-dts/vscode.proposed.commentReveal.d.ts +0 -45
  27. package/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts +0 -40
  28. package/vscode-dts/vscode.proposed.commentingRangeHint.d.ts +0 -16
  29. package/vscode-dts/vscode.proposed.commentsDraftState.d.ts +0 -18
  30. package/vscode-dts/vscode.proposed.contribAccessibilityHelpContent.d.ts +0 -15
  31. package/vscode-dts/vscode.proposed.contribCommentEditorActionsMenu.d.ts +0 -6
  32. package/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts +0 -10
  33. package/vscode-dts/vscode.proposed.contribCommentThreadAdditionalMenu.d.ts +0 -8
  34. package/vscode-dts/vscode.proposed.contribCommentsViewThreadMenus.d.ts +0 -6
  35. package/vscode-dts/vscode.proposed.contribDebugCreateConfiguration.d.ts +0 -6
  36. package/vscode-dts/vscode.proposed.contribDiffEditorGutterToolBarMenus.d.ts +0 -6
  37. package/vscode-dts/vscode.proposed.contribEditSessions.d.ts +0 -8
  38. package/vscode-dts/vscode.proposed.contribEditorContentMenu.d.ts +0 -6
  39. package/vscode-dts/vscode.proposed.contribIssueReporter.d.ts +0 -7
  40. package/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts +0 -6
  41. package/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts +0 -6
  42. package/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts +0 -6
  43. package/vscode-dts/vscode.proposed.contribMultiDiffEditorMenus.d.ts +0 -6
  44. package/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts +0 -6
  45. package/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts +0 -6
  46. package/vscode-dts/vscode.proposed.contribShareMenu.d.ts +0 -7
  47. package/vscode-dts/vscode.proposed.contribSourceControlHistoryItemMenu.d.ts +0 -7
  48. package/vscode-dts/vscode.proposed.contribSourceControlHistoryTitleMenu.d.ts +0 -7
  49. package/vscode-dts/vscode.proposed.contribSourceControlInputBoxMenu.d.ts +0 -7
  50. package/vscode-dts/vscode.proposed.contribSourceControlTitleMenu.d.ts +0 -7
  51. package/vscode-dts/vscode.proposed.contribStatusBarItems.d.ts +0 -8
  52. package/vscode-dts/vscode.proposed.contribViewContainerTitle.d.ts +0 -8
  53. package/vscode-dts/vscode.proposed.contribViewsRemote.d.ts +0 -6
  54. package/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts +0 -6
  55. package/vscode-dts/vscode.proposed.createFileSystemWatcher.d.ts +0 -51
  56. package/vscode-dts/vscode.proposed.customEditorMove.d.ts +0 -29
  57. package/vscode-dts/vscode.proposed.debugVisualization.d.ts +0 -170
  58. package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +0 -63
  59. package/vscode-dts/vscode.proposed.diffCommand.d.ts +0 -38
  60. package/vscode-dts/vscode.proposed.diffContentOptions.d.ts +0 -16
  61. package/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts +0 -13
  62. package/vscode-dts/vscode.proposed.documentPaste.d.ts +0 -297
  63. package/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts +0 -71
  64. package/vscode-dts/vscode.proposed.editorHoverVerbosityLevel.d.ts +0 -76
  65. package/vscode-dts/vscode.proposed.editorInsets.d.ts +0 -22
  66. package/vscode-dts/vscode.proposed.embeddings.d.ts +0 -33
  67. package/vscode-dts/vscode.proposed.extensionRuntime.d.ts +0 -24
  68. package/vscode-dts/vscode.proposed.extensionsAny.d.ts +0 -41
  69. package/vscode-dts/vscode.proposed.externalUriOpener.d.ts +0 -163
  70. package/vscode-dts/vscode.proposed.fileComments.d.ts +0 -42
  71. package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +0 -73
  72. package/vscode-dts/vscode.proposed.fileSearchProviderNew.d.ts +0 -101
  73. package/vscode-dts/vscode.proposed.findFiles2.d.ts +0 -89
  74. package/vscode-dts/vscode.proposed.findFiles2New.d.ts +0 -105
  75. package/vscode-dts/vscode.proposed.findTextInFiles.d.ts +0 -104
  76. package/vscode-dts/vscode.proposed.findTextInFilesNew.d.ts +0 -164
  77. package/vscode-dts/vscode.proposed.fsChunks.d.ts +0 -16
  78. package/vscode-dts/vscode.proposed.idToken.d.ts +0 -16
  79. package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +0 -95
  80. package/vscode-dts/vscode.proposed.inlineEdit.d.ts +0 -88
  81. package/vscode-dts/vscode.proposed.interactive.d.ts +0 -11
  82. package/vscode-dts/vscode.proposed.interactiveWindow.d.ts +0 -25
  83. package/vscode-dts/vscode.proposed.ipc.d.ts +0 -37
  84. package/vscode-dts/vscode.proposed.languageModelSystem.d.ts +0 -17
  85. package/vscode-dts/vscode.proposed.languageStatusText.d.ts +0 -12
  86. package/vscode-dts/vscode.proposed.lmTools.d.ts +0 -9
  87. package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +0 -87
  88. package/vscode-dts/vscode.proposed.multiDocumentHighlightProvider.d.ts +0 -63
  89. package/vscode-dts/vscode.proposed.newSymbolNamesProvider.d.ts +0 -47
  90. package/vscode-dts/vscode.proposed.notebookCellExecution.d.ts +0 -44
  91. package/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts +0 -52
  92. package/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts +0 -17
  93. package/vscode-dts/vscode.proposed.notebookDeprecated.d.ts +0 -16
  94. package/vscode-dts/vscode.proposed.notebookExecution.d.ts +0 -39
  95. package/vscode-dts/vscode.proposed.notebookKernelSource.d.ts +0 -46
  96. package/vscode-dts/vscode.proposed.notebookLiveShare.d.ts +0 -21
  97. package/vscode-dts/vscode.proposed.notebookMessaging.d.ts +0 -68
  98. package/vscode-dts/vscode.proposed.notebookMime.d.ts +0 -33
  99. package/vscode-dts/vscode.proposed.notebookReplDocument.d.ts +0 -33
  100. package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +0 -55
  101. package/vscode-dts/vscode.proposed.portsAttributes.d.ts +0 -100
  102. package/vscode-dts/vscode.proposed.profileContentHandlers.d.ts +0 -19
  103. package/vscode-dts/vscode.proposed.quickDiffProvider.d.ts +0 -17
  104. package/vscode-dts/vscode.proposed.quickInputButtonLocation.d.ts +0 -29
  105. package/vscode-dts/vscode.proposed.quickPickItemTooltip.d.ts +0 -16
  106. package/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts +0 -19
  107. package/vscode-dts/vscode.proposed.resolvers.d.ts +0 -475
  108. package/vscode-dts/vscode.proposed.scmActionButton.d.ts +0 -18
  109. package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +0 -88
  110. package/vscode-dts/vscode.proposed.scmMultiDiffEditor.d.ts +0 -34
  111. package/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts +0 -22
  112. package/vscode-dts/vscode.proposed.scmTextDocument.d.ts +0 -19
  113. package/vscode-dts/vscode.proposed.scmValidation.d.ts +0 -60
  114. package/vscode-dts/vscode.proposed.shareProvider.d.ts +0 -74
  115. package/vscode-dts/vscode.proposed.showLocal.d.ts +0 -19
  116. package/vscode-dts/vscode.proposed.speech.d.ts +0 -74
  117. package/vscode-dts/vscode.proposed.tabInputMultiDiff.d.ts +0 -22
  118. package/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts +0 -25
  119. package/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts +0 -16
  120. package/vscode-dts/vscode.proposed.telemetry.d.ts +0 -36
  121. package/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts +0 -32
  122. package/vscode-dts/vscode.proposed.terminalDimensions.d.ts +0 -39
  123. package/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +0 -48
  124. package/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts +0 -87
  125. package/vscode-dts/vscode.proposed.terminalSelection.d.ts +0 -16
  126. package/vscode-dts/vscode.proposed.testObserver.d.ts +0 -199
  127. package/vscode-dts/vscode.proposed.testRelatedCode.d.ts +0 -36
  128. package/vscode-dts/vscode.proposed.textSearchCompleteNew.d.ts +0 -38
  129. package/vscode-dts/vscode.proposed.textSearchProvider.d.ts +0 -281
  130. package/vscode-dts/vscode.proposed.textSearchProviderNew.d.ts +0 -275
  131. package/vscode-dts/vscode.proposed.timeline.d.ts +0 -163
  132. package/vscode-dts/vscode.proposed.tokenInformation.d.ts +0 -26
  133. package/vscode-dts/vscode.proposed.treeViewActiveItem.d.ts +0 -30
  134. package/vscode-dts/vscode.proposed.treeViewMarkdownMessage.d.ts +0 -28
  135. package/vscode-dts/vscode.proposed.treeViewReveal.d.ts +0 -13
  136. package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +0 -48
  137. package/vscode-dts/vscode.proposed.tunnels.d.ts +0 -64
  138. package/vscode-dts/vscode.proposed.workspaceTrust.d.ts +0 -30
@@ -1,100 +0,0 @@
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
- }
@@ -1,19 +0,0 @@
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
- }
@@ -1,17 +0,0 @@
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
- }
@@ -1,29 +0,0 @@
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 enum QuickInputButtonLocation {
11
- /**
12
- * In the title bar.
13
- */
14
- Title = 1,
15
-
16
- /**
17
- * To the right of the input box.
18
- */
19
- Inline = 2
20
- }
21
-
22
- export interface QuickInputButton {
23
- /**
24
- * Where the button should be rendered. The default is {@link QuickInputButtonLocation.Title}.
25
- * @note This property is ignored if the button was added to a QuickPickItem.
26
- */
27
- location?: QuickInputButtonLocation;
28
- }
29
- }
@@ -1,16 +0,0 @@
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
- }
@@ -1,19 +0,0 @@
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
- // @API is a bug that we need this API at all. why do we change the sort order
15
- // when extensions give us a (sorted) array of items?
16
- // @API sortByLabel isn't a great name
17
- sortByLabel: boolean;
18
- }
19
- }
@@ -1,475 +0,0 @@
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
- * Defaults to true for backwards compatibility.
129
- */
130
- protocol?: boolean;
131
- };
132
- }
133
-
134
- export interface TunnelCreationOptions {
135
- /**
136
- * True when the local operating system will require elevation to use the requested local port.
137
- */
138
- elevationRequired?: boolean;
139
- }
140
-
141
- export enum CandidatePortSource {
142
- None = 0,
143
- Process = 1,
144
- Output = 2,
145
- Hybrid = 3
146
- }
147
-
148
- export type ResolverResult = (ResolvedAuthority | ManagedResolvedAuthority) & ResolvedOptions & TunnelInformation;
149
-
150
- export class RemoteAuthorityResolverError extends Error {
151
- static NotAvailable(message?: string, handled?: boolean): RemoteAuthorityResolverError;
152
- static TemporarilyNotAvailable(message?: string): RemoteAuthorityResolverError;
153
-
154
- constructor(message?: string);
155
- }
156
-
157
- /**
158
- * An ExecServer allows spawning processes on a remote machine. An ExecServer is provided by resolvers. It can be
159
- * acquired by `workspace.getRemoteExecServer` or from the context when in a resolver (`RemoteAuthorityResolverContext.execServer`).
160
- */
161
- export interface ExecServer {
162
- /**
163
- * Spawns a given subprocess with the given command and arguments.
164
- * @param command The command to execute.
165
- * @param args The arguments to pass to the command.
166
- * @param options Additional options for the spawned process.
167
- * @returns A promise that gives access to the process' stdin, stdout and stderr streams, as well as the process' exit code.
168
- */
169
- spawn(command: string, args: string[], options?: ExecServerSpawnOptions): Thenable<SpawnedCommand>;
170
-
171
- /**
172
- * Spawns an connector that allows to start a remote server. It is assumed the command starts a Code CLI. Additional
173
- * arguments will be passed to the connector.
174
- * @param command The command to execute. It is assumed the command spawns a Code CLI executable.
175
- * @param args The arguments to pass to the connector
176
- * @param options Additional options for the spawned process.
177
- * @returns A promise that gives access to the spawned {@link RemoteServerConnector}. It also provides a stream to which standard
178
- * log messages are written.
179
- */
180
- spawnRemoteServerConnector?(command: string, args: string[], options?: ExecServerSpawnOptions): Thenable<RemoteServerConnector>;
181
-
182
- /**
183
- * Downloads the CLI executable of the desired platform and quality and pipes it to the
184
- * provided process' stdin.
185
- * @param buildTarget The CLI build target to download.
186
- * @param command The command to execute. The downloaded bits will be piped to the command's stdin.
187
- * @param args The arguments to pass to the command.
188
- * @param options Additional options for the spawned process.
189
- * @returns A promise that resolves when the process exits with a {@link ProcessExit} object.
190
- */
191
- downloadCliExecutable?(buildTarget: CliBuild, command: string, args: string[], options?: ExecServerSpawnOptions): Thenable<ProcessExit>;
192
-
193
- /**
194
- * Gets the environment where the exec server is running.
195
- * @returns A promise that resolves to an {@link ExecEnvironment} object.
196
- */
197
- env(): Thenable<ExecEnvironment>;
198
-
199
- /**
200
- * Kills a process with the given ID.
201
- *
202
- * @param processId process ID to kill.
203
- */
204
- kill(processId: number): Thenable<void>;
205
-
206
- /**
207
- * Connects to the given TCP host/port on the remote.
208
- *
209
- * @param host The hostname or IP to connect to
210
- * @param port The port number to connect to
211
- * @returns a duplex stream, and a promise the resolves when both sides
212
- * have closed.
213
- */
214
- tcpConnect(
215
- host: string,
216
- port: number,
217
- ): Thenable<{ stream: WriteStream & ReadStream; done: Thenable<void> }>;
218
-
219
- /**
220
- * Access to the file system of the remote.
221
- */
222
- readonly fs: RemoteFileSystem;
223
- }
224
-
225
- export type ProcessEnv = Record<string, string>;
226
-
227
- export interface ExecServerSpawnOptions {
228
- readonly env?: ProcessEnv;
229
- readonly cwd?: string;
230
- }
231
-
232
- export interface SpawnedCommand {
233
- readonly stdin: WriteStream;
234
- readonly stdout: ReadStream;
235
- readonly stderr: ReadStream;
236
- readonly onExit: Thenable<ProcessExit>;
237
- }
238
-
239
- export interface RemoteServerConnector {
240
- readonly logs: ReadStream;
241
- readonly onExit: Thenable<ProcessExit>;
242
- /**
243
- * Connect to a new code server, returning a stream that can be used to communicate with it.
244
- * @param params The parameters for the code server.
245
- * @returns A promise that resolves to a {@link ManagedMessagePassing} object that can be used with a resolver
246
- */
247
- connect(params: ServeParams): Thenable<ManagedMessagePassing>;
248
- }
249
-
250
- export interface ProcessExit {
251
- readonly status: number;
252
- readonly message?: string;
253
- }
254
-
255
- export interface ReadStream {
256
- readonly onDidReceiveMessage: Event<Uint8Array>;
257
- readonly onEnd: Thenable<void>;
258
- }
259
-
260
- export interface WriteStream {
261
- write(data: Uint8Array): void;
262
- end(): void;
263
- }
264
-
265
- export interface ServeParams {
266
- readonly socketId: number;
267
- readonly commit?: string;
268
- readonly quality: string;
269
- readonly extensions: string[];
270
- /** Whether server traffic should be compressed. */
271
- readonly compress?: boolean;
272
- /** Optional explicit connection token for the server. */
273
- readonly connectionToken?: string;
274
- }
275
-
276
- export interface CliBuild {
277
- readonly quality: string;
278
- /** 'LinuxAlpineX64' | 'LinuxAlpineARM64', 'LinuxX64' | 'LinuxARM64' | 'LinuxARM32' | 'DarwinX64' | 'DarwinARM64' | 'WindowsX64' | 'WindowsX86' | 'WindowsARM64' */
279
- readonly buildTarget: string;
280
- readonly commit: string;
281
- }
282
-
283
- export interface ExecEnvironment {
284
- readonly env: ProcessEnv;
285
- /** 'darwin' | 'linux' | 'win32' */
286
- readonly osPlatform: string;
287
- /** uname.version or windows version number, undefined if it could not be read. */
288
- readonly osRelease?: string;
289
- }
290
-
291
- export interface RemoteFileSystem {
292
- /**
293
- * Retrieve metadata about a file.
294
- *
295
- * @param path The path of the file to retrieve metadata about.
296
- * @returns The file metadata about the file.
297
- * @throws an exception when `path` doesn't exist.
298
- */
299
- stat(path: string): Thenable<FileStat>;
300
-
301
- /**
302
- * Recursively creates the given directory on the remote.
303
- *
304
- * @param path The path of the folder to create
305
- * @throws an exception when `path` is a file, or other i/o operations happen
306
- */
307
- mkdirp(path: string): Thenable<void>;
308
-
309
- /**
310
- * Recursively deletes the given path on the remote.
311
- *
312
- * @param path The path of the file or folder to delete.
313
- * @throws if an i/o error happens during removal. It does not throw if
314
- * the path already does not exist.
315
- */
316
- rm(path: string): Thenable<void>;
317
-
318
- /**
319
- * Reads the given file from the remote.
320
- *
321
- * @param path The path of the file to read.
322
- * @throws if the path doesn't exist or can't be accessed
323
- * @returns a readable stream of the file data
324
- */
325
- read(path: string): Thenable<ReadStream>;
326
-
327
- /**
328
- * Writes the given file on the remote. Truncates the file if it exists.
329
- *
330
- * @param path The path of the file to write.
331
- * @throws if the path can't be accessed
332
- * @returns a writable `stream` that accepts data, and a `done` promise that
333
- * will resolve after `stream.end()` is called once the write is complete.
334
- */
335
- write(path: string): Thenable<{ stream: WriteStream; done: Thenable<void> }>;
336
-
337
- /**
338
- * Connects to the given unix socket or named pipe on the remote.
339
- *
340
- * @param path The path of the unix socket or named pipe
341
- * @throws if the path can't be accessed
342
- * @returns a duplex stream, and a promise the resolves when both sides
343
- * have closed.
344
- */
345
- connect(path: string): Thenable<{ stream: WriteStream & ReadStream; done: Thenable<void> }>;
346
-
347
- /**
348
- * Renames the file.
349
- *
350
- * @param fromPath The existing file path.
351
- * @param toPath The new file path.
352
- * @throws if the original path doesn't exist, or the toPath can't be accessed
353
- */
354
- rename(fromPath: string, toPath: string): Thenable<void>;
355
-
356
- /**
357
- * Reads the contents of a directory.
358
- *
359
- * @param path The path of the folder to read.
360
- * @throws if the folder doesn't exist
361
- * @returns a list of directory entries
362
- */
363
- readdir(path: string): Thenable<DirectoryEntry[]>;
364
- }
365
-
366
- export interface DirectoryEntry {
367
- /**
368
- * The type of the file, e.g. is a regular file, a directory, or symbolic link
369
- * to a file.
370
- *
371
- * *Note:* This value might be a bitmask, e.g. `FileType.File | FileType.SymbolicLink`.
372
- */
373
- type: FileType;
374
-
375
- /**
376
- * Non-absolute name of the file in the directory.
377
- */
378
- name: string;
379
- }
380
-
381
- export interface RemoteAuthorityResolver {
382
- /**
383
- * Resolve the authority part of the current opened `vscode-remote://` URI.
384
- *
385
- * This method will be invoked once during the startup of the editor and again each time
386
- * the editor detects a disconnection.
387
- *
388
- * @param authority The authority part of the current opened `vscode-remote://` URI.
389
- * @param context A context indicating if this is the first call or a subsequent call.
390
- */
391
- resolve(authority: string, context: RemoteAuthorityResolverContext): ResolverResult | Thenable<ResolverResult>;
392
-
393
- /**
394
- * Resolves an exec server interface for the authority. Called if an
395
- * authority is a midpoint in a transit to the desired remote.
396
- *
397
- * @param authority The authority part of the current opened `vscode-remote://` URI.
398
- * @returns The exec server interface, as defined in a contract between extensions.
399
- */
400
- resolveExecServer?(remoteAuthority: string, context: RemoteAuthorityResolverContext): ExecServer | Thenable<ExecServer>;
401
-
402
- /**
403
- * Get the canonical URI (if applicable) for a `vscode-remote://` URI.
404
- *
405
- * @returns The canonical URI or undefined if the uri is already canonical.
406
- */
407
- getCanonicalURI?(uri: Uri): ProviderResult<Uri>;
408
-
409
- /**
410
- * Can be optionally implemented if the extension can forward ports better than the core.
411
- * When not implemented, the core will use its default forwarding logic.
412
- * When implemented, the core will use this to forward ports.
413
- *
414
- * To enable the "Change Local Port" action on forwarded ports, make sure to set the `localAddress` of
415
- * the returned `Tunnel` to a `{ port: number, host: string; }` and not a string.
416
- */
417
- tunnelFactory?: (tunnelOptions: TunnelOptions, tunnelCreationOptions: TunnelCreationOptions) => Thenable<Tunnel> | undefined;
418
-
419
- /**p
420
- * Provides filtering for candidate ports.
421
- */
422
- showCandidatePort?: (host: string, port: number, detail: string) => Thenable<boolean>;
423
-
424
- /**
425
- * @deprecated Return tunnelFeatures as part of the resolver result in tunnelInformation.
426
- */
427
- tunnelFeatures?: {
428
- elevation: boolean;
429
- public: boolean;
430
- privacyOptions: TunnelPrivacy[];
431
- };
432
-
433
- candidatePortSource?: CandidatePortSource;
434
- }
435
-
436
- export interface ResourceLabelFormatter {
437
- scheme: string;
438
- authority?: string;
439
- formatting: ResourceLabelFormatting;
440
- }
441
-
442
- export interface ResourceLabelFormatting {
443
- label: string; // myLabel:/${path}
444
- // 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.
445
- // eslint-disable-next-line local/vscode-dts-literal-or-types, local/vscode-dts-string-type-literals
446
- separator: '/' | '\\' | '';
447
- tildify?: boolean;
448
- normalizeDriveLetter?: boolean;
449
- workspaceSuffix?: string;
450
- workspaceTooltip?: string;
451
- authorityPrefix?: string;
452
- stripPathStartingSeparator?: boolean;
453
- }
454
-
455
- export namespace workspace {
456
- export function registerRemoteAuthorityResolver(authorityPrefix: string, resolver: RemoteAuthorityResolver): Disposable;
457
- export function registerResourceLabelFormatter(formatter: ResourceLabelFormatter): Disposable;
458
- export function getRemoteExecServer(authority: string): Thenable<ExecServer | undefined>;
459
- }
460
-
461
- export namespace env {
462
-
463
- /**
464
- * The authority part of the current opened `vscode-remote://` URI.
465
- * Defined by extensions, e.g. `ssh-remote+${host}` for remotes using a secure shell.
466
- *
467
- * *Note* that the value is `undefined` when there is no remote extension host but that the
468
- * value is defined in all extension hosts (local and remote) in case a remote extension host
469
- * exists. Use {@link Extension.extensionKind} to know if
470
- * a specific extension runs remote or not.
471
- */
472
- export const remoteAuthority: string | undefined;
473
-
474
- }
475
- }