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

@eclipse-glsp/protocol

Package Overview
Dependencies
Maintainers
6
Versions
297
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eclipse-glsp/protocol - npm Package Compare versions

Comparing version 1.1.0-next.698b9de.254 to 1.1.0-next.69a77b0.259

lib/utils/disposable.d.ts

14

lib/action-protocol/base-protocol.js

@@ -22,3 +22,3 @@ "use strict";

Action.hasKind = hasKind;
})(Action = exports.Action || (exports.Action = {}));
})(Action || (exports.Action = Action = {}));
var ActionMessage;

@@ -31,3 +31,3 @@ (function (ActionMessage) {

ActionMessage.is = is;
})(ActionMessage = exports.ActionMessage || (exports.ActionMessage = {}));
})(ActionMessage || (exports.ActionMessage = ActionMessage = {}));
var RequestAction;

@@ -53,3 +53,3 @@ (function (RequestAction) {

RequestAction.generateRequestId = generateRequestId;
})(RequestAction = exports.RequestAction || (exports.RequestAction = {}));
})(RequestAction || (exports.RequestAction = RequestAction = {}));
var ResponseAction;

@@ -70,3 +70,3 @@ (function (ResponseAction) {

ResponseAction.hasValidResponseId = hasValidResponseId;
})(ResponseAction = exports.ResponseAction || (exports.ResponseAction = {}));
})(ResponseAction || (exports.ResponseAction = ResponseAction = {}));
var RejectAction;

@@ -83,3 +83,3 @@ (function (RejectAction) {

RejectAction.create = create;
})(RejectAction = exports.RejectAction || (exports.RejectAction = {}));
})(RejectAction || (exports.RejectAction = RejectAction = {}));
var Operation;

@@ -101,3 +101,3 @@ (function (Operation) {

Operation.hasKind = hasKind;
})(Operation = exports.Operation || (exports.Operation = {}));
})(Operation || (exports.Operation = Operation = {}));
var CompoundOperation;

@@ -118,3 +118,3 @@ (function (CompoundOperation) {

CompoundOperation.create = create;
})(CompoundOperation = exports.CompoundOperation || (exports.CompoundOperation = {}));
})(CompoundOperation || (exports.CompoundOperation = CompoundOperation = {}));
//# sourceMappingURL=base-protocol.js.map

@@ -53,6 +53,2 @@ import { Action } from './base-protocol';

details?: string;
/**
* Timeout after which a displayed message disappears.
*/
timeout?: number;
}

@@ -65,5 +61,81 @@ export declare namespace ServerMessageAction {

details?: string;
timeout?: number;
}): ServerMessageAction;
}
/**
* Sent by the server to the client to request presenting the progress of a long running process in the UI.
*/
export interface StartProgressAction extends Action {
kind: typeof StartProgressAction.KIND;
/**
* An ID that can be used in subsequent `updateProgress` and `endProgress` events to make them refer to the same progress reporting.
*/
progressId: string;
/**
* Short title of the progress reporting. Shown in the UI to describe the long running process.
*/
title: string;
/**
* Optional additional progress message. Shown in the UI to describe the long running process.
*/
message?: string;
/**
* Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown.
*/
percentage?: number;
}
export declare namespace StartProgressAction {
const KIND = "startProgress";
function is(object: any): object is StartProgressAction;
function create(options: {
progressId: string;
title: string;
message?: string;
percentage?: number;
}): StartProgressAction;
}
/**
* Sent by the server to the client to presenting an update of the progress of a long running process in the UI.
*/
export interface UpdateProgressAction extends Action {
kind: typeof UpdateProgressAction.KIND;
/**
* The ID of the progress reporting to update.
*/
progressId: string;
/**
* The message to show in the progress reporting.
*/
message?: string;
/**
* The percentage (value range: 0 to 100) to show in the progress reporting.
*/
percentage?: number;
}
export declare namespace UpdateProgressAction {
const KIND = "updateProgress";
function is(object: any): object is UpdateProgressAction;
function create(progressId: string, options?: {
message?: string;
percentage?: number;
}): UpdateProgressAction;
}
/**
* Sent by the server to the client to end the reporting of a progress.
*/
export interface EndProgressAction extends Action {
kind: typeof EndProgressAction.KIND;
/**
* The ID of the progress reporting to update.
*/
progressId: string;
/**
* The message to show in the progress reporting.
*/
message?: string;
}
export declare namespace EndProgressAction {
const KIND = "endProgress";
function is(object: any): object is EndProgressAction;
function create(progressId: string, message?: string): EndProgressAction;
}
//# sourceMappingURL=client-notification.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServerMessageAction = exports.ServerStatusAction = void 0;
exports.EndProgressAction = exports.UpdateProgressAction = exports.StartProgressAction = exports.ServerMessageAction = exports.ServerStatusAction = void 0;
/********************************************************************************
* Copyright (c) 2021-2022 STMicroelectronics and others.
* Copyright (c) 2021-2023 STMicroelectronics and others.
*

@@ -32,3 +32,3 @@ * This program and the accompanying materials are made available under the

ServerStatusAction.create = create;
})(ServerStatusAction = exports.ServerStatusAction || (exports.ServerStatusAction = {}));
})(ServerStatusAction || (exports.ServerStatusAction = ServerStatusAction = {}));
var ServerMessageAction;

@@ -45,3 +45,43 @@ (function (ServerMessageAction) {

ServerMessageAction.create = create;
})(ServerMessageAction = exports.ServerMessageAction || (exports.ServerMessageAction = {}));
})(ServerMessageAction || (exports.ServerMessageAction = ServerMessageAction = {}));
var StartProgressAction;
(function (StartProgressAction) {
StartProgressAction.KIND = 'startProgress';
function is(object) {
return base_protocol_1.Action.hasKind(object, StartProgressAction.KIND) && (0, type_util_1.hasStringProp)(object, 'progressId') && (0, type_util_1.hasStringProp)(object, 'title');
}
StartProgressAction.is = is;
function create(options) {
return Object.assign({ kind: StartProgressAction.KIND }, options);
}
StartProgressAction.create = create;
})(StartProgressAction || (exports.StartProgressAction = StartProgressAction = {}));
var UpdateProgressAction;
(function (UpdateProgressAction) {
UpdateProgressAction.KIND = 'updateProgress';
function is(object) {
return base_protocol_1.Action.hasKind(object, UpdateProgressAction.KIND) && (0, type_util_1.hasStringProp)(object, 'progressId');
}
UpdateProgressAction.is = is;
function create(progressId, options = {}) {
return Object.assign({ kind: UpdateProgressAction.KIND, progressId }, options);
}
UpdateProgressAction.create = create;
})(UpdateProgressAction || (exports.UpdateProgressAction = UpdateProgressAction = {}));
var EndProgressAction;
(function (EndProgressAction) {
EndProgressAction.KIND = 'endProgress';
function is(object) {
return base_protocol_1.Action.hasKind(object, EndProgressAction.KIND) && (0, type_util_1.hasStringProp)(object, 'progressId');
}
EndProgressAction.is = is;
function create(progressId, message) {
return {
kind: EndProgressAction.KIND,
progressId,
message
};
}
EndProgressAction.create = create;
})(EndProgressAction || (exports.EndProgressAction = EndProgressAction = {}));
//# sourceMappingURL=client-notification.js.map

@@ -32,3 +32,3 @@ "use strict";

RequestClipboardDataAction.create = create;
})(RequestClipboardDataAction = exports.RequestClipboardDataAction || (exports.RequestClipboardDataAction = {}));
})(RequestClipboardDataAction || (exports.RequestClipboardDataAction = RequestClipboardDataAction = {}));
var SetClipboardDataAction;

@@ -45,3 +45,3 @@ (function (SetClipboardDataAction) {

SetClipboardDataAction.create = create;
})(SetClipboardDataAction = exports.SetClipboardDataAction || (exports.SetClipboardDataAction = {}));
})(SetClipboardDataAction || (exports.SetClipboardDataAction = SetClipboardDataAction = {}));
var CutOperation;

@@ -62,3 +62,3 @@ (function (CutOperation) {

CutOperation.create = create;
})(CutOperation = exports.CutOperation || (exports.CutOperation = {}));
})(CutOperation || (exports.CutOperation = CutOperation = {}));
var PasteOperation;

@@ -75,3 +75,3 @@ (function (PasteOperation) {

PasteOperation.create = create;
})(PasteOperation = exports.PasteOperation || (exports.PasteOperation = {}));
})(PasteOperation || (exports.PasteOperation = PasteOperation = {}));
//# sourceMappingURL=clipboard.js.map

@@ -32,3 +32,3 @@ "use strict";

RequestContextActions.create = create;
})(RequestContextActions = exports.RequestContextActions || (exports.RequestContextActions = {}));
})(RequestContextActions || (exports.RequestContextActions = RequestContextActions = {}));
var SetContextActions;

@@ -45,3 +45,3 @@ (function (SetContextActions) {

SetContextActions.create = create;
})(SetContextActions = exports.SetContextActions || (exports.SetContextActions = {}));
})(SetContextActions || (exports.SetContextActions = SetContextActions = {}));
//# sourceMappingURL=contexts.js.map

@@ -35,3 +35,3 @@ "use strict";

ReconnectEdgeOperation.create = create;
})(ReconnectEdgeOperation = exports.ReconnectEdgeOperation || (exports.ReconnectEdgeOperation = {}));
})(ReconnectEdgeOperation || (exports.ReconnectEdgeOperation = ReconnectEdgeOperation = {}));
var ChangeRoutingPointsOperation;

@@ -52,3 +52,3 @@ (function (ChangeRoutingPointsOperation) {

ChangeRoutingPointsOperation.create = create;
})(ChangeRoutingPointsOperation = exports.ChangeRoutingPointsOperation || (exports.ChangeRoutingPointsOperation = {}));
})(ChangeRoutingPointsOperation || (exports.ChangeRoutingPointsOperation = ChangeRoutingPointsOperation = {}));
//# sourceMappingURL=edge-modification.js.map

@@ -37,3 +37,3 @@ "use strict";

CreateOperation.hasKind = hasKind;
})(CreateOperation = exports.CreateOperation || (exports.CreateOperation = {}));
})(CreateOperation || (exports.CreateOperation = CreateOperation = {}));
var CreateNodeOperation;

@@ -50,3 +50,3 @@ (function (CreateNodeOperation) {

CreateNodeOperation.create = create;
})(CreateNodeOperation = exports.CreateNodeOperation || (exports.CreateNodeOperation = {}));
})(CreateNodeOperation || (exports.CreateNodeOperation = CreateNodeOperation = {}));
var CreateEdgeOperation;

@@ -63,3 +63,3 @@ (function (CreateEdgeOperation) {

CreateEdgeOperation.create = create;
})(CreateEdgeOperation = exports.CreateEdgeOperation || (exports.CreateEdgeOperation = {}));
})(CreateEdgeOperation || (exports.CreateEdgeOperation = CreateEdgeOperation = {}));
var DeleteElementOperation;

@@ -80,3 +80,3 @@ (function (DeleteElementOperation) {

DeleteElementOperation.create = create;
})(DeleteElementOperation = exports.DeleteElementOperation || (exports.DeleteElementOperation = {}));
})(DeleteElementOperation || (exports.DeleteElementOperation = DeleteElementOperation = {}));
//# sourceMappingURL=element-creation.js.map

@@ -17,3 +17,3 @@ "use strict";

RequestPopupModelAction.create = create;
})(RequestPopupModelAction = exports.RequestPopupModelAction || (exports.RequestPopupModelAction = {}));
})(RequestPopupModelAction || (exports.RequestPopupModelAction = RequestPopupModelAction = {}));
var SetPopupModelAction;

@@ -30,3 +30,3 @@ (function (SetPopupModelAction) {

SetPopupModelAction.create = create;
})(SetPopupModelAction = exports.SetPopupModelAction || (exports.SetPopupModelAction = {}));
})(SetPopupModelAction || (exports.SetPopupModelAction = SetPopupModelAction = {}));
//# sourceMappingURL=element-hover.js.map

@@ -112,3 +112,3 @@ "use strict";

NavigationTarget.getTextPosition = getTextPosition;
})(NavigationTarget = exports.NavigationTarget || (exports.NavigationTarget = {}));
})(NavigationTarget || (exports.NavigationTarget = NavigationTarget = {}));
var RequestNavigationTargetsAction;

@@ -125,3 +125,3 @@ (function (RequestNavigationTargetsAction) {

RequestNavigationTargetsAction.create = create;
})(RequestNavigationTargetsAction = exports.RequestNavigationTargetsAction || (exports.RequestNavigationTargetsAction = {}));
})(RequestNavigationTargetsAction || (exports.RequestNavigationTargetsAction = RequestNavigationTargetsAction = {}));
var SetNavigationTargetsAction;

@@ -138,3 +138,3 @@ (function (SetNavigationTargetsAction) {

SetNavigationTargetsAction.create = create;
})(SetNavigationTargetsAction = exports.SetNavigationTargetsAction || (exports.SetNavigationTargetsAction = {}));
})(SetNavigationTargetsAction || (exports.SetNavigationTargetsAction = SetNavigationTargetsAction = {}));
var NavigateToTargetAction;

@@ -154,3 +154,3 @@ (function (NavigateToTargetAction) {

NavigateToTargetAction.create = create;
})(NavigateToTargetAction = exports.NavigateToTargetAction || (exports.NavigateToTargetAction = {}));
})(NavigateToTargetAction || (exports.NavigateToTargetAction = NavigateToTargetAction = {}));
var ResolveNavigationTargetAction;

@@ -167,3 +167,3 @@ (function (ResolveNavigationTargetAction) {

ResolveNavigationTargetAction.create = create;
})(ResolveNavigationTargetAction = exports.ResolveNavigationTargetAction || (exports.ResolveNavigationTargetAction = {}));
})(ResolveNavigationTargetAction || (exports.ResolveNavigationTargetAction = ResolveNavigationTargetAction = {}));
var SetResolvedNavigationTargetAction;

@@ -180,3 +180,3 @@ (function (SetResolvedNavigationTargetAction) {

SetResolvedNavigationTargetAction.create = create;
})(SetResolvedNavigationTargetAction = exports.SetResolvedNavigationTargetAction || (exports.SetResolvedNavigationTargetAction = {}));
})(SetResolvedNavigationTargetAction || (exports.SetResolvedNavigationTargetAction = SetResolvedNavigationTargetAction = {}));
var NavigateToExternalTargetAction;

@@ -196,3 +196,3 @@ (function (NavigateToExternalTargetAction) {

NavigateToExternalTargetAction.create = create;
})(NavigateToExternalTargetAction = exports.NavigateToExternalTargetAction || (exports.NavigateToExternalTargetAction = {}));
})(NavigateToExternalTargetAction || (exports.NavigateToExternalTargetAction = NavigateToExternalTargetAction = {}));
//# sourceMappingURL=element-navigation.js.map

@@ -37,3 +37,3 @@ "use strict";

SelectAction.setSelection = setSelection;
})(SelectAction = exports.SelectAction || (exports.SelectAction = {}));
})(SelectAction || (exports.SelectAction = SelectAction = {}));
var SelectAllAction;

@@ -53,3 +53,3 @@ (function (SelectAllAction) {

SelectAllAction.create = create;
})(SelectAllAction = exports.SelectAllAction || (exports.SelectAllAction = {}));
})(SelectAllAction || (exports.SelectAllAction = SelectAllAction = {}));
//# sourceMappingURL=element-selection.js.map

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

RequestEditValidationAction.create = create;
})(RequestEditValidationAction = exports.RequestEditValidationAction || (exports.RequestEditValidationAction = {}));
})(RequestEditValidationAction || (exports.RequestEditValidationAction = RequestEditValidationAction = {}));
var SetEditValidationResultAction;

@@ -33,3 +33,3 @@ (function (SetEditValidationResultAction) {

SetEditValidationResultAction.create = create;
})(SetEditValidationResultAction = exports.SetEditValidationResultAction || (exports.SetEditValidationResultAction = {}));
})(SetEditValidationResultAction || (exports.SetEditValidationResultAction = SetEditValidationResultAction = {}));
var ApplyLabelEditOperation;

@@ -46,3 +46,3 @@ (function (ApplyLabelEditOperation) {

ApplyLabelEditOperation.create = create;
})(ApplyLabelEditOperation = exports.ApplyLabelEditOperation || (exports.ApplyLabelEditOperation = {}));
})(ApplyLabelEditOperation || (exports.ApplyLabelEditOperation = ApplyLabelEditOperation = {}));
var ValidationStatus;

@@ -102,3 +102,3 @@ (function (ValidationStatus) {

ValidationStatus.isError = isError;
})(ValidationStatus = exports.ValidationStatus || (exports.ValidationStatus = {}));
})(ValidationStatus || (exports.ValidationStatus = ValidationStatus = {}));
//# sourceMappingURL=element-text-editing.js.map

@@ -32,3 +32,3 @@ "use strict";

RequestTypeHintsAction.create = create;
})(RequestTypeHintsAction = exports.RequestTypeHintsAction || (exports.RequestTypeHintsAction = {}));
})(RequestTypeHintsAction || (exports.RequestTypeHintsAction = RequestTypeHintsAction = {}));
var SetTypeHintsAction;

@@ -45,3 +45,3 @@ (function (SetTypeHintsAction) {

SetTypeHintsAction.create = create;
})(SetTypeHintsAction = exports.SetTypeHintsAction || (exports.SetTypeHintsAction = {}));
})(SetTypeHintsAction || (exports.SetTypeHintsAction = SetTypeHintsAction = {}));
//# sourceMappingURL=element-type-hints.js.map

@@ -29,3 +29,3 @@ "use strict";

MarkerKind.ERROR = 'error';
})(MarkerKind = exports.MarkerKind || (exports.MarkerKind = {}));
})(MarkerKind || (exports.MarkerKind = MarkerKind = {}));
/**

@@ -40,3 +40,3 @@ * The default reasons for markers.

MarkersReason.LIVE = 'live';
})(MarkersReason = exports.MarkersReason || (exports.MarkersReason = {}));
})(MarkersReason || (exports.MarkersReason = MarkersReason = {}));
var RequestMarkersAction;

@@ -53,3 +53,3 @@ (function (RequestMarkersAction) {

RequestMarkersAction.create = create;
})(RequestMarkersAction = exports.RequestMarkersAction || (exports.RequestMarkersAction = {}));
})(RequestMarkersAction || (exports.RequestMarkersAction = RequestMarkersAction = {}));
var SetMarkersAction;

@@ -66,3 +66,3 @@ (function (SetMarkersAction) {

SetMarkersAction.create = create;
})(SetMarkersAction = exports.SetMarkersAction || (exports.SetMarkersAction = {}));
})(SetMarkersAction || (exports.SetMarkersAction = SetMarkersAction = {}));
var DeleteMarkersAction;

@@ -82,3 +82,3 @@ (function (DeleteMarkersAction) {

DeleteMarkersAction.create = create;
})(DeleteMarkersAction = exports.DeleteMarkersAction || (exports.DeleteMarkersAction = {}));
})(DeleteMarkersAction || (exports.DeleteMarkersAction = DeleteMarkersAction = {}));
//# sourceMappingURL=element-validation.js.map

@@ -17,3 +17,3 @@ "use strict";

RequestModelAction.create = create;
})(RequestModelAction = exports.RequestModelAction || (exports.RequestModelAction = {}));
})(RequestModelAction || (exports.RequestModelAction = RequestModelAction = {}));
var SetModelAction;

@@ -30,3 +30,3 @@ (function (SetModelAction) {

SetModelAction.create = create;
})(SetModelAction = exports.SetModelAction || (exports.SetModelAction = {}));
})(SetModelAction || (exports.SetModelAction = SetModelAction = {}));
var UpdateModelAction;

@@ -43,3 +43,3 @@ (function (UpdateModelAction) {

UpdateModelAction.create = create;
})(UpdateModelAction = exports.UpdateModelAction || (exports.UpdateModelAction = {}));
})(UpdateModelAction || (exports.UpdateModelAction = UpdateModelAction = {}));
var SourceModelChangedAction;

@@ -59,3 +59,3 @@ (function (SourceModelChangedAction) {

SourceModelChangedAction.create = create;
})(SourceModelChangedAction = exports.SourceModelChangedAction || (exports.SourceModelChangedAction = {}));
})(SourceModelChangedAction || (exports.SourceModelChangedAction = SourceModelChangedAction = {}));
//# sourceMappingURL=model-data.js.map

@@ -35,3 +35,3 @@ "use strict";

SetEditModeAction.create = create;
})(SetEditModeAction = exports.SetEditModeAction || (exports.SetEditModeAction = {}));
})(SetEditModeAction || (exports.SetEditModeAction = SetEditModeAction = {}));
/**

@@ -44,3 +44,3 @@ * The potential default values for the `editMode` property of a {@link SetEditModeAction}.

EditMode.EDITABLE = 'editable';
})(EditMode = exports.EditMode || (exports.EditMode = {}));
})(EditMode || (exports.EditMode = EditMode = {}));
//# sourceMappingURL=model-edit-mode.js.map

@@ -17,3 +17,3 @@ "use strict";

RequestBoundsAction.create = create;
})(RequestBoundsAction = exports.RequestBoundsAction || (exports.RequestBoundsAction = {}));
})(RequestBoundsAction || (exports.RequestBoundsAction = RequestBoundsAction = {}));
var ComputedBoundsAction;

@@ -30,3 +30,3 @@ (function (ComputedBoundsAction) {

ComputedBoundsAction.create = create;
})(ComputedBoundsAction = exports.ComputedBoundsAction || (exports.ComputedBoundsAction = {}));
})(ComputedBoundsAction || (exports.ComputedBoundsAction = ComputedBoundsAction = {}));
var LayoutOperation;

@@ -47,3 +47,3 @@ (function (LayoutOperation) {

LayoutOperation.create = create;
})(LayoutOperation = exports.LayoutOperation || (exports.LayoutOperation = {}));
})(LayoutOperation || (exports.LayoutOperation = LayoutOperation = {}));
//# sourceMappingURL=model-layout.js.map

@@ -32,3 +32,3 @@ "use strict";

SaveModelAction.create = create;
})(SaveModelAction = exports.SaveModelAction || (exports.SaveModelAction = {}));
})(SaveModelAction || (exports.SaveModelAction = SaveModelAction = {}));
var SetDirtyStateAction;

@@ -45,3 +45,3 @@ (function (SetDirtyStateAction) {

SetDirtyStateAction.create = create;
})(SetDirtyStateAction = exports.SetDirtyStateAction || (exports.SetDirtyStateAction = {}));
})(SetDirtyStateAction || (exports.SetDirtyStateAction = SetDirtyStateAction = {}));
var RequestExportSvgAction;

@@ -58,3 +58,3 @@ (function (RequestExportSvgAction) {

RequestExportSvgAction.create = create;
})(RequestExportSvgAction = exports.RequestExportSvgAction || (exports.RequestExportSvgAction = {}));
})(RequestExportSvgAction || (exports.RequestExportSvgAction = RequestExportSvgAction = {}));
var ExportSvgAction;

@@ -71,3 +71,3 @@ (function (ExportSvgAction) {

ExportSvgAction.create = create;
})(ExportSvgAction = exports.ExportSvgAction || (exports.ExportSvgAction = {}));
})(ExportSvgAction || (exports.ExportSvgAction = ExportSvgAction = {}));
//# sourceMappingURL=model-saving.js.map

@@ -16,3 +16,3 @@ "use strict";

SModelElementSchema.is = is;
})(SModelElementSchema = exports.SModelElementSchema || (exports.SModelElementSchema = {}));
})(SModelElementSchema || (exports.SModelElementSchema = SModelElementSchema = {}));
//# sourceMappingURL=model-structure.js.map

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

ChangeBoundsOperation.create = create;
})(ChangeBoundsOperation = exports.ChangeBoundsOperation || (exports.ChangeBoundsOperation = {}));
})(ChangeBoundsOperation || (exports.ChangeBoundsOperation = ChangeBoundsOperation = {}));
var ChangeContainerOperation;

@@ -49,3 +49,3 @@ (function (ChangeContainerOperation) {

ChangeContainerOperation.create = create;
})(ChangeContainerOperation = exports.ChangeContainerOperation || (exports.ChangeContainerOperation = {}));
})(ChangeContainerOperation || (exports.ChangeContainerOperation = ChangeContainerOperation = {}));
//# sourceMappingURL=node-modification.js.map

@@ -32,3 +32,3 @@ "use strict";

TriggerNodeCreationAction.create = create;
})(TriggerNodeCreationAction = exports.TriggerNodeCreationAction || (exports.TriggerNodeCreationAction = {}));
})(TriggerNodeCreationAction || (exports.TriggerNodeCreationAction = TriggerNodeCreationAction = {}));
var TriggerEdgeCreationAction;

@@ -45,3 +45,3 @@ (function (TriggerEdgeCreationAction) {

TriggerEdgeCreationAction.create = create;
})(TriggerEdgeCreationAction = exports.TriggerEdgeCreationAction || (exports.TriggerEdgeCreationAction = {}));
})(TriggerEdgeCreationAction || (exports.TriggerEdgeCreationAction = TriggerEdgeCreationAction = {}));
//# sourceMappingURL=tool-palette.js.map

@@ -12,3 +12,3 @@ "use strict";

EditorContext.is = is;
})(EditorContext = exports.EditorContext || (exports.EditorContext = {}));
})(EditorContext || (exports.EditorContext = EditorContext = {}));
var LabeledAction;

@@ -30,3 +30,3 @@ (function (LabeledAction) {

LabeledAction.toActionArray = toActionArray;
})(LabeledAction = exports.LabeledAction || (exports.LabeledAction = {}));
})(LabeledAction || (exports.LabeledAction = LabeledAction = {}));
var PaletteItem;

@@ -52,3 +52,3 @@ (function (PaletteItem) {

PaletteItem.isTriggerElementCreationAction = isTriggerElementCreationAction;
})(PaletteItem = exports.PaletteItem || (exports.PaletteItem = {}));
})(PaletteItem || (exports.PaletteItem = PaletteItem = {}));
var MenuItem;

@@ -60,3 +60,3 @@ (function (MenuItem) {

MenuItem.is = is;
})(MenuItem = exports.MenuItem || (exports.MenuItem = {}));
})(MenuItem || (exports.MenuItem = MenuItem = {}));
//# sourceMappingURL=types.js.map

@@ -33,3 +33,3 @@ "use strict";

UndoAction.create = create;
})(UndoAction = exports.UndoAction || (exports.UndoAction = {}));
})(UndoAction || (exports.UndoAction = UndoAction = {}));
var RedoAction;

@@ -48,3 +48,3 @@ (function (RedoAction) {

RedoAction.create = create;
})(RedoAction = exports.RedoAction || (exports.RedoAction = {}));
})(RedoAction || (exports.RedoAction = RedoAction = {}));
//# sourceMappingURL=undo-redo.js.map

@@ -17,3 +17,3 @@ "use strict";

CenterAction.create = create;
})(CenterAction = exports.CenterAction || (exports.CenterAction = {}));
})(CenterAction || (exports.CenterAction = CenterAction = {}));
var FitToScreenAction;

@@ -30,3 +30,3 @@ (function (FitToScreenAction) {

FitToScreenAction.create = create;
})(FitToScreenAction = exports.FitToScreenAction || (exports.FitToScreenAction = {}));
})(FitToScreenAction || (exports.FitToScreenAction = FitToScreenAction = {}));
//# sourceMappingURL=viewport.js.map
import { ActionMessage } from '../action-protocol';
import { Disposable } from '../disposable/disposable';
import { Disposable } from '../utils/disposable';
import { DisposeClientSessionParameters, InitializeClientSessionParameters, InitializeParameters, InitializeResult } from './types';

@@ -4,0 +4,0 @@ export declare class ApplicationIdProvider {

@@ -59,3 +59,3 @@ "use strict";

ClientState[ClientState["ServerError"] = 6] = "ServerError";
})(ClientState = exports.ClientState || (exports.ClientState = {}));
})(ClientState || (exports.ClientState = ClientState = {}));
var GLSPClient;

@@ -69,3 +69,3 @@ (function (GLSPClient) {

GLSPClient.protocolVersion = '1.0.0';
})(GLSPClient = exports.GLSPClient || (exports.GLSPClient = {}));
})(GLSPClient || (exports.GLSPClient = GLSPClient = {}));
//# sourceMappingURL=glsp-client.js.map

@@ -138,3 +138,3 @@ "use strict";

*/
let JsonrpcClientProxy = class JsonrpcClientProxy {
let JsonrpcClientProxy = exports.JsonrpcClientProxy = class JsonrpcClientProxy {
initialize(clientConnection, enableLogging = false) {

@@ -152,6 +152,5 @@ this.clientConnection = clientConnection;

};
JsonrpcClientProxy = __decorate([
exports.JsonrpcClientProxy = JsonrpcClientProxy = __decorate([
(0, inversify_1.injectable)()
], JsonrpcClientProxy);
exports.JsonrpcClientProxy = JsonrpcClientProxy;
//# sourceMappingURL=base-jsonrpc-glsp-client.js.map

@@ -38,3 +38,3 @@ "use strict";

JsonrpcGLSPClient.error = error;
})(JsonrpcGLSPClient = exports.JsonrpcGLSPClient || (exports.JsonrpcGLSPClient = {}));
})(JsonrpcGLSPClient || (exports.JsonrpcGLSPClient = JsonrpcGLSPClient = {}));
//# sourceMappingURL=glsp-jsonrpc-client.js.map

