@opensumi/sumi 2.12.1-next-079c1930
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/README.md +1 -0
- package/build.ts +18 -0
- package/index.d.ts +5 -0
- package/manifest.json +414 -0
- package/package.json +18 -0
- package/sumi-browser.d.ts +273 -0
- package/sumi-worker/sumi-worker.d.ts +2788 -0
- package/sumi-worker/worker.command.d.ts +86 -0
- package/sumi-worker/worker.comments.d.ts +273 -0
- package/sumi-worker/worker.doc.d.ts +356 -0
- package/sumi-worker/worker.editor.d.ts +725 -0
- package/sumi-worker/worker.extensions.d.ts +63 -0
- package/sumi-worker/worker.language.d.ts +2220 -0
- package/sumi-worker/worker.window.d.ts +318 -0
- package/sumi-worker.d.ts +7 -0
- package/sumi.d.ts +822 -0
- package/vscode/typings/vscode.authentication.d.ts +231 -0
- package/vscode/typings/vscode.command.d.ts +86 -0
- package/vscode/typings/vscode.comments.d.ts +292 -0
- package/vscode/typings/vscode.d.ts +3789 -0
- package/vscode/typings/vscode.debug.d.ts +684 -0
- package/vscode/typings/vscode.doc.d.ts +272 -0
- package/vscode/typings/vscode.editor.d.ts +1017 -0
- package/vscode/typings/vscode.env.d.ts +153 -0
- package/vscode/typings/vscode.extension.d.ts +67 -0
- package/vscode/typings/vscode.language.d.ts +2630 -0
- package/vscode/typings/vscode.message.d.ts +195 -0
- package/vscode/typings/vscode.proposed.d.ts +662 -0
- package/vscode/typings/vscode.quickpick.d.ts +491 -0
- package/vscode/typings/vscode.scm.d.ts +254 -0
- package/vscode/typings/vscode.tasks.d.ts +676 -0
- package/vscode/typings/vscode.theme.d.ts +370 -0
- package/vscode/typings/vscode.window.d.ts +870 -0
- package/vscode/typings/vscode.workspace.d.ts +664 -0
- package/vscode/typings-pending/vscode.d.ts +27 -0
- package/vscode/typings-pending/vscode.proposed.d.ts +3 -0
- package/vscode.d.ts +23 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API OWENR: 墨蛰
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
declare module 'vscode' {
|
|
6
|
+
/**
|
|
7
|
+
* Namespace describing the environment the editor runs in.
|
|
8
|
+
*/
|
|
9
|
+
export namespace env {
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The application name of the editor, like 'VS Code'.
|
|
13
|
+
*/
|
|
14
|
+
export const appName: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The application root folder from which the editor is running.
|
|
18
|
+
*/
|
|
19
|
+
export const appRoot: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The custom uri scheme the editor registers to in the operating system.
|
|
23
|
+
*/
|
|
24
|
+
export const uriScheme: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Represents the preferred user-language, like `de-CH`, `fr`, or `en-US`.
|
|
28
|
+
*/
|
|
29
|
+
export const language: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The system clipboard.
|
|
33
|
+
*/
|
|
34
|
+
export const clipboard: Clipboard;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* A unique identifier for the computer.
|
|
38
|
+
*/
|
|
39
|
+
export const machineId: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* A unique identifier for the current session.
|
|
43
|
+
* Changes each time the editor is started.
|
|
44
|
+
*/
|
|
45
|
+
export const sessionId: string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Indicates that this is a fresh install of the application.
|
|
49
|
+
* `true` if within the first day of installation otherwise `false`.
|
|
50
|
+
*/
|
|
51
|
+
export const isNewAppInstall: boolean;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Indicates whether the users has telemetry enabled.
|
|
55
|
+
* Can be observed to determine if the extension should send telemetry.
|
|
56
|
+
*/
|
|
57
|
+
export const isTelemetryEnabled: boolean;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* An [event](#Event) which fires when the user enabled or disables telemetry.
|
|
61
|
+
* `true` if the user has enabled telemetry or `false` if the user has disabled telemetry.
|
|
62
|
+
*/
|
|
63
|
+
export const onDidChangeTelemetryEnabled: Event<boolean>;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The name of a remote. Defined by extensions, popular samples are `wsl` for the Windows
|
|
67
|
+
* Subsystem for Linux or `ssh-remote` for remotes using a secure shell.
|
|
68
|
+
*
|
|
69
|
+
* *Note* that the value is `undefined` when there is no remote extension host but that the
|
|
70
|
+
* value is defined in all extension hosts (local and remote) in case a remote extension host
|
|
71
|
+
* exists. Use [`Extension#extensionKind`](#Extension.extensionKind) to know if
|
|
72
|
+
* a specific extension runs remote or not.
|
|
73
|
+
*/
|
|
74
|
+
export const remoteName: string | undefined;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The UI kind property indicates from which UI extensions
|
|
78
|
+
* are accessed from. For example, extensions could be accessed
|
|
79
|
+
* from a desktop application or a web browser.
|
|
80
|
+
*/
|
|
81
|
+
export const uiKind: UIKind;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The detected default shell for the extension host, this is overridden by the
|
|
85
|
+
* `terminal.integrated.shell` setting for the extension host's platform.
|
|
86
|
+
*/
|
|
87
|
+
export const shell: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Opens an *external* item, e.g. a http(s) or mailto-link, using the
|
|
91
|
+
* default application.
|
|
92
|
+
*
|
|
93
|
+
* *Note* that [`showTextDocument`](#window.showTextDocument) is the right
|
|
94
|
+
* way to open a text document inside the editor, not this function.
|
|
95
|
+
*
|
|
96
|
+
* @param target The uri that should be opened.
|
|
97
|
+
* @returns A promise indicating if open was successful.
|
|
98
|
+
*/
|
|
99
|
+
export function openExternal(target: Uri): Thenable<boolean>;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Resolves a uri to form that is accessible externally. Currently only supports `https:`, `http:` and
|
|
103
|
+
* `vscode.env.uriScheme` uris.
|
|
104
|
+
*
|
|
105
|
+
* #### `http:` or `https:` scheme
|
|
106
|
+
*
|
|
107
|
+
* Resolves an *external* uri, such as a `http:` or `https:` link, from where the extension is running to a
|
|
108
|
+
* uri to the same resource on the client machine.
|
|
109
|
+
*
|
|
110
|
+
* This is a no-op if the extension is running on the client machine.
|
|
111
|
+
*
|
|
112
|
+
* If the extension is running remotely, this function automatically establishes a port forwarding tunnel
|
|
113
|
+
* from the local machine to `target` on the remote and returns a local uri to the tunnel. The lifetime of
|
|
114
|
+
* the port fowarding tunnel is managed by VS Code and the tunnel can be closed by the user.
|
|
115
|
+
*
|
|
116
|
+
* *Note* that uris passed through `openExternal` are automatically resolved and you should not call `asExternalUri` on them.
|
|
117
|
+
*
|
|
118
|
+
* #### `vscode.env.uriScheme`
|
|
119
|
+
*
|
|
120
|
+
* Creates a uri that - if opened in a browser (e.g. via `openExternal`) - will result in a registered [UriHandler](#UriHandler)
|
|
121
|
+
* to trigger.
|
|
122
|
+
*
|
|
123
|
+
* Extensions should not make any assumptions about the resulting uri and should not alter it in anyway.
|
|
124
|
+
* Rather, extensions can e.g. use this uri in an authentication flow, by adding the uri as callback query
|
|
125
|
+
* argument to the server to authenticate to.
|
|
126
|
+
*
|
|
127
|
+
* *Note* that if the server decides to add additional query parameters to the uri (e.g. a token or secret), it
|
|
128
|
+
* will appear in the uri that is passed to the [UriHandler](#UriHandler).
|
|
129
|
+
*
|
|
130
|
+
* **Example** of an authentication flow:
|
|
131
|
+
* ```typescript
|
|
132
|
+
* vscode.window.registerUriHandler({
|
|
133
|
+
* handleUri(uri: vscode.Uri): vscode.ProviderResult<void> {
|
|
134
|
+
* if (uri.path === '/did-authenticate') {
|
|
135
|
+
* console.log(uri.toString());
|
|
136
|
+
* }
|
|
137
|
+
* }
|
|
138
|
+
* });
|
|
139
|
+
*
|
|
140
|
+
* const callableUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://my.extension/did-authenticate`));
|
|
141
|
+
* await vscode.env.openExternal(callableUri);
|
|
142
|
+
* ```
|
|
143
|
+
*
|
|
144
|
+
* *Note* that extensions should not cache the result of `asExternalUri` as the resolved uri may become invalid due to
|
|
145
|
+
* a system or user action — for example, in remote cases, a user may close a port forwarding tunnel that was opened by
|
|
146
|
+
* `asExternalUri`.
|
|
147
|
+
*
|
|
148
|
+
* @return A uri that can be used on the client machine.
|
|
149
|
+
*/
|
|
150
|
+
export function asExternalUri(target: Uri): Thenable<Uri>;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API OWENR: 墨蛰
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
declare module 'vscode' {
|
|
6
|
+
/**
|
|
7
|
+
* Namespace for dealing with installed extensions. Extensions are represented
|
|
8
|
+
* by an [extension](#Extension)-interface which enables reflection on them.
|
|
9
|
+
*
|
|
10
|
+
* Extension writers can provide APIs to other extensions by returning their API public
|
|
11
|
+
* surface from the `activate`-call.
|
|
12
|
+
*
|
|
13
|
+
* ```javascript
|
|
14
|
+
* export function activate(context: vscode.ExtensionContext) {
|
|
15
|
+
* let api = {
|
|
16
|
+
* sum(a, b) {
|
|
17
|
+
* return a + b;
|
|
18
|
+
* },
|
|
19
|
+
* mul(a, b) {
|
|
20
|
+
* return a * b;
|
|
21
|
+
* }
|
|
22
|
+
* };
|
|
23
|
+
* // 'export' public api-surface
|
|
24
|
+
* return api;
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
* When depending on the API of another extension add an `extensionDependency`-entry
|
|
28
|
+
* to `package.json`, and use the [getExtension](#extensions.getExtension)-function
|
|
29
|
+
* and the [exports](#Extension.exports)-property, like below:
|
|
30
|
+
*
|
|
31
|
+
* ```javascript
|
|
32
|
+
* let mathExt = extensions.getExtension('genius.math');
|
|
33
|
+
* let importedApi = mathExt.exports;
|
|
34
|
+
*
|
|
35
|
+
* console.log(importedApi.mul(42, 1));
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export namespace extensions {
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Get an extension by its full identifier in the form of: `publisher.name`.
|
|
42
|
+
*
|
|
43
|
+
* @param extensionId An extension identifier.
|
|
44
|
+
* @return An extension or `undefined`.
|
|
45
|
+
*/
|
|
46
|
+
export function getExtension(extensionId: string): Extension<any> | undefined;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Get an extension its full identifier in the form of: `publisher.name`.
|
|
50
|
+
*
|
|
51
|
+
* @param extensionId An extension identifier.
|
|
52
|
+
* @return An extension or `undefined`.
|
|
53
|
+
*/
|
|
54
|
+
export function getExtension<T>(extensionId: string): Extension<T> | undefined;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* All extensions currently known to the system.
|
|
58
|
+
*/
|
|
59
|
+
export const all: ReadonlyArray<Extension<any>>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* An event which fires when `extensions.all` changes. This can happen when extensions are
|
|
63
|
+
* installed, uninstalled, enabled or disabled.
|
|
64
|
+
*/
|
|
65
|
+
export const onDidChange: Event<void>;
|
|
66
|
+
}
|
|
67
|
+
}
|