Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lsif-protocol

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lsif-protocol - npm Package Compare versions

Comparing version 0.5.3 to 0.6.0-next.1

108

lib/protocol.d.ts

@@ -84,4 +84,5 @@ import * as lsp from 'vscode-languageserver-protocol';

event = "$event",
catalogInfo = "catalogInfo",
source = "source",
project = "project",
group = "group",
range = "range",

@@ -138,3 +139,2 @@ location = "location",

export declare enum EventScope {
group = "group",
project = "project",

@@ -167,9 +167,2 @@ document = "document",

}
export interface GroupEvent extends Event {
scope: EventScope.group;
}
export declare namespace GroupEvent {
const descriptor: VertexDescriptor<Required<GroupEvent>>;
function is(value: any): value is GroupEvent;
}
export interface ProjectEvent extends Event {

@@ -470,6 +463,2 @@ scope: EventScope.project;

url: string;
/**
* A commitId if available.
*/
commitId?: string;
}

@@ -481,42 +470,62 @@ export declare namespace RepositoryInfo {

}
export interface Group extends V {
export interface RepositoryIndexInfo extends RepositoryInfo {
/**
* The label property.
* A commitId if available.
*/
label: VertexLabels.group;
commitId: string;
/**
* The group uri
* The branch name.
*/
uri: Uri;
branchName: string;
}
export declare namespace RepositoryIndexInfo {
const descriptor: ObjectDescriptor<RepositoryIndexInfo>;
function is(value: any): value is RepositoryInfo;
function property(flags?: PropertyFlags): Property<RepositoryIndexInfo>;
}
export interface Source extends V {
label: VertexLabels.source;
/**
* Groups are usually shared between project dumps. This property indicates how a DB should
* handle group information coming from different project dumps. In case of a conflict (the group
* already exists in a DB) the values' meaning are:
*
* - `takeDump`: information of the group should overwrite information in a DB.
* - `takeDB`: information of the group is ignored. The DB values stay as is.
* The workspace root used when indexing.
*/
conflictResolution: 'takeDump' | 'takeDB';
workspaceRoot: Uri;
/**
* The group name
* Optional information about the repository containing the indexed source.
*/
name: string;
repository?: RepositoryInfo | RepositoryIndexInfo;
}
export declare namespace Source {
const descriptor: VertexDescriptor<Source>;
function is(value: any): value is Source;
}
export interface CatalogInfo extends V {
label: VertexLabels.catalogInfo;
/**
* The root folder uri pointing to the file system that contained the source
* when creating the dump. This is usually a TS project rootDir or a
* workspace folder on disk.
* The URI of the catalog info. The scheme of a catalog URI should usually
* be `lsif-cat` and the authority should point to the organization's
* http address. And example of a catalogue URI would be something
* like `lsif-cat://microsoft.com/Azure/DevDiv/vscode/vscode-languageserver-protocol`
*/
rootUri: Uri;
uri: Uri;
/**
* The group description
* A user friendly name of the catalogue info.
*/
name: string;
/**
* An optional description.
*/
description?: string;
/**
* Optional information about the repository containing the source of the package.
* When a project is re-index it might want to update its catalog info. If the
* DB managing the index already has an entry for the catalog information the
* value defines how the conflict should be resolved. The meanings are:
*
* - `takeDump`: information of the catalogue should overwrite information in a DB.
* - `takeDB`: information of the catalogue is ignored. The DB values stay as is.
*/
repository?: RepositoryInfo;
conflictResolution: 'takeDump' | 'takeDB';
}
export declare namespace Group {
const descriptor: VertexDescriptor<Group>;
function is(value: any): value is Group;
export declare namespace CatalogueInfo {
const descriptor: VertexDescriptor<CatalogInfo>;
function is(value: any): value is CatalogInfo;
}

@@ -604,13 +613,13 @@ /**

/**
* The moniker is only unique inside a document
* The moniker is only unique inside a document.
*/
document = "document",
/**
* The moniker is unique inside a project for which a dump got created
* The moniker is unique inside a project for which a dump got created.
*/
project = "project",
/**
* The moniker is unique inside the group to which a project belongs
* The moniker is unique inside the workspace to which a project belongs.
*/
group = "group",
workspace = "workspace",
/**

@@ -621,3 +630,3 @@ * The moniker is unique inside the moniker scheme.

/**
* The moniker is globally unique
* The moniker is globally unique.
*/

@@ -850,3 +859,3 @@ global = "global"

*/
export declare type Vertex = MetaData | Event | Project | Group | Document | Moniker | PackageInformation | ResultSet | Range | DocumentSymbolResult | FoldingRangeResult | DocumentLinkResult | DiagnosticResult | DefinitionResult | DeclarationResult | TypeDefinitionResult | HoverResult | ReferenceResult | ImplementationResult;
export declare type Vertex = MetaData | Event | Source | CatalogInfo | Project | Document | Moniker | PackageInformation | ResultSet | Range | DocumentSymbolResult | FoldingRangeResult | DocumentLinkResult | DiagnosticResult | DefinitionResult | DeclarationResult | TypeDefinitionResult | HoverResult | ReferenceResult | ImplementationResult;
export declare namespace Vertex {

@@ -862,3 +871,2 @@ function getDescriptor(vertexOrVertexLabel: Vertex | VertexLabels): VertexDescriptor<V>;

packageInformation = "packageInformation",
belongsTo = "belongsTo",
textDocument_documentSymbol = "textDocument/documentSymbol",

@@ -1017,12 +1025,2 @@ textDocument_foldingRange = "textDocument/foldingRange",

/**
* An edge associating a project with a group. The relationship exists between:
*
* - `Project` -> `Group`
*/
export declare type belongsTo = E11<Project, Group, EdgeLabels.belongsTo>;
export declare namespace belongsTo {
const descriptor: EdgeDescriptor<belongsTo>;
function is(value: any): value is attach;
}
/**
* An edge representing a `textDocument/documentSymbol` relationship. The relationship exists between:

@@ -1138,3 +1136,3 @@ *

*/
export declare type Edge = contains | item | next | moniker | attach | packageInformation | belongsTo | textDocument_documentSymbol | textDocument_foldingRange | textDocument_documentLink | textDocument_diagnostic | textDocument_declaration | textDocument_definition | textDocument_typeDefinition | textDocument_hover | textDocument_references | textDocument_implementation;
export declare type Edge = contains | item | next | moniker | attach | packageInformation | textDocument_documentSymbol | textDocument_foldingRange | textDocument_documentLink | textDocument_diagnostic | textDocument_declaration | textDocument_definition | textDocument_typeDefinition | textDocument_hover | textDocument_references | textDocument_implementation;
export declare namespace Edge {

@@ -1141,0 +1139,0 @@ function is11(edge: Edge): edge is (Edge & {

@@ -7,4 +7,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.EdgeLabels = exports.Vertex = exports.HoverResult = exports.ImplementationResult = exports.ReferenceResult = exports.TypeDefinitionResult = exports.DefinitionResult = exports.DeclarationResult = exports.DocumentLinkResult = exports.FoldingRangeResult = exports.DiagnosticResult = exports.DocumentSymbolResult = exports.RangeBasedDocumentSymbol = exports.PackageInformation = exports.Moniker = exports.UniquenessLevel = exports.MonikerKind = exports.Document = exports.Project = exports.Group = exports.RepositoryInfo = exports.MetaData = exports.ToolState = exports.ToolInfo = exports.Location = exports.ReferenceRange = exports.DeclarationRange = exports.DefinitionRange = exports.Range = exports.RangeTag = exports.UnknownTag = exports.ReferenceTag = exports.DefinitionTag = exports.DeclarationTag = exports.RangeTagTypes = exports.ResultSet = exports.MonikerAttachEvent = exports.DocumentEvent = exports.ProjectEvent = exports.GroupEvent = exports.Event = exports.EventScope = exports.EventKind = exports.V = exports.VertexDescriptor = exports.VertexLabels = exports.Element = exports.ElementTypes = exports.Id = exports.uinteger = void 0;
exports.Edge = exports.textDocument_implementation = exports.textDocument_references = exports.textDocument_hover = exports.textDocument_typeDefinition = exports.textDocument_definition = exports.textDocument_declaration = exports.textDocument_diagnostic = exports.textDocument_documentLink = exports.textDocument_foldingRange = exports.textDocument_documentSymbol = exports.belongsTo = exports.packageInformation = exports.attach = exports.moniker = exports.item = exports.next = exports.contains = exports.ItemEdgeProperties = exports.E1N = exports.E11 = exports.EdgeDescriptor = exports.Cardinality = void 0;
exports.Vertex = exports.HoverResult = exports.ImplementationResult = exports.ReferenceResult = exports.TypeDefinitionResult = exports.DefinitionResult = exports.DeclarationResult = exports.DocumentLinkResult = exports.FoldingRangeResult = exports.DiagnosticResult = exports.DocumentSymbolResult = exports.RangeBasedDocumentSymbol = exports.PackageInformation = exports.Moniker = exports.UniquenessLevel = exports.MonikerKind = exports.Document = exports.Project = exports.CatalogueInfo = exports.Source = exports.RepositoryIndexInfo = exports.RepositoryInfo = exports.MetaData = exports.ToolState = exports.ToolInfo = exports.Location = exports.ReferenceRange = exports.DeclarationRange = exports.DefinitionRange = exports.Range = exports.RangeTag = exports.UnknownTag = exports.ReferenceTag = exports.DefinitionTag = exports.DeclarationTag = exports.RangeTagTypes = exports.ResultSet = exports.MonikerAttachEvent = exports.DocumentEvent = exports.ProjectEvent = exports.Event = exports.EventScope = exports.EventKind = exports.V = exports.VertexDescriptor = exports.VertexLabels = exports.Element = exports.ElementTypes = exports.Id = exports.uinteger = void 0;
exports.Edge = exports.textDocument_implementation = exports.textDocument_references = exports.textDocument_hover = exports.textDocument_typeDefinition = exports.textDocument_definition = exports.textDocument_declaration = exports.textDocument_diagnostic = exports.textDocument_documentLink = exports.textDocument_foldingRange = exports.textDocument_documentSymbol = exports.packageInformation = exports.attach = exports.moniker = exports.item = exports.next = exports.contains = exports.ItemEdgeProperties = exports.E1N = exports.E11 = exports.EdgeDescriptor = exports.Cardinality = exports.EdgeLabels = void 0;
const lsp = require("vscode-languageserver-protocol");

@@ -240,4 +240,5 @@ var Is;

VertexLabels["event"] = "$event";
VertexLabels["catalogInfo"] = "catalogInfo";
VertexLabels["source"] = "source";
VertexLabels["project"] = "project";
VertexLabels["group"] = "group";
VertexLabels["range"] = "range";

@@ -323,3 +324,2 @@ VertexLabels["location"] = "location";

(function (EventScope) {
EventScope["group"] = "group";
EventScope["project"] = "project";

@@ -353,12 +353,2 @@ EventScope["document"] = "document";

})(Event = exports.Event || (exports.Event = {}));
var GroupEvent;
(function (GroupEvent) {
GroupEvent.descriptor = new VertexDescriptor(Object.assign({}, Event.descriptor.description, {
scope: new Property(value => value === EventScope.group),
}));
function is(value) {
return GroupEvent.descriptor.validate(value);
}
GroupEvent.is = is;
})(GroupEvent = exports.GroupEvent || (exports.GroupEvent = {}));
var ProjectEvent;

@@ -600,3 +590,2 @@ (function (ProjectEvent) {

url: new StringProperty(),
commitId: new StringProperty(PropertyFlags.optional)
});

@@ -612,18 +601,43 @@ function is(value) {

})(RepositoryInfo = exports.RepositoryInfo || (exports.RepositoryInfo = {}));
var Group;
(function (Group) {
Group.descriptor = new VertexDescriptor(Object.assign({}, V.descriptor.description, {
label: VertexLabels.property(VertexLabels.group),
var RepositoryIndexInfo;
(function (RepositoryIndexInfo) {
RepositoryIndexInfo.descriptor = new ObjectDescriptor(Object.assign({}, RepositoryInfo.descriptor.description, {
commitId: new StringProperty(PropertyFlags.optional),
branchName: new StringProperty(PropertyFlags.optional)
}));
function is(value) {
return RepositoryIndexInfo.descriptor.validate(value);
}
RepositoryIndexInfo.is = is;
function property(flags = PropertyFlags.none) {
return new Property(RepositoryIndexInfo.is, flags);
}
RepositoryIndexInfo.property = property;
})(RepositoryIndexInfo = exports.RepositoryIndexInfo || (exports.RepositoryIndexInfo = {}));
var Source;
(function (Source) {
Source.descriptor = new VertexDescriptor(Object.assign({}, V.descriptor.description, {
label: VertexLabels.property(VertexLabels.source),
workspaceRoot: new UriProperty(),
repository: new Property((value) => RepositoryInfo.is(value) || RepositoryIndexInfo.is(value), PropertyFlags.optional)
}));
function is(value) {
return Source.descriptor.validate(value);
}
Source.is = is;
})(Source = exports.Source || (exports.Source = {}));
var CatalogueInfo;
(function (CatalogueInfo) {
CatalogueInfo.descriptor = new VertexDescriptor(Object.assign({}, V.descriptor.description, {
label: VertexLabels.property(VertexLabels.catalogInfo),
uri: new StringProperty(),
conflictResolution: new Property(value => value === 'takeDump' || value === 'takeDB'),
name: new StringProperty(),
rootUri: new UriProperty(),
description: new StringProperty(PropertyFlags.optional),
repository: RepositoryInfo.property(PropertyFlags.optional)
conflictResolution: new Property(value => value === 'takeDump' || value === 'takeDB')
}));
function is(value) {
return Group.descriptor.validate(value);
return CatalogueInfo.descriptor.validate(value);
}
Group.is = is;
})(Group = exports.Group || (exports.Group = {}));
CatalogueInfo.is = is;
})(CatalogueInfo = exports.CatalogueInfo || (exports.CatalogueInfo = {}));
var Project;

@@ -689,13 +703,13 @@ (function (Project) {

/**
* The moniker is only unique inside a document
* The moniker is only unique inside a document.
*/
UniquenessLevel["document"] = "document";
/**
* The moniker is unique inside a project for which a dump got created
* The moniker is unique inside a project for which a dump got created.
*/
UniquenessLevel["project"] = "project";
/**
* The moniker is unique inside the group to which a project belongs
* The moniker is unique inside the workspace to which a project belongs.
*/
UniquenessLevel["group"] = "group";
UniquenessLevel["workspace"] = "workspace";
/**

@@ -706,3 +720,3 @@ * The moniker is unique inside the moniker scheme.

/**
* The moniker is globally unique
* The moniker is globally unique.
*/

@@ -900,4 +914,5 @@ UniquenessLevel["global"] = "global";

descriptors.set(VertexLabels.event, Event.descriptor);
descriptors.set(VertexLabels.source, Source.descriptor);
descriptors.set(VertexLabels.catalogInfo, CatalogueInfo.descriptor);
descriptors.set(VertexLabels.project, Project.descriptor);
descriptors.set(VertexLabels.group, Group.descriptor);
descriptors.set(VertexLabels.document, Document.descriptor);

@@ -936,3 +951,2 @@ descriptors.set(VertexLabels.moniker, Moniker.descriptor);

EdgeLabels["packageInformation"] = "packageInformation";
EdgeLabels["belongsTo"] = "belongsTo";
EdgeLabels["textDocument_documentSymbol"] = "textDocument/documentSymbol";

@@ -1104,13 +1118,2 @@ EdgeLabels["textDocument_foldingRange"] = "textDocument/foldingRange";

})(packageInformation = exports.packageInformation || (exports.packageInformation = {}));
var belongsTo;
(function (belongsTo) {
const edgeInformation = [[Project.descriptor, Group.descriptor]];
belongsTo.descriptor = new EdgeDescriptor(Object.assign({}, E11.descriptor.description, {
label: EdgeLabels.property(EdgeLabels.belongsTo)
}), Cardinality.one2one, edgeInformation);
function is(value) {
return belongsTo.descriptor.validate(value);
}
belongsTo.is = is;
})(belongsTo = exports.belongsTo || (exports.belongsTo = {}));
var textDocument_documentSymbol;

@@ -1245,3 +1248,2 @@ (function (textDocument_documentSymbol) {

descriptors.set(EdgeLabels.packageInformation, packageInformation.descriptor);
descriptors.set(EdgeLabels.belongsTo, belongsTo.descriptor);
descriptors.set(EdgeLabels.textDocument_documentSymbol, textDocument_documentSymbol.descriptor);

@@ -1248,0 +1250,0 @@ descriptors.set(EdgeLabels.textDocument_foldingRange, textDocument_foldingRange.descriptor);

{
"name": "lsif-protocol",
"description": "Typescript implementation of the LSIF protocol",
"version": "0.5.3",
"version": "0.6.0-next.1",
"author": "Microsoft Corporation",

@@ -6,0 +6,0 @@ "license": "MIT",

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