grammarly-languageclient
Advanced tools
Comparing version 0.0.1-next-1652143821.0 to 0.0.1-next-1652221915.0
@@ -1,2 +0,3 @@ | ||
import { LanguageClientOptions, LanguageClient } from 'vscode-languageclient/node'; | ||
import { BaseLanguageClient, MessageTransports } from 'vscode-languageclient'; | ||
import { LanguageClientOptions } from 'vscode-languageclient/browser'; | ||
@@ -7,6 +8,58 @@ interface GrammarlyLanguageClientOptions extends LanguageClientOptions { | ||
} | ||
declare class GrammarlyLanguageClient extends LanguageClient { | ||
/** | ||
* A semantic, incompatible type that improves type safety beyond `string`, for example. | ||
* | ||
* @alpha | ||
*/ | ||
declare type Opaque<T, K> = T & { | ||
__opaqueType?: K; | ||
}; | ||
/** | ||
* A unique identifier for a suggestion. | ||
* | ||
* @alpha | ||
*/ | ||
declare type SuggestionId$1 = Opaque<string, "SuggestionId">; | ||
/** | ||
* A unique identifier for a suggestion. | ||
* | ||
* @alpha | ||
*/ | ||
declare type SuggestionId = SuggestionId$1; | ||
/** | ||
* Status of | ||
* | ||
* @alpha | ||
*/ | ||
declare type SessionStatus = "connecting" | "checking" | "idle" | "error"; | ||
interface Protocol { | ||
getDocumentStatus(uri: string): Promise<SessionStatus | null>; | ||
isUserAccountConnected(): Promise<boolean>; | ||
getOAuthUrl(oauthRedirectUri: string): Promise<string>; | ||
logout(): Promise<void>; | ||
dismissSuggestion(params: { | ||
uri: string; | ||
suggestionId: SuggestionId; | ||
}): Promise<void>; | ||
handleOAuthCallbackUri(uri: string): void; | ||
onDocumentStatus(fn: (params: { | ||
uri: string; | ||
status: SessionStatus; | ||
}) => unknown): void; | ||
onUserAccountConnectedChange(fn: (params: { | ||
isUserAccountConnected: boolean; | ||
}) => unknown): void; | ||
} | ||
declare class GrammarlyLanguageClient extends BaseLanguageClient { | ||
protected getLocale(): string; | ||
protected createMessageTransports(encoding: string): Promise<MessageTransports>; | ||
constructor(serverPath: string, options: GrammarlyLanguageClientOptions); | ||
readonly protocol: Protocol; | ||
} | ||
export { GrammarlyLanguageClient, GrammarlyLanguageClientOptions }; |
{ | ||
"name": "grammarly-languageclient", | ||
"version": "0.0.1-next-1652143821.0", | ||
"version": "0.0.1-next-1652221915.0", | ||
"description": "LSP client implementation for Grammarly", | ||
"author": "Rahul Kadyan <hey@znck.me>", | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.esm.js", | ||
"browser": "dist/index.browser.js", | ||
"types": "dist/index.d.ts", | ||
"publishConfig": { | ||
"types": "dist/index.d.ts" | ||
"main": "./dist/index.node.cjs", | ||
"module": "./dist/index.node.mjs", | ||
"browser": "./dist/index.browser.mjs", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"node": { | ||
"require": "./dist/index.node.cjs", | ||
"import": "./dist/index.node.mjs", | ||
"default": "./dist/index.node.mjs" | ||
}, | ||
"default": { | ||
"import": "./dist/index.browser.mjs", | ||
"default": "./dist/index.browser.mjs" | ||
} | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"buildConfig": { | ||
"useMain": false, | ||
"external": [ | ||
@@ -21,5 +33,21 @@ "vscode-languageclient/browser", | ||
{ | ||
"format": "dts", | ||
"file": "dist/index.d.ts" | ||
} | ||
], | ||
"src/index.browser.ts": [ | ||
{ | ||
"format": "esm", | ||
"file": "dist/index.browser.js" | ||
"file": "dist/index.browser.mjs" | ||
} | ||
], | ||
"src/index.node.ts": [ | ||
{ | ||
"format": "esm", | ||
"file": "dist/index.node.mjs" | ||
}, | ||
{ | ||
"format": "cjs", | ||
"file": "dist/index.node.cjs" | ||
} | ||
] | ||
@@ -35,3 +63,6 @@ } | ||
"vscode-languageclient": "^7.0.0" | ||
}, | ||
"devDependencies": { | ||
"@grammarly/sdk": "^1.7.4" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14032
204
1
1