@@ -39,3 +39,2 @@ /********************************************************************************

export * from './client-server-protocol/types';
export * from './disposable/disposable';
export * from './model/default-types';

@@ -45,4 +44,6 @@ export * from './model/model-schema';

export * from './utils/di-util';
export * from './utils/disposable';
export * from './utils/event';
export * from './utils/type-util';
export { SetBoundsAction, SetViewportAction };
//# sourceMappingURL=index.d.ts.map

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

__exportStar(require("./client-server-protocol/types"), exports);
__exportStar(require("./disposable/disposable"), exports);
__exportStar(require("./model/default-types"), exports);

@@ -63,3 +62,5 @@ __exportStar(require("./model/model-schema"), exports);

__exportStar(require("./utils/di-util"), exports);
__exportStar(require("./utils/disposable"), exports);
__exportStar(require("./utils/event"), exports);
__exportStar(require("./utils/type-util"), exports);
//# sourceMappingURL=index.js.map

@@ -50,3 +50,3 @@ "use strict";

DefaultTypes.NODE_DIAMOND = 'node:diamond';
})(DefaultTypes = exports.DefaultTypes || (exports.DefaultTypes = {}));
})(DefaultTypes || (exports.DefaultTypes = DefaultTypes = {}));
//# sourceMappingURL=default-types.js.map

@@ -59,2 +59,7 @@ /********************************************************************************

/**
* Utility type that represents an arbitrary function. Should be used instead
* of the default `Function` type which is considered to be unsafe.
*/
export type SafeFunction<T = any> = (...args: any[]) => T;
/**
* Validates whether the given object has a property of type `string` with the given key.

@@ -61,0 +66,0 @@ * @param object The object that should be validated

@@ -31,3 +31,3 @@ "use strict";

AnyObject.is = is;
})(AnyObject = exports.AnyObject || (exports.AnyObject = {}));
})(AnyObject || (exports.AnyObject = AnyObject = {}));
/**

@@ -34,0 +34,0 @@ * Utility function that create a typeguard function for a given class constructor.

{
"name": "@eclipse-glsp/protocol",
"version": "1.1.0-next.698b9de.254+698b9de",
"version": "1.1.0-next.69a77b0.259+69a77b0",
"description": "The protocol definition for client-server communication in GLSP",

@@ -62,3 +62,3 @@ "keywords": [

},
"gitHead": "698b9de3c249e10b84941f97845b39799e54353f"
"gitHead": "69a77b0a4fe486b4f1ceb470a2f850ff21eaab3a"
}
/********************************************************************************
* Copyright (c) 2022 STMicroelectronics and others.
* Copyright (c) 2022-2023 STMicroelectronics and others.
*

@@ -18,3 +18,9 @@ * This program and the accompanying materials are made available under the

import { expect } from 'chai';
import { ServerMessageAction, ServerStatusAction } from './client-notification';
import {
EndProgressAction,
ServerMessageAction,
ServerStatusAction,
StartProgressAction,
UpdateProgressAction
} from './client-notification';
/**

@@ -83,10 +89,109 @@ * Tests for the utility functions declared in the namespaces of the protocol

details: 'details',
severity: 'ERROR',
timeout: 5
severity: 'ERROR'
};
const { message, severity, timeout, details } = expected;
expect(ServerMessageAction.create(message, { severity, timeout, details })).to.deep.equals(expected);
const { message, severity, details } = expected;
expect(ServerMessageAction.create(message, { severity, details })).to.deep.equals(expected);
});
});
});
describe('StartProgressAction', () => {
describe('is', () => {
it('should return true for an object having the correct type and a value for all required interface properties', () => {
const messageAction: StartProgressAction = { kind: 'startProgress', progressId: '1', title: 'Progress title' };
expect(StartProgressAction.is(messageAction)).to.be.true;
});
it('should return false for `undefined`', () => {
expect(StartProgressAction.is(undefined)).to.be.false;
});
it('should return false for an object that does not have all required interface properties', () => {
expect(StartProgressAction.is({ kind: 'notTheRightOne' })).to.be.false;
});
});
describe('create', () => {
it('should return an object conforming to the interface with matching properties for the given required arguments and default values for the optional arguments', () => {
const progressId = '1';
const title = 'Progress title';
const expected: StartProgressAction = { kind: StartProgressAction.KIND, progressId, title };
expect(StartProgressAction.create({ progressId, title })).to.deep.equals(expected);
});
it('should return an object conforming to the interface with matching properties for the given required and optional arguments', () => {
const expected: StartProgressAction = {
kind: StartProgressAction.KIND,
progressId: '1',
title: 'Progress title',
message: 'Some message',
percentage: 10
};
const { progressId, title, message, percentage } = expected;
expect(StartProgressAction.create({ progressId, title, message, percentage })).to.deep.equals(expected);
});
});
});
describe('UpdateProgressAction', () => {
describe('is', () => {
it('should return true for an object having the correct type and a value for all required interface properties', () => {
const messageAction: UpdateProgressAction = { kind: 'updateProgress', progressId: '1' };
expect(UpdateProgressAction.is(messageAction)).to.be.true;
});
it('should return false for `undefined`', () => {
expect(UpdateProgressAction.is(undefined)).to.be.false;
});
it('should return false for an object that does not have all required interface properties', () => {
expect(UpdateProgressAction.is({ kind: 'notTheRightOne' })).to.be.false;
});
});
describe('create', () => {
it('should return an object conforming to the interface with matching properties for the given required arguments and default values for the optional arguments', () => {
const progressId = '1';
const expected: UpdateProgressAction = { kind: UpdateProgressAction.KIND, progressId };
expect(UpdateProgressAction.create(progressId)).to.deep.equals(expected);
});
it('should return an object conforming to the interface with matching properties for the given required and optional arguments', () => {
const expected: UpdateProgressAction = {
kind: UpdateProgressAction.KIND,
progressId: '1',
message: 'Some message',
percentage: 10
};
const { progressId, message, percentage } = expected;
expect(UpdateProgressAction.create(progressId, { message, percentage })).to.deep.equals(expected);
});
});
});
describe('EndProgressAction', () => {
describe('is', () => {
it('should return true for an object having the correct type and a value for all required interface properties', () => {
const messageAction: EndProgressAction = { kind: 'endProgress', progressId: '1' };
expect(EndProgressAction.is(messageAction)).to.be.true;
});
it('should return false for `undefined`', () => {
expect(EndProgressAction.is(undefined)).to.be.false;
});
it('should return false for an object that does not have all required interface properties', () => {
expect(EndProgressAction.is({ kind: 'notTheRightOne' })).to.be.false;
});
});
describe('create', () => {
it('should return an object conforming to the interface with matching properties for the given required arguments and default values for the optional arguments', () => {
const progressId = '1';
const expected: EndProgressAction = { kind: EndProgressAction.KIND, progressId, message: undefined };
expect(EndProgressAction.create(progressId)).to.deep.equals(expected);
});
it('should return an object conforming to the interface with matching properties for the given required and optional arguments', () => {
const expected: EndProgressAction = {
kind: EndProgressAction.KIND,
progressId: '1',
message: 'Some message'
};
const { progressId, message } = expected;
expect(EndProgressAction.create(progressId, message)).to.deep.equals(expected);
});
});
});
});
/********************************************************************************
* Copyright (c) 2021-2022 STMicroelectronics and others.
* Copyright (c) 2021-2023 STMicroelectronics and others.
*

@@ -87,7 +87,2 @@ * This program and the accompanying materials are made available under the

details?: string;
/**
* Timeout after which a displayed message disappears.
*/
timeout?: number;
}

