@theia/plugin 1.29.0-next.4 → 1.29.0-next.41
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/package.json +2 -2
- package/src/theia-proposed.d.ts +0 -124
- package/src/theia.d.ts +110 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin",
|
|
3
|
-
"version": "1.29.0-next.
|
|
3
|
+
"version": "1.29.0-next.41+3f98d628b3c",
|
|
4
4
|
"description": "Theia - Plugin API",
|
|
5
5
|
"types": "./src/theia.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"nyc": {
|
|
33
33
|
"extends": "../../configs/nyc.json"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "3f98d628b3c0f76cddde3d7194a2c931ac06931a"
|
|
36
36
|
}
|
package/src/theia-proposed.d.ts
CHANGED
|
@@ -21,130 +21,6 @@
|
|
|
21
21
|
* These API are NOT stable and subject to change. Use it on own risk.
|
|
22
22
|
*/
|
|
23
23
|
export module '@theia/plugin' {
|
|
24
|
-
// #region auth provider
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* An [event](#Event) which fires when an [AuthenticationProvider](#AuthenticationProvider) is added or removed.
|
|
28
|
-
*/
|
|
29
|
-
export interface AuthenticationProvidersChangeEvent {
|
|
30
|
-
/**
|
|
31
|
-
* The ids of the [authenticationProvider](#AuthenticationProvider)s that have been added.
|
|
32
|
-
*/
|
|
33
|
-
readonly added: ReadonlyArray<AuthenticationProviderInformation>;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* The ids of the [authenticationProvider](#AuthenticationProvider)s that have been removed.
|
|
37
|
-
*/
|
|
38
|
-
readonly removed: ReadonlyArray<AuthenticationProviderInformation>;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* An [event](#Event) which fires when an [AuthenticationSession](#AuthenticationSession) is added, removed, or changed.
|
|
43
|
-
*/
|
|
44
|
-
export interface AuthenticationProviderAuthenticationSessionsChangeEvent {
|
|
45
|
-
/**
|
|
46
|
-
* The ids of the [AuthenticationSession](#AuthenticationSession)s that have been added.
|
|
47
|
-
*/
|
|
48
|
-
readonly added: ReadonlyArray<string>;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* The ids of the [AuthenticationSession](#AuthenticationSession)s that have been removed.
|
|
52
|
-
*/
|
|
53
|
-
readonly removed: ReadonlyArray<string>;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* The ids of the [AuthenticationSession](#AuthenticationSession)s that have been changed.
|
|
57
|
-
*/
|
|
58
|
-
readonly changed: ReadonlyArray<string>;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* **WARNING** When writing an AuthenticationProvider, `id` should be treated as part of your extension's
|
|
63
|
-
* API, changing it is a breaking change for all extensions relying on the provider. The id is
|
|
64
|
-
* treated case-sensitively.
|
|
65
|
-
*/
|
|
66
|
-
export interface AuthenticationProvider {
|
|
67
|
-
/**
|
|
68
|
-
* Used as an identifier for extensions trying to work with a particular
|
|
69
|
-
* provider: 'microsoft', 'github', etc. id must be unique, registering
|
|
70
|
-
* another provider with the same id will fail.
|
|
71
|
-
*/
|
|
72
|
-
readonly id: string;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* The human-readable name of the provider.
|
|
76
|
-
*/
|
|
77
|
-
readonly label: string;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Whether it is possible to be signed into multiple accounts at once with this provider
|
|
81
|
-
*/
|
|
82
|
-
readonly supportsMultipleAccounts: boolean;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Returns an array of current sessions.
|
|
86
|
-
*/
|
|
87
|
-
getSessions(): Thenable<ReadonlyArray<AuthenticationSession>>;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Prompts a user to login.
|
|
91
|
-
*/
|
|
92
|
-
login(scopes: string[]): Thenable<AuthenticationSession>;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Removes the session corresponding to session id.
|
|
96
|
-
* @param sessionId The session id to log out of
|
|
97
|
-
*/
|
|
98
|
-
logout(sessionId: string): Thenable<void>;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export namespace authentication {
|
|
102
|
-
/**
|
|
103
|
-
* Register an authentication provider.
|
|
104
|
-
*
|
|
105
|
-
* There can only be one provider per id and an error is being thrown when an id
|
|
106
|
-
* has already been used by another provider.
|
|
107
|
-
*
|
|
108
|
-
* @param provider The authentication provider provider.
|
|
109
|
-
* @return A [disposable](#Disposable) that unregisters this provider when being disposed.
|
|
110
|
-
*/
|
|
111
|
-
export function registerAuthenticationProvider(provider: AuthenticationProvider): Disposable;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Fires with the provider id that was registered or unregistered.
|
|
115
|
-
*/
|
|
116
|
-
export const onDidChangeAuthenticationProviders: Event<AuthenticationProvidersChangeEvent>;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* @deprecated
|
|
120
|
-
* The ids of the currently registered authentication providers.
|
|
121
|
-
* @returns An array of the ids of authentication providers that are currently registered.
|
|
122
|
-
*/
|
|
123
|
-
export function getProviderIds(): Thenable<ReadonlyArray<string>>;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* @deprecated
|
|
127
|
-
* An array of the ids of authentication providers that are currently registered.
|
|
128
|
-
*/
|
|
129
|
-
export const providerIds: ReadonlyArray<string>;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* An array of the information of authentication providers that are currently registered.
|
|
133
|
-
*/
|
|
134
|
-
export const providers: ReadonlyArray<AuthenticationProviderInformation>;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* @deprecated
|
|
138
|
-
* Logout of a specific session.
|
|
139
|
-
* @param providerId The id of the provider to use
|
|
140
|
-
* @param sessionId The session id to remove
|
|
141
|
-
* provider
|
|
142
|
-
*/
|
|
143
|
-
export function logout(providerId: string, sessionId: string): Thenable<void>;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// #endregion
|
|
147
|
-
|
|
148
24
|
/**
|
|
149
25
|
* The contiguous set of modified lines in a diff.
|
|
150
26
|
*/
|
package/src/theia.d.ts
CHANGED
|
@@ -2353,6 +2353,32 @@ export module '@theia/plugin' {
|
|
|
2353
2353
|
ignoreFocusOut?: boolean;
|
|
2354
2354
|
}
|
|
2355
2355
|
|
|
2356
|
+
/**
|
|
2357
|
+
* Impacts the behavior and appearance of the validation message.
|
|
2358
|
+
*/
|
|
2359
|
+
export enum InputBoxValidationSeverity {
|
|
2360
|
+
Info = 1,
|
|
2361
|
+
Warning = 2,
|
|
2362
|
+
Error = 3
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
/**
|
|
2366
|
+
* Object to configure the behavior of the validation message.
|
|
2367
|
+
*/
|
|
2368
|
+
export interface InputBoxValidationMessage {
|
|
2369
|
+
/**
|
|
2370
|
+
* The validation message to display.
|
|
2371
|
+
*/
|
|
2372
|
+
readonly message: string;
|
|
2373
|
+
|
|
2374
|
+
/**
|
|
2375
|
+
* The severity of the validation message.
|
|
2376
|
+
* NOTE: When using `InputBoxValidationSeverity.Error`, the user will not be allowed to accept (hit ENTER) the input.
|
|
2377
|
+
* `Info` and `Warning` will still allow the InputBox to accept the input.
|
|
2378
|
+
*/
|
|
2379
|
+
readonly severity: InputBoxValidationSeverity;
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2356
2382
|
/**
|
|
2357
2383
|
* Options to configure the behavior of the input box UI.
|
|
2358
2384
|
*/
|
|
@@ -2401,10 +2427,10 @@ export module '@theia/plugin' {
|
|
|
2401
2427
|
* to the user.
|
|
2402
2428
|
*
|
|
2403
2429
|
* @param value The current value of the input box.
|
|
2404
|
-
* @return
|
|
2405
|
-
* Return `undefined`, or the empty string when 'value' is valid.
|
|
2430
|
+
* @return Either a human-readable string which is presented as an error message or an {@link InputBoxValidationMessage}
|
|
2431
|
+
* which can provide a specific message severity. Return `undefined`, `null`, or the empty string when 'value' is valid.
|
|
2406
2432
|
*/
|
|
2407
|
-
validateInput?: (input: string) => Promise<string | null | undefined> | undefined;
|
|
2433
|
+
validateInput?: (input: string) => Promise<string | InputBoxValidationMessage | null | undefined> | undefined;
|
|
2408
2434
|
|
|
2409
2435
|
/**
|
|
2410
2436
|
* An optional function that will be called on Enter key.
|
|
@@ -3469,6 +3495,13 @@ export module '@theia/plugin' {
|
|
|
3469
3495
|
*/
|
|
3470
3496
|
export interface Memento {
|
|
3471
3497
|
|
|
3498
|
+
/**
|
|
3499
|
+
* Returns the stored keys.
|
|
3500
|
+
*
|
|
3501
|
+
* @return The stored keys.
|
|
3502
|
+
*/
|
|
3503
|
+
keys(): readonly string[];
|
|
3504
|
+
|
|
3472
3505
|
/**
|
|
3473
3506
|
* Return a value.
|
|
3474
3507
|
*
|
|
@@ -4458,7 +4491,7 @@ export module '@theia/plugin' {
|
|
|
4458
4491
|
* @param token A token that can be used to signal cancellation.
|
|
4459
4492
|
* @return A promise that resolves to the selection or `undefined`.
|
|
4460
4493
|
*/
|
|
4461
|
-
export function showQuickPick(
|
|
4494
|
+
export function showQuickPick(items: readonly string[] | Thenable<readonly string[]>, options?: QuickPickOptions, token?: CancellationToken): Thenable<string | undefined>;
|
|
4462
4495
|
|
|
4463
4496
|
/**
|
|
4464
4497
|
* Shows a selection list allowing multiple selections.
|
|
@@ -4468,7 +4501,7 @@ export module '@theia/plugin' {
|
|
|
4468
4501
|
* @param token A token that can be used to signal cancellation.
|
|
4469
4502
|
* @return A promise that resolves to the selected items or `undefined`.
|
|
4470
4503
|
*/
|
|
4471
|
-
export function showQuickPick(
|
|
4504
|
+
export function showQuickPick(items: readonly string[] | Thenable<readonly string[]>, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): Thenable<string[] | undefined>;
|
|
4472
4505
|
|
|
4473
4506
|
/**
|
|
4474
4507
|
* Shows a selection list.
|
|
@@ -4478,7 +4511,7 @@ export module '@theia/plugin' {
|
|
|
4478
4511
|
* @param token A token that can be used to signal cancellation.
|
|
4479
4512
|
* @return A promise that resolves to the selected item or `undefined`.
|
|
4480
4513
|
*/
|
|
4481
|
-
export function showQuickPick<T extends QuickPickItem>(items: readonly T[] | Thenable<readonly T[]>, options
|
|
4514
|
+
export function showQuickPick<T extends QuickPickItem>(items: readonly T[] | Thenable<readonly T[]>, options?: QuickPickOptions, token?: CancellationToken): Thenable<T | undefined>;
|
|
4482
4515
|
|
|
4483
4516
|
/**
|
|
4484
4517
|
* Shows a selection list allowing multiple selections.
|
|
@@ -5058,8 +5091,10 @@ export module '@theia/plugin' {
|
|
|
5058
5091
|
|
|
5059
5092
|
/**
|
|
5060
5093
|
* An optional validation message indicating a problem with the current input value.
|
|
5094
|
+
* By returning a string, the InputBox will use a default {@link InputBoxValidationSeverity} of Error.
|
|
5095
|
+
* Returning undefined clears the validation message.
|
|
5061
5096
|
*/
|
|
5062
|
-
validationMessage: string | undefined;
|
|
5097
|
+
validationMessage: string | InputBoxValidationMessage | undefined;
|
|
5063
5098
|
}
|
|
5064
5099
|
|
|
5065
5100
|
/**
|
|
@@ -5640,12 +5675,14 @@ export module '@theia/plugin' {
|
|
|
5640
5675
|
* Returns `true` if the given section for the given resource (if provided) is affected.
|
|
5641
5676
|
*
|
|
5642
5677
|
* @param section Configuration name, supports _dotted_ names.
|
|
5643
|
-
* @param
|
|
5678
|
+
* @param scope a {@link ConfigurationScope}
|
|
5644
5679
|
* @return `true` if the given section for the given resource (if provided) is affected.
|
|
5645
5680
|
*/
|
|
5646
|
-
affectsConfiguration(section: string,
|
|
5681
|
+
affectsConfiguration(section: string, scope?: ConfigurationScope): boolean;
|
|
5647
5682
|
}
|
|
5648
5683
|
|
|
5684
|
+
export type ConfigurationScope = Uri | WorkspaceFolder | TextDocument | { uri?: Uri, languageId: string };
|
|
5685
|
+
|
|
5649
5686
|
/**
|
|
5650
5687
|
* An event describing a change to the set of [workspace folders](#workspace.workspaceFolders).
|
|
5651
5688
|
*/
|
|
@@ -6300,13 +6337,13 @@ export module '@theia/plugin' {
|
|
|
6300
6337
|
* is returned. Dots in the section-identifier are interpreted as child-access,
|
|
6301
6338
|
* like `{ myExt: { setting: { doIt: true }}}` and `getConfiguration('myExt.setting').get('doIt') === true`.
|
|
6302
6339
|
*
|
|
6303
|
-
* When a
|
|
6340
|
+
* When a scope is provided configuration confined to that scope is returned. Scope can be a resource or a language identifier or both.
|
|
6304
6341
|
*
|
|
6305
6342
|
* @param section A dot-separated identifier.
|
|
6306
|
-
* @param
|
|
6343
|
+
* @param scope A scope for which the configuration is asked for.
|
|
6307
6344
|
* @return The full configuration or a subset.
|
|
6308
6345
|
*/
|
|
6309
|
-
export function getConfiguration(section?: string,
|
|
6346
|
+
export function getConfiguration(section?: string, scope?: ConfigurationScope | null): WorkspaceConfiguration;
|
|
6310
6347
|
|
|
6311
6348
|
/**
|
|
6312
6349
|
* An event that is emitted when the [configuration](#WorkspaceConfiguration) changed.
|
|
@@ -9267,6 +9304,18 @@ export module '@theia/plugin' {
|
|
|
9267
9304
|
*/
|
|
9268
9305
|
export function registerHoverProvider(selector: DocumentSelector, provider: HoverProvider): Disposable;
|
|
9269
9306
|
|
|
9307
|
+
/**
|
|
9308
|
+
* Register a provider that locates evaluatable expressions in text documents.
|
|
9309
|
+
* The editor will evaluate the expression in the active debug session and will show the result in the debug hover.
|
|
9310
|
+
*
|
|
9311
|
+
* If multiple providers are registered for a language an arbitrary provider will be used.
|
|
9312
|
+
*
|
|
9313
|
+
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9314
|
+
* @param provider An evaluatable expression provider.
|
|
9315
|
+
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
9316
|
+
*/
|
|
9317
|
+
export function registerEvaluatableExpressionProvider(selector: DocumentSelector, provider: EvaluatableExpressionProvider): Disposable;
|
|
9318
|
+
|
|
9270
9319
|
/**
|
|
9271
9320
|
* Register a workspace symbol provider.
|
|
9272
9321
|
*
|
|
@@ -9580,6 +9629,54 @@ export module '@theia/plugin' {
|
|
|
9580
9629
|
provideHover(document: TextDocument, position: Position, token: CancellationToken | undefined): ProviderResult<Hover>;
|
|
9581
9630
|
}
|
|
9582
9631
|
|
|
9632
|
+
/**
|
|
9633
|
+
* An EvaluatableExpression represents an expression in a document that can be evaluated by an active debugger or runtime.
|
|
9634
|
+
* The result of this evaluation is shown in a tooltip-like widget.
|
|
9635
|
+
* If only a range is specified, the expression will be extracted from the underlying document.
|
|
9636
|
+
* An optional expression can be used to override the extracted expression.
|
|
9637
|
+
* In this case the range is still used to highlight the range in the document.
|
|
9638
|
+
*/
|
|
9639
|
+
export class EvaluatableExpression {
|
|
9640
|
+
|
|
9641
|
+
/*
|
|
9642
|
+
* The range is used to extract the evaluatable expression from the underlying document and to highlight it.
|
|
9643
|
+
*/
|
|
9644
|
+
readonly range: Range;
|
|
9645
|
+
|
|
9646
|
+
/*
|
|
9647
|
+
* If specified the expression overrides the extracted expression.
|
|
9648
|
+
*/
|
|
9649
|
+
readonly expression?: string | undefined;
|
|
9650
|
+
|
|
9651
|
+
/**
|
|
9652
|
+
* Creates a new evaluatable expression object.
|
|
9653
|
+
*
|
|
9654
|
+
* @param range The range in the underlying document from which the evaluatable expression is extracted.
|
|
9655
|
+
* @param expression If specified overrides the extracted expression.
|
|
9656
|
+
*/
|
|
9657
|
+
constructor(range: Range, expression?: string);
|
|
9658
|
+
}
|
|
9659
|
+
|
|
9660
|
+
/**
|
|
9661
|
+
* The evaluatable expression provider interface defines the contract between extensions and
|
|
9662
|
+
* the debug hover. In this contract the provider returns an evaluatable expression for a given position
|
|
9663
|
+
* in a document and the editor evaluates this expression in the active debug session and shows the result in a debug hover.
|
|
9664
|
+
*/
|
|
9665
|
+
export interface EvaluatableExpressionProvider {
|
|
9666
|
+
/**
|
|
9667
|
+
* Provide an evaluatable expression for the given document and position.
|
|
9668
|
+
* The editor will evaluate this expression in the active debug session and will show the result in the debug hover.
|
|
9669
|
+
* The expression can be implicitly specified by the range in the underlying document or by explicitly returning an expression.
|
|
9670
|
+
*
|
|
9671
|
+
* @param document The document for which the debug hover is about to appear.
|
|
9672
|
+
* @param position The line and character position in the document where the debug hover is about to appear.
|
|
9673
|
+
* @param token A cancellation token.
|
|
9674
|
+
* @return An EvaluatableExpression or a thenable that resolves to such. The lack of a result can be
|
|
9675
|
+
* signaled by returning `undefined` or `null`.
|
|
9676
|
+
*/
|
|
9677
|
+
provideEvaluatableExpression(document: TextDocument, position: Position, token: CancellationToken | undefined): ProviderResult<EvaluatableExpression>;
|
|
9678
|
+
}
|
|
9679
|
+
|
|
9583
9680
|
/**
|
|
9584
9681
|
* A document highlight kind.
|
|
9585
9682
|
*/
|
|
@@ -11746,7 +11843,7 @@ export module '@theia/plugin' {
|
|
|
11746
11843
|
* The permissions granted by the session's access token. Available scopes
|
|
11747
11844
|
* are defined by the [AuthenticationProvider](#AuthenticationProvider).
|
|
11748
11845
|
*/
|
|
11749
|
-
readonly scopes:
|
|
11846
|
+
readonly scopes: readonly string[];
|
|
11750
11847
|
}
|
|
11751
11848
|
|
|
11752
11849
|
/**
|
|
@@ -11981,12 +12078,6 @@ export module '@theia/plugin' {
|
|
|
11981
12078
|
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
11982
12079
|
*/
|
|
11983
12080
|
export function registerAuthenticationProvider(id: string, label: string, provider: AuthenticationProvider, options?: AuthenticationProviderOptions): Disposable;
|
|
11984
|
-
|
|
11985
|
-
/**
|
|
11986
|
-
* @deprecated Use {@link getSession()} {@link AuthenticationGetSessionOptions.silent} instead.
|
|
11987
|
-
*/
|
|
11988
|
-
export function hasSession(providerId: string, scopes: readonly string[]): Thenable<boolean>;
|
|
11989
|
-
|
|
11990
12081
|
}
|
|
11991
12082
|
}
|
|
11992
12083
|
|