
Research
/Security News
Shai Hulud Strikes Again (v2)
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.
@eclipse-emfcloud/modelserver-markers-theia
Advanced tools
The model server client API provides validation methods which manipulate JSON objects which can be cast as Diagnostic objects (@eclipse-emfcloud/modelserver-theia/lib/browser/diagnostic).
export interface ModelServerClient extends JsonRpcServer<ModelServerFrontendClient> {
validation(modeluri: URI): Promise<Response<string>>;
// WebSocket connection
subscribeWithValidation(modeluri: URI): void;
}
Users may want to log these validation diagnostics in Theia's Problems view (provided by @theia/markers).
This module provides the necessary tools to achieve this purpose with minimalist code.
After calling the validation, you can create markers as simply as :
@inject(MessageService) protected readonly messageService: MessageService;
@inject(DiagnosticManager) protected readonly diagnosticManager: DiagnosticManager;
const modelURI : URI;
// perform validation
this.modelServerClient.validation(modelURI.toString())
.then((response: Response<any>) => {
// get resulting diagnostic
const diagnostic = response.body as Diagnostic;
// print markers in Problems view
diagnosticManager.setDiagnostic(modelURI, diagnostic);
// display the validation status
this.messageService.info(`Validation finished with level ${Diagnostic.getSeverityLabel(diagnostic)}.`)
});
The marker in the problems view can be used to navigate to the precise element in error.
As this navigation depends on your model editor implementation, you must implement the OpenHandler interface if you want this functionality (see @theia/core/lib/browser/opener-service.ts).
In the opener options, you will find a selection entry, which value can be cast as a ModelElementRange, containing fake start and end values, but the correct model element's URI fragment (identifier) at the uriFragment key.
It is up to your widget implementation to select the correct element corresponding to this URI fragment.
FAQs
## Use case
The npm package @eclipse-emfcloud/modelserver-markers-theia receives a total of 60 weekly downloads. As such, @eclipse-emfcloud/modelserver-markers-theia popularity was classified as not popular.
We found that @eclipse-emfcloud/modelserver-markers-theia demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.