New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aws/language-server-runtimes

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws/language-server-runtimes - npm Package Compare versions

Comparing version 0.2.13 to 0.2.14

server-interface/runtime.d.ts

8

package.json
{
"name": "@aws/language-server-runtimes",
"version": "0.2.13",
"version": "0.2.14",
"description": "Runtimes to host Language Servers for AWS",

@@ -37,3 +37,3 @@ "files": [

"@aws/language-server-runtimes-types": "^0.0.6",
"jose": "^5.6.3",
"jose": "^5.7.0",
"rxjs": "^7.8.1",

@@ -45,5 +45,5 @@ "vscode-languageserver": "^9.0.1",

"@types/mocha": "^10.0.7",
"@types/node": "^22.1.0",
"@types/node": "^22.5.0",
"assert": "^2.0.0",
"husky": "^9.1.4",
"husky": "^9.1.5",
"prettier": "3.3.3",

@@ -50,0 +50,0 @@ "sinon": "^18.0.0",

import { InlineCompletionListWithReferences, InlineCompletionItemWithReferences, LogInlineCompletionSessionResultsParams, InlineCompletionRegistrationOptions, ProtocolNotificationType, ProtocolRequestType, InlineCompletionParams } from './lsp';
export type InlineCompletionWithReferencesParams = InlineCompletionParams & {};
export declare const inlineCompletionWithReferencesRequestType: ProtocolRequestType<InlineCompletionWithReferencesParams, InlineCompletionItemWithReferences[] | InlineCompletionListWithReferences | null, InlineCompletionItemWithReferences[], void, InlineCompletionRegistrationOptions>;
export declare const inlineCompletionWithReferencesRequestType: ProtocolRequestType<InlineCompletionWithReferencesParams, InlineCompletionListWithReferences | InlineCompletionItemWithReferences[] | null, InlineCompletionItemWithReferences[], void, InlineCompletionRegistrationOptions>;
export declare const logInlineCompletionSessionResultsNotificationType: ProtocolNotificationType<LogInlineCompletionSessionResultsParams, void>;
import { _EM } from 'vscode-jsonrpc';
import { InitializeResult as InitializeResultBase, ProgressType, RegistrationType, RequestType } from 'vscode-languageserver-protocol';
import { InitializeParams as _InitializeParamsBase, InitializeResult as _InitializeResultBase, ProgressType, RegistrationType, RequestType } from 'vscode-languageserver-protocol';
import { ChatOptions } from '@aws/language-server-runtimes-types';

@@ -20,5 +20,55 @@ export * from '@aws/language-server-runtimes-types';

/**
* Extended Client information, passed from client extension to server at initialization.
* Use to pass additional information about Client Extension, which connects to Language Server,
* when information in default LSP request is not enough.
*/
export interface ExtendedClientInfo {
/**
* Client environment name. May represent IDE or host platform of the Extension.
*/
name: string;
/**
* Client environment version.
*/
version: string;
/**
* Information about Client Extension passed during initialization from Client to Server.
* Use to identify extension and pass additional data, not available in standard InitializeParams object.
*/
extension: {
/**
* Client Extension name, which is used for managing and interacting with AWS Language Server.
* May contain spaces.
*/
name: string;
/**
* Client extension version.
*/
version: string;
};
/**
* Unique client Id, defined by the client extension.
*/
clientId?: string;
}
export interface AWSInitializationOptions {
/**
* Additional clientInfo to extend or override default data passed by LSP Client.
*/
clientInfo?: ExtendedClientInfo;
}
/**
* Extended AWS Runtimes InitializeParams interface,
* sent from Client to Server as part of [`initialize`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize) request
*/
export interface InitializeParams extends _InitializeParamsBase {
initializationOptions?: {
[key: string]: any;
aws: AWSInitializationOptions;
};
}
/**
* Custom AWS Runtimes InitializeResult object interface with extended options.
*/
export interface InitializeResult extends InitializeResultBase {
export interface InitializeResult extends _InitializeResultBase {
/**

@@ -25,0 +75,0 @@ * The server signals custom AWS Runtimes capabilities it supports.

@@ -1,3 +0,3 @@

import { CancellationToken, ExecuteCommandParams, InitializeError, InitializeParams, RequestHandler, ResponseError } from '../../../protocol';
import { PartialInitializeResult } from '../../../server-interface/lsp';
import { CancellationToken, ExecuteCommandParams, InitializeError, RequestHandler, ResponseError } from '../../../protocol';
import { InitializeParams, PartialInitializeResult } from '../../../server-interface/lsp';
export declare class LspServer {

@@ -4,0 +4,0 @@ private initializeHandler?;

@@ -164,2 +164,8 @@ "use strict";

const credentialsProvider = auth.getCredentialsProvider();
const runtime = {
serverInfo: {
name: props.name,
version: props.version,
},
};
// Create router that will be routing LSP events from the client to server(s)

@@ -223,3 +229,3 @@ const lspRouter = new lspRouter_1.LspRouter(lspConnection, props.name, props.version);

}
return s({ chat, credentialsProvider, lsp, workspace, telemetry, logging });
return s({ chat, credentialsProvider, lsp, workspace, telemetry, logging, runtime });
});

@@ -226,0 +232,0 @@ // Free up any resources or threads used by Servers

@@ -69,2 +69,8 @@ "use strict";

const credentialsProvider = auth.getCredentialsProvider();
const runtime = {
serverInfo: {
name: props.name,
version: props.version,
},
};
// Initialize every Server

@@ -119,3 +125,3 @@ const disposables = props.servers.map(s => {

};
return s({ chat, credentialsProvider, lsp, workspace, telemetry, logging });
return s({ chat, credentialsProvider, lsp, workspace, telemetry, logging, runtime });
});

@@ -122,0 +128,0 @@ // Free up any resources or threads used by Servers

@@ -8,1 +8,2 @@ export { Server } from './server';

export { Chat } from './chat';
export * from './runtime';

@@ -20,2 +20,3 @@ "use strict";

__exportStar(require("./telemetry"), exports);
__exportStar(require("./runtime"), exports);
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import { Logging, Lsp, Telemetry, Workspace, CredentialsProvider, Chat } from '.';
import { Logging, Lsp, Telemetry, Workspace, CredentialsProvider, Chat, Runtime } from '.';
/**

@@ -24,2 +24,3 @@ * Servers are used to provide features to the client.

telemetry: Telemetry;
runtime: Runtime;
}) => () => void;

@@ -1,2 +0,2 @@

import { Server, CredentialsProvider, Logging, Lsp, Telemetry, Workspace, Chat } from '../server-interface';
import { Server, CredentialsProvider, Logging, Lsp, Telemetry, Workspace, Chat, Runtime } from '../server-interface';
import { StubbedInstance } from 'ts-sinon';

@@ -27,2 +27,3 @@ import { CancellationToken, CompletionParams, DidChangeTextDocumentParams, DidOpenTextDocumentParams, DocumentFormattingParams, ExecuteCommandParams, HoverParams, InlineCompletionParams, SemanticTokensParams, TextDocument, SignatureHelpParams } from '../protocol';

};
runtime: StubbedInstance<Runtime>;
private disposables;

@@ -37,3 +38,3 @@ constructor();

doSignatureHelp(params: SignatureHelpParams, token: CancellationToken): Promise<import("vscode-languageserver-types").SignatureHelp | import("vscode-jsonrpc/lib/common/messages").ResponseError<void> | null | undefined>;
doInlineCompletionWithReferences(...args: Parameters<Parameters<Lsp['extensions']['onInlineCompletionWithReferences']>[0]>): Promise<import("@aws/language-server-runtimes-types/inlineCompletionWithReferences").InlineCompletionItemWithReferences[] | import("@aws/language-server-runtimes-types/inlineCompletionWithReferences").InlineCompletionListWithReferences | import("vscode-jsonrpc/lib/common/messages").ResponseError<void> | null | undefined>;
doInlineCompletionWithReferences(...args: Parameters<Parameters<Lsp['extensions']['onInlineCompletionWithReferences']>[0]>): Promise<import("@aws/language-server-runtimes-types/out/inlineCompletionWithReferences").InlineCompletionListWithReferences | import("@aws/language-server-runtimes-types/out/inlineCompletionWithReferences").InlineCompletionItemWithReferences[] | import("vscode-jsonrpc/lib/common/messages").ResponseError<void> | null | undefined>;
doLogInlineCompletionSessionResults(...args: Parameters<Parameters<Lsp['extensions']['onLogInlineCompletionSessionResults']>[0]>): Promise<void>;

@@ -40,0 +41,0 @@ openDocument(document: TextDocument): this;

@@ -36,2 +36,3 @@ "use strict";

this.documents = {};
this.runtime = (0, ts_sinon_1.stubInterface)();
this.workspace.getTextDocument.callsFake((uri) => __awaiter(this, void 0, void 0, function* () { return this.documents[uri]; }));

@@ -38,0 +39,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc