cdeops 10.6.1-alpha.17 → 10.6.2-alpha.3
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/client.d.ts +273 -182
- package/package.json +2 -2
package/client.d.ts
CHANGED
|
@@ -2,50 +2,51 @@
|
|
|
2
2
|
/// <reference path="./src/cdeops.proposed.d.ts"/>
|
|
3
3
|
|
|
4
4
|
declare module 'cdeops/client' {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
5
|
+
import {
|
|
6
|
+
OrganizationResource,
|
|
7
|
+
RelativePattern,
|
|
8
|
+
GlobPattern,
|
|
9
|
+
LogLevel,
|
|
10
|
+
Uri as URI,
|
|
11
|
+
Unsubscribable,
|
|
12
|
+
Subscribable,
|
|
13
|
+
Workspace,
|
|
14
|
+
ConfigurationTarget,
|
|
15
|
+
OrganizationConfiguration,
|
|
16
|
+
configuration,
|
|
17
|
+
organization,
|
|
18
|
+
commands,
|
|
19
|
+
} from 'cdeops';
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
OrganizationResource,
|
|
23
|
+
RelativePattern,
|
|
24
|
+
GlobPattern,
|
|
25
|
+
URI,
|
|
26
|
+
LogLevel,
|
|
27
|
+
Unsubscribable,
|
|
28
|
+
Subscribable,
|
|
29
|
+
Workspace,
|
|
30
|
+
ConfigurationTarget,
|
|
31
|
+
OrganizationConfiguration,
|
|
32
|
+
configuration,
|
|
33
|
+
organization,
|
|
34
|
+
commands,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export interface DocumentFilter {
|
|
38
|
+
/** A language id, such as `typescript` or `*`. */
|
|
39
|
+
language?: string;
|
|
40
|
+
|
|
41
|
+
/** A URI scheme, such as `file` or `untitled`. */
|
|
42
|
+
scheme?: string;
|
|
43
|
+
|
|
44
|
+
/** A glob pattern, such as `*.{ts,js}`. */
|
|
45
|
+
pattern?: string;
|
|
46
|
+
|
|
47
|
+
/** A base URI (e.g. root URI of a workspace folder) that the document must be within. */
|
|
48
|
+
baseUri?: URL | string;
|
|
49
|
+
}
|
|
49
50
|
|
|
50
51
|
/**
|
|
51
52
|
* A document selector is the combination of one or many document filters.
|
|
@@ -54,7 +55,7 @@ declare module 'cdeops/client' {
|
|
|
54
55
|
*
|
|
55
56
|
* @example let sel: DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }];
|
|
56
57
|
*/
|
|
57
|
-
|
|
58
|
+
export type DocumentSelector = (string | DocumentFilter)[];
|
|
58
59
|
|
|
59
60
|
/**
|
|
60
61
|
* A document selector is the combination of one or many document filters.
|
|
@@ -63,27 +64,27 @@ declare module 'cdeops/client' {
|
|
|
63
64
|
*
|
|
64
65
|
* @example let sel: DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }];
|
|
65
66
|
*/
|
|
66
|
-
|
|
67
|
+
export type DocumentSelector = (string | DocumentFilter)[];
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
/**
|
|
70
|
+
* A panel view created by {@link sourcegraph.app.createPanelView}.
|
|
71
|
+
*/
|
|
72
|
+
export interface PanelView extends Unsubscribable {
|
|
72
73
|
/**
|
|
73
74
|
* The title of the panel view.
|
|
74
75
|
*/
|
|
75
|
-
|
|
76
|
+
title: string;
|
|
76
77
|
|
|
77
78
|
/**
|
|
78
79
|
* The content to show in the panel view. Markdown is supported.
|
|
79
80
|
*/
|
|
80
|
-
|
|
81
|
+
content: string;
|
|
81
82
|
|
|
82
83
|
/**
|
|
83
84
|
* The priority of this panel view. A higher value means that the item is shown near the beginning (usually
|
|
84
85
|
* the left side).
|
|
85
86
|
*/
|
|
86
|
-
|
|
87
|
+
priority: number;
|
|
87
88
|
|
|
88
89
|
/**
|
|
89
90
|
* Display the results of the location provider (with the given ID) in this panel below the
|
|
@@ -93,26 +94,26 @@ declare module 'cdeops/client' {
|
|
|
93
94
|
*
|
|
94
95
|
* @internal
|
|
95
96
|
*/
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
component: { locationProvider: string } | null;
|
|
98
|
+
}
|
|
98
99
|
|
|
99
|
-
|
|
100
|
+
/**
|
|
100
101
|
* A style for a {@link TextDocumentDecoration}.
|
|
101
102
|
*/
|
|
102
103
|
export interface ThemableDecorationStyle {
|
|
103
104
|
/** The CSS background-color property value for the line. */
|
|
104
|
-
backgroundColor?: string
|
|
105
|
+
backgroundColor?: string;
|
|
105
106
|
|
|
106
107
|
/** The CSS border property value for the line. */
|
|
107
|
-
border?: string
|
|
108
|
+
border?: string;
|
|
108
109
|
|
|
109
110
|
/** The CSS border-color property value for the line. */
|
|
110
|
-
borderColor?: string
|
|
111
|
+
borderColor?: string;
|
|
111
112
|
|
|
112
113
|
/** The CSS border-width property value for the line. */
|
|
113
|
-
borderWidth?: string
|
|
114
|
+
borderWidth?: string;
|
|
114
115
|
}
|
|
115
|
-
|
|
116
|
+
/**
|
|
116
117
|
* A text document decoration changes the appearance of a range in the document and/or adds other content to
|
|
117
118
|
* it.
|
|
118
119
|
*/
|
|
@@ -122,200 +123,290 @@ declare module 'cdeops/client' {
|
|
|
122
123
|
* only applied only on the start line, and the entire line. Multiline
|
|
123
124
|
* and intra-line ranges are not supported.
|
|
124
125
|
*/
|
|
125
|
-
range: Range
|
|
126
|
+
range: Range;
|
|
126
127
|
|
|
127
128
|
/**
|
|
128
129
|
* If true, the decoration applies to all lines in the range (inclusive), even if not all characters on the
|
|
129
130
|
* line are included.
|
|
130
131
|
*/
|
|
131
|
-
isWholeLine?: boolean
|
|
132
|
+
isWholeLine?: boolean;
|
|
132
133
|
|
|
133
134
|
/** Content to display after the range. */
|
|
134
|
-
after?: DecorationAttachmentRenderOptions
|
|
135
|
+
after?: DecorationAttachmentRenderOptions;
|
|
135
136
|
|
|
136
137
|
/** Overwrite style for light themes. */
|
|
137
|
-
light?: ThemableDecorationStyle
|
|
138
|
+
light?: ThemableDecorationStyle;
|
|
138
139
|
|
|
139
140
|
/** Overwrite style for dark themes. */
|
|
140
|
-
dark?: ThemableDecorationStyle
|
|
141
|
+
dark?: ThemableDecorationStyle;
|
|
141
142
|
}
|
|
142
143
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
export interface ThemableBadgeAttachmentStyle {
|
|
144
|
+
/**
|
|
145
|
+
* A style for {@link BadgeAttachmentRenderOptions}.
|
|
146
|
+
*/
|
|
147
|
+
export interface ThemableBadgeAttachmentStyle {
|
|
148
148
|
/**
|
|
149
149
|
* The icon (a base64-encoded image icon) to display next to the wrapped value.
|
|
150
150
|
*
|
|
151
151
|
* @deprecated Use {@link BadgeAttachmentRenderOptions#kind} to pick a predefined icon
|
|
152
152
|
*/
|
|
153
|
-
|
|
153
|
+
icon?: string;
|
|
154
154
|
|
|
155
155
|
/**
|
|
156
156
|
* The CSS background-color property value for the attachment.
|
|
157
157
|
*
|
|
158
158
|
* @deprecated Use {@link BadgeAttachmentRenderOptions#kind} to pick a predefined icon
|
|
159
159
|
*/
|
|
160
|
-
|
|
160
|
+
backgroundColor?: string;
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
163
|
* The CSS color property value for the attachment.
|
|
164
164
|
*
|
|
165
165
|
* @deprecated Use {@link BadgeAttachmentRenderOptions#kind} to pick a predefined icon
|
|
166
166
|
*/
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
color?: string;
|
|
168
|
+
}
|
|
169
169
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
/** An attachment adds content to a hover tooltip or result in a locations panel. */
|
|
171
|
+
export interface BadgeAttachmentRenderOptions extends ThemableBadgeAttachmentStyle {
|
|
172
|
+
/** Predefined icons for badge attachments */
|
|
173
|
+
kind: 'info' | 'error' | 'warning';
|
|
174
174
|
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
/** Tooltip text to display when hovering over the attachment. */
|
|
176
|
+
hoverMessage?: string;
|
|
177
177
|
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
/** If set, the attachment becomes a link with this destination URL. */
|
|
179
|
+
linkURL?: string;
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
182
|
* Overwrite style for light themes.
|
|
183
183
|
*
|
|
184
184
|
* @deprecated Use {@link BadgeAttachmentRenderOptions#kind} to pick a predefined icon
|
|
185
185
|
*/
|
|
186
|
-
|
|
186
|
+
light?: ThemableBadgeAttachmentStyle;
|
|
187
187
|
|
|
188
188
|
/**
|
|
189
189
|
* Overwrite style for dark themes.
|
|
190
190
|
*
|
|
191
191
|
* @deprecated Use {@link BadgeAttachmentRenderOptions#kind} to pick a predefined icon
|
|
192
192
|
*/
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* A wrapper around a providable type (currently hover and locations) with additional
|
|
198
|
-
* context to enable displaying badges next to the wrapped result value in the UI.
|
|
199
|
-
*/
|
|
200
|
-
export type Badged<T extends object> = T & {
|
|
201
|
-
badge?: BadgeAttachmentRenderOptions
|
|
202
|
-
}
|
|
193
|
+
dark?: ThemableBadgeAttachmentStyle;
|
|
194
|
+
}
|
|
203
195
|
|
|
196
|
+
/**
|
|
197
|
+
* A wrapper around a providable type (currently hover and locations) with additional
|
|
198
|
+
* context to enable displaying badges next to the wrapped result value in the UI.
|
|
199
|
+
*/
|
|
200
|
+
export type Badged<T extends object> = T & {
|
|
201
|
+
badge?: BadgeAttachmentRenderOptions;
|
|
202
|
+
};
|
|
204
203
|
|
|
205
204
|
/**
|
|
206
205
|
* A hover represents additional information for a symbol or word. Hovers are rendered in a tooltip-like
|
|
207
206
|
* widget.
|
|
208
207
|
*/
|
|
209
|
-
|
|
208
|
+
export interface Hover {
|
|
210
209
|
/**
|
|
211
210
|
* The contents of this hover.
|
|
212
211
|
*/
|
|
213
|
-
|
|
212
|
+
contents: MarkupContent;
|
|
214
213
|
|
|
215
214
|
/**
|
|
216
215
|
* The range to which this hover applies. When missing, the editor will use the range at the current
|
|
217
216
|
* position or the current position itself.
|
|
218
217
|
*/
|
|
219
|
-
|
|
218
|
+
range?: Range;
|
|
220
219
|
|
|
221
220
|
/**
|
|
222
221
|
* Alerts that should be shown in this hover.
|
|
223
222
|
*/
|
|
224
|
-
|
|
225
|
-
|
|
223
|
+
alerts?: Badged<HoverAlert>[];
|
|
224
|
+
}
|
|
226
225
|
|
|
227
|
-
|
|
226
|
+
export interface HoverAlert {
|
|
228
227
|
/**
|
|
229
228
|
* Text content to be shown on hovers. Since the alert is displayed inline,
|
|
230
229
|
* multiparagraph content will be rendered on one line. It's recommended to
|
|
231
230
|
* provide a brief message here, and place futher details in the badge or
|
|
232
231
|
* provide a link.
|
|
233
232
|
*/
|
|
234
|
-
|
|
233
|
+
summary: MarkupContent;
|
|
235
234
|
|
|
236
235
|
/**
|
|
237
236
|
* When an alert has a dismissal type, dismissing it will prevent all alerts
|
|
238
237
|
* of that type from being shown. If no type is provided, the alert is not
|
|
239
238
|
* dismissible.
|
|
240
239
|
*/
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
240
|
+
type?: string;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface ContextValues {
|
|
244
|
+
[key: string]: string | number | boolean | null;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Internal API for Cdeops extensions. ost of those wil be removed for the beta release of Cdeops
|
|
249
|
+
* extensions. They are necessary now due to limitations in the extension API and its implementation tha will
|
|
250
|
+
* be addressed in the beta release.
|
|
251
|
+
*
|
|
252
|
+
* @internal
|
|
253
|
+
* @hidden
|
|
254
|
+
*/
|
|
255
|
+
export namespace internal {
|
|
256
|
+
/**
|
|
257
|
+
* Returns a promise that resolve when all pending messages have been sent to the client.
|
|
258
|
+
* It helps enforce serialization of messages.
|
|
259
|
+
*
|
|
260
|
+
* @internal
|
|
261
|
+
*/
|
|
262
|
+
export function sync(): Promise<void>;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Updates context values for use in context expressions and contribution labels.
|
|
266
|
+
*
|
|
267
|
+
* @param updates The updates to apply to the context. If a context property's value is null, it is deleted from the
|
|
268
|
+
* context.
|
|
269
|
+
*/
|
|
270
|
+
export function updateContext(updates: ContextValues): void;
|
|
271
|
+
|
|
272
|
+
export const cdeopsURL: URI;
|
|
273
|
+
|
|
274
|
+
export const clientApplication: 'cdeops' | 'other';
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Server api
|
|
278
|
+
*/
|
|
279
|
+
export const serverApi: any;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* gql
|
|
283
|
+
*/
|
|
284
|
+
export const gql: any;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* The extension context is passed to the extension's activate function and contains utilities for
|
|
289
|
+
* extension lifecycle.
|
|
290
|
+
*/
|
|
291
|
+
export interface ExtensionContext {
|
|
292
|
+
/**
|
|
293
|
+
* An object that maintains subscriptions to resources that should be freed when the extension is
|
|
294
|
+
* deactivated.
|
|
295
|
+
*
|
|
296
|
+
* When an extension is deactivated, first its exported `deactivate` function is called (if one exists).
|
|
297
|
+
* The `deactivate` function may be async, in which case deactivation blocks on it finishing. Next,
|
|
298
|
+
* regardless of whether the `deactivate` function finished successfully or rejected with an error, all
|
|
299
|
+
* unsubscribables passed to {@link ExtensionContext#subscriptions#add} are unsubscribed from.
|
|
300
|
+
*
|
|
301
|
+
* (An extension is deactivated when the user disables it, or after an arbitary time period if
|
|
302
|
+
* activationEvents no longer evaluated to true.)
|
|
303
|
+
*/
|
|
304
|
+
subscriptions: {
|
|
305
|
+
/**
|
|
306
|
+
* Mark a resource's teardown function to be called when the extension is deactivated.
|
|
307
|
+
*
|
|
308
|
+
* @param unsubscribable An {@link Unsubscribable} that frees (unsubscribes from) a resource, or a
|
|
309
|
+
* plan function that deos the same. Async functions are not supported. (If deactivation requires
|
|
310
|
+
* async operations, make the `deactivate` function async; that is supported.)
|
|
311
|
+
*/
|
|
312
|
+
add: (unsubscribe: Unsubscribable | (() => void)) => void;
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Namespace for dealing with commands. In short, a command is a function with a
|
|
318
|
+
* unique identifier. The function is sometimes also called _command handler_.
|
|
319
|
+
*
|
|
320
|
+
* Commands can be added to the editor using the [registerCommand](#commands.registerCommand)
|
|
321
|
+
* and [registerTextEditorCommand](#commands.registerTextEditorCommand) functions. Commands
|
|
322
|
+
* can be executed [manually](#commands.executeCommand) or from a UI gesture. Those are:
|
|
323
|
+
*
|
|
324
|
+
* * palette - Use the `commands`-section in `package.json` to make a command show in
|
|
325
|
+
* the [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette).
|
|
326
|
+
* * keybinding - Use the `keybindings`-section in `package.json` to enable
|
|
327
|
+
* [keybindings](https://code.visualstudio.com/docs/getstarted/keybindings#_customizing-shortcuts)
|
|
328
|
+
* for your extension.
|
|
329
|
+
*
|
|
330
|
+
* Commands from other extensions and from the editor itself are accessible to an extension. However,
|
|
331
|
+
* when invoking an editor command not all argument types are supported.
|
|
332
|
+
*
|
|
333
|
+
* This is a sample that registers a command handler and adds an entry for that command to the palette. First
|
|
334
|
+
* register a command handler with the identifier `extension.sayHello`.
|
|
335
|
+
* ```javascript
|
|
336
|
+
* commands.registerCommand('extension.sayHello', () => {
|
|
337
|
+
* window.showInformationMessage('Hello World!');
|
|
338
|
+
* });
|
|
339
|
+
* ```
|
|
340
|
+
* Second, bind the command identifier to a title under which it will show in the palette (`package.json`).
|
|
341
|
+
* ```json
|
|
342
|
+
* {
|
|
343
|
+
* "contributes": {
|
|
344
|
+
* "commands": [{
|
|
345
|
+
* "command": "extension.sayHello",
|
|
346
|
+
* "title": "Hello World"
|
|
347
|
+
* }]
|
|
348
|
+
* }
|
|
349
|
+
* }
|
|
350
|
+
* ```
|
|
351
|
+
*/
|
|
352
|
+
export namespace commands {
|
|
353
|
+
/**
|
|
354
|
+
* Registers a command that can be invoked via a keyboard shortcut,
|
|
355
|
+
* a menu item, an action, or directly.
|
|
356
|
+
*
|
|
357
|
+
* Registering a command with an existing command identifier twice
|
|
358
|
+
* will cause an error.
|
|
359
|
+
*
|
|
360
|
+
* @param command A unique identifier for the command.
|
|
361
|
+
* @param callback A command handler function.
|
|
362
|
+
* @param thisArg The `this` context used when invoking the handler function.
|
|
363
|
+
* @return Disposable which unregisters this command on disposal.
|
|
364
|
+
*/
|
|
365
|
+
export function registerCommand(command: string, callback: (...args: any[]) => any, thisArg?: any): Disposable;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Registers a text editor command that can be invoked via a keyboard shortcut,
|
|
369
|
+
* a menu item, an action, or directly.
|
|
370
|
+
*
|
|
371
|
+
* Text editor commands are different from ordinary [commands](#commands.registerCommand) as
|
|
372
|
+
* they only execute when there is an active editor when the command is called. Also, the
|
|
373
|
+
* command handler of an editor command has access to the active editor and to an
|
|
374
|
+
* [edit](#TextEditorEdit)-builder.
|
|
375
|
+
*
|
|
376
|
+
* @param command A unique identifier for the command.
|
|
377
|
+
* @param callback A command handler function with access to an [editor](#TextEditor) and an [edit](#TextEditorEdit).
|
|
378
|
+
* @param thisArg The `this` context used when invoking the handler function.
|
|
379
|
+
* @return Disposable which unregisters this command on disposal.
|
|
380
|
+
*/
|
|
381
|
+
export function registerTextEditorCommand(
|
|
382
|
+
command: string,
|
|
383
|
+
callback: (textEditor: TextEditor, edit: TextEditorEdit, ...args: any[]) => void,
|
|
384
|
+
thisArg?: any,
|
|
385
|
+
): Disposable;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Executes the command denoted by the given command identifier.
|
|
389
|
+
*
|
|
390
|
+
* * *Note 1:* When executing an editor command not all types are allowed to
|
|
391
|
+
* be passed as arguments. Allowed are the primitive types `string`, `boolean`,
|
|
392
|
+
* `number`, `undefined`, and `null`, as well as [`Position`](#Position), [`Range`](#Range), [`Uri`](#Uri) and [`Location`](#Location).
|
|
393
|
+
* * *Note 2:* There are no restrictions when executing commands that have been contributed
|
|
394
|
+
* by extensions.
|
|
395
|
+
*
|
|
396
|
+
* @param command Identifier of the command to execute.
|
|
397
|
+
* @param rest Parameters passed to the command function.
|
|
398
|
+
* @return A promise that resolves to the returned value of the given command. `undefined` when
|
|
399
|
+
* the command handler function doesn't return anything.
|
|
400
|
+
*/
|
|
401
|
+
export function executeCommand<T>(command: string, ...rest: any[]): Promise<T | undefined>;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Retrieve the list of all available commands. Commands starting an underscore are
|
|
405
|
+
* treated as internal commands.
|
|
406
|
+
*
|
|
407
|
+
* @param filterInternal Set `true` to not see internal commands (starting with an underscore)
|
|
408
|
+
* @return Promise that resolves to a list of command ids.
|
|
409
|
+
*/
|
|
410
|
+
export function getCommands(filterInternal?: boolean): Promise<string[]>;
|
|
411
|
+
}
|
|
412
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cdeops",
|
|
3
|
-
"version": "10.6.
|
|
3
|
+
"version": "10.6.2-alpha.3",
|
|
4
4
|
"description": "Cdecode - Extension API: build extensions that enhance coding experience in your cdeops editor",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "16cb517e6e9b4ba825e3cb28af8b18cb7077f0fe"
|
|
33
33
|
}
|