@redocly/openapi-language-server 0.9.11 → 0.10.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.
- package/lib/index.d.ts +30 -9
- package/lib/index.js +64 -60
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -220,6 +220,14 @@ declare module '@redocly/openapi-language-server/server/completion/yaml/ValueCom
|
|
|
220
220
|
declare module '@redocly/openapi-language-server/server/completion/yaml/__tests__/KeyCompletion.test' {
|
|
221
221
|
export {};
|
|
222
222
|
|
|
223
|
+
}
|
|
224
|
+
declare module '@redocly/openapi-language-server/server/completion/yaml/__tests__/completion.test' {
|
|
225
|
+
export {};
|
|
226
|
+
|
|
227
|
+
}
|
|
228
|
+
declare module '@redocly/openapi-language-server/server/completion/yaml/__tests__/config-completion.test' {
|
|
229
|
+
export {};
|
|
230
|
+
|
|
223
231
|
}
|
|
224
232
|
declare module '@redocly/openapi-language-server/server/completion/yaml/__tests__/insert-snippet-utils.test' {
|
|
225
233
|
export {};
|
|
@@ -246,6 +254,22 @@ declare module '@redocly/openapi-language-server/server/completion/yaml/completi
|
|
|
246
254
|
export function getCompletion(uri: DocumentUri, position: Position): Promise<CompletionItem[]>;
|
|
247
255
|
export function resolveCompletion(item: CompletionItem): CompletionItem;
|
|
248
256
|
|
|
257
|
+
}
|
|
258
|
+
declare module '@redocly/openapi-language-server/server/completion/yaml/config-completion' {
|
|
259
|
+
import { CompletionItem } from 'vscode-languageserver/browser';
|
|
260
|
+
import { type DocumentUri } from 'vscode-languageserver-textdocument';
|
|
261
|
+
import type * as yamlAst from '@redocly/yaml-language-server-parser';
|
|
262
|
+
import { type NodePath } from '@redocly/openapi-language-server/server/types/context-core';
|
|
263
|
+
import { ValueCompletion } from '@redocly/openapi-language-server/server/completion/yaml/ValueCompletion';
|
|
264
|
+
import { type YamlCompletionContext } from '@redocly/openapi-language-server/server/completion/yaml/context';
|
|
265
|
+
export function isRulesSection(context: YamlCompletionContext): boolean;
|
|
266
|
+
export function isRuleSeverityPosition(context: YamlCompletionContext): boolean;
|
|
267
|
+
export function isExtendsItemPath(nodePath: NodePath): boolean;
|
|
268
|
+
export function isExtendsKeyPath(nodePath: NodePath): boolean;
|
|
269
|
+
export function getRuleKeyCompletionItems(uri: DocumentUri, context: YamlCompletionContext, existingKeys: string[]): Promise<CompletionItem[]>;
|
|
270
|
+
export function getSeverityValueCompletionItems(context: YamlCompletionContext<yamlAst.YAMLScalar>): ValueCompletion[];
|
|
271
|
+
export function getExtendsValueCompletionItems(uri: DocumentUri, context: YamlCompletionContext<yamlAst.YAMLScalar>): Promise<ValueCompletion[]>;
|
|
272
|
+
|
|
249
273
|
}
|
|
250
274
|
declare module '@redocly/openapi-language-server/server/completion/yaml/context' {
|
|
251
275
|
import { type DocumentUri, type Position } from 'vscode-languageserver-textdocument';
|
|
@@ -278,16 +302,13 @@ declare module '@redocly/openapi-language-server/server/completion/yaml/context'
|
|
|
278
302
|
declare module '@redocly/openapi-language-server/server/completion/yaml/insert-snippet-utils' {
|
|
279
303
|
import { type NormalizedNodeType } from '@redocly/openapi-core';
|
|
280
304
|
export type PartialNodeType = Pick<NormalizedNodeType, 'items' | 'required'>;
|
|
281
|
-
|
|
282
|
-
function getBeforeKeyValue(key: string, value: string, beforeKey: string, type?: PartialNodeType): string;
|
|
283
|
-
function getAfterKeyValue(key: string): "" | ": ";
|
|
284
|
-
function getBeforeKey(lineText?: string): "" | " " | "\n ";
|
|
285
|
-
function getAfterValue(beforeKey: string, properties?: NormalizedNodeType['properties']): "" | "\n " | "\n ";
|
|
286
|
-
function getInsertSnippet(key: string, data?: {
|
|
305
|
+
export interface InsertSnippetData extends PartialNodeType {
|
|
287
306
|
properties?: NormalizedNodeType['properties'];
|
|
288
|
-
lineText
|
|
289
|
-
}
|
|
290
|
-
|
|
307
|
+
lineText?: string;
|
|
308
|
+
}
|
|
309
|
+
function getSequenceItemIndent(lineText?: string): string;
|
|
310
|
+
function getInsertSnippet(key: string, data?: InsertSnippetData): string;
|
|
311
|
+
export { getInsertSnippet, getSequenceItemIndent };
|
|
291
312
|
|
|
292
313
|
}
|
|
293
314
|
declare module '@redocly/openapi-language-server/server/completion/yaml/paths' {
|