@@ -107,3 +102,2 @@

details?: string;
timeout?: number;
} = {}

@@ -119,1 +113,114 @@ ): ServerMessageAction {

}
/**
* Sent by the server to the client to request presenting the progress of a long running process in the UI.
*/
export interface StartProgressAction extends Action {
kind: typeof StartProgressAction.KIND;
/**
* An ID that can be used in subsequent `updateProgress` and `endProgress` events to make them refer to the same progress reporting.
*/
progressId: string;
/**
* Short title of the progress reporting. Shown in the UI to describe the long running process.
*/
title: string;
/**
* Optional additional progress message. Shown in the UI to describe the long running process.
*/
message?: string;
/**
* Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown.
*/
percentage?: number;
}
export namespace StartProgressAction {
export const KIND = 'startProgress';
export function is(object: any): object is StartProgressAction {
return Action.hasKind(object, KIND) && hasStringProp(object, 'progressId') && hasStringProp(object, 'title');
}
export function create(options: { progressId: string; title: string; message?: string; percentage?: number }): StartProgressAction {
return {
kind: KIND,
...options
};
}
}
/**
* Sent by the server to the client to presenting an update of the progress of a long running process in the UI.
*/
export interface UpdateProgressAction extends Action {
kind: typeof UpdateProgressAction.KIND;
/**
* The ID of the progress reporting to update.
*/
progressId: string;
/**
* The message to show in the progress reporting.
*/
message?: string;
/**
* The percentage (value range: 0 to 100) to show in the progress reporting.
*/
percentage?: number;
}
export namespace UpdateProgressAction {
export const KIND = 'updateProgress';
export function is(object: any): object is UpdateProgressAction {
return Action.hasKind(object, KIND) && hasStringProp(object, 'progressId');
}
export function create(
progressId: string,
options: {
message?: string;
percentage?: number;
} = {}
): UpdateProgressAction {
return {
kind: KIND,
progressId,
...options
};
}
}
/**
* Sent by the server to the client to end the reporting of a progress.
*/
export interface EndProgressAction extends Action {
kind: typeof EndProgressAction.KIND;
/**
* The ID of the progress reporting to update.
*/
progressId: string;
/**
* The message to show in the progress reporting.
*/
message?: string;
}
export namespace EndProgressAction {
export const KIND = 'endProgress';
export function is(object: any): object is EndProgressAction {
return Action.hasKind(object, KIND) && hasStringProp(object, 'progressId');
}
export function create(progressId: string, message?: string): EndProgressAction {
return {
kind: KIND,
progressId,
message
};
}
}

@@ -19,3 +19,3 @@ /********************************************************************************

import { ActionMessage } from '../action-protocol';
import { Disposable } from '../disposable/disposable';
import { Disposable } from '../utils/disposable';
import { DisposeClientSessionParameters, InitializeClientSessionParameters, InitializeParameters, InitializeResult } from './types';

@@ -22,0 +22,0 @@

@@ -58,3 +58,2 @@ /********************************************************************************

export * from './client-server-protocol/types';
export * from './disposable/disposable';
export * from './model/default-types';

@@ -64,3 +63,5 @@ export * from './model/model-schema';

export * from './utils/di-util';
export * from './utils/disposable';
export * from './utils/event';
export * from './utils/type-util';
export { SetBoundsAction, SetViewportAction };

@@ -72,2 +72,8 @@ /********************************************************************************

/**
* Utility type that represents an arbitrary function. Should be used instead
* of the default `Function` type which is considered to be unsafe.
*/
export type SafeFunction<T = any> = (...args: any[]) => T;
/**
* Validates whether the given object has a property of type `string` with the given key.

@@ -74,0 +80,0 @@ * @param object The object that should be validated

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

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

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

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