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

@eclipse-emfcloud/modelserver-client

Package Overview
Dependencies
Maintainers
8
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eclipse-emfcloud/modelserver-client - npm Package Compare versions

Comparing version 0.8.0-next.453f51a.81 to 0.8.0-next.46ba3ca.93

lib/utils/index.d.ts

6

lib/model-server-client-api-v2.d.ts

@@ -33,5 +33,5 @@ /********************************************************************************

/** JSON formats supported by the V2 client API. */
export declare type JsonFormat = 'json' | 'json-v2';
export type JsonFormat = 'json' | 'json-v2';
/** Message formats supported by the V2 client API. */
export declare type Format = string;
export type Format = string;
/**

@@ -58,3 +58,3 @@ * Additional subscription options supported by API v2 model subscriptions.

*/
export declare type PatchOrCommand = Operation | Operation[] | ModelPatch | ModelPatch[] | ModelServerCommand;
export type PatchOrCommand = Operation | Operation[] | ModelPatch | ModelPatch[] | ModelServerCommand;
/**

@@ -61,0 +61,0 @@ * Basic client API to interact with a model server that conforms to the Modelserver API Version 2.

/********************************************************************************
* Copyright (c) 2022 STMicroelectronics and others.
* Copyright (c) 2022-2023 STMicroelectronics and others.
*

@@ -4,0 +4,0 @@ * This program and the accompanying materials are made available under the

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

/********************************************************************************
* Copyright (c) 2022 STMicroelectronics and others.
* Copyright (c) 2022-2023 STMicroelectronics and others.
*

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

catch (error) {
if (isAxiosError(error)) {
if (axios_1.default.isAxiosError(error)) {
const message = ((_a = error.response) === null || _a === void 0 ? void 0 : _a.data) ? error.response.data : error.message;

@@ -271,5 +271,2 @@ throw new model_server_client_api_v1_1.ModelServerError(message, error.code);

exports.ModelServerClientV2 = ModelServerClientV2;
function isAxiosError(error) {
return error !== undefined && error instanceof Error && 'isAxiosError' in error && error['isAxiosError'];
}
function mapModel(model, guard, toString = false) {

@@ -276,0 +273,0 @@ const { modeluri, content } = model;

/********************************************************************************
* Copyright (c) 2021-2022 STMicroelectronics and others.
* Copyright (c) 2021-2023 STMicroelectronics and others.
*

@@ -4,0 +4,0 @@ * This program and the accompanying materials are made available under the

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

/********************************************************************************
* Copyright (c) 2021-2022 STMicroelectronics and others.
* Copyright (c) 2021-2023 STMicroelectronics and others.
*

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

catch (error) {
if (isAxiosError(error)) {
if (axios_1.default.isAxiosError(error)) {
const message = ((_a = error.response) === null || _a === void 0 ? void 0 : _a.data) ? error.response.data : error.message;

@@ -231,5 +231,2 @@ throw new model_server_client_api_v1_1.ModelServerError(message, error.code);

exports.ModelServerClient = ModelServerClient;
function isAxiosError(error) {
return error !== undefined && error instanceof Error && 'isAxiosError' in error && error['isAxiosError'];
}
/**

@@ -236,0 +233,0 @@ * Creates a modelserver message data mapper that maps the response either to a generic JSON object, a specific typed object or string.

@@ -71,3 +71,3 @@ import URI from 'urijs';

*/
export declare type Mapper<M, D = unknown> = (message: M) => D;
export type Mapper<M, D = unknown> = (message: M) => D;
/**

@@ -80,3 +80,3 @@ * A Mapper which directly returns the message.

*/
export declare type MessageDataMapper<D = unknown> = (message: ModelServerMessage) => D;
export type MessageDataMapper<D = unknown> = (message: ModelServerMessage) => D;
/**

@@ -83,0 +83,0 @@ * A collection of utility functions to map the `data` property of a {@link ModelServerMessage} to a specific type.

@@ -118,3 +118,3 @@ /********************************************************************************

*/
export declare type UnknownNotification = ModelServerNotification & ModelServerMessage;
export type UnknownNotification = ModelServerNotification & ModelServerMessage;
export declare namespace UnknownNotification {

@@ -121,0 +121,0 @@ function is(object?: unknown): object is UnknownNotification;

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

export declare type DataValueType = boolean | number | string;
export type DataValueType = boolean | number | string;
export declare class ModelServerObject {

@@ -3,0 +3,0 @@ readonly eClass: string;

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

*/
export declare type AnyObject = Record<PropertyKey, unknown>;
export type AnyObject = Record<PropertyKey, unknown>;
export declare namespace AnyObject {

@@ -34,3 +34,3 @@ /**

*/
export declare type TypeGuard<T> = (object: unknown) => object is T;
export type TypeGuard<T> = (object: unknown) => object is T;
/**

@@ -120,3 +120,3 @@ * Validates whether the given object as a property of type `string` with the given key.

/** Protocol of a message encoder. */
export declare type Encoder<T = unknown> = (object: string | AnyObject) => T | string;
export type Encoder<T = unknown> = (object: string | AnyObject) => T | string;
/**

@@ -123,0 +123,0 @@ * Obtain a message encoder for the request body.

@@ -17,3 +17,3 @@ {

"bugs": "https://github.com/eclipse-emfcloud/emfcloud-modelserver-theia/issues",
"version": "0.8.0-next.453f51a.81+453f51a",
"version": "0.8.0-next.46ba3ca.93+46ba3ca",
"files": [

@@ -49,3 +49,3 @@ "lib",

"urijs": "^1.19.11",
"ws": "^7.4.6"
"ws": "^7.1.2"
},

@@ -70,3 +70,3 @@ "devDependencies": {

},
"gitHead": "453f51a2e6fb4418e22e34aa8998c3def763c038"
"gitHead": "46ba3caacf87f014c12e9886bd1eda5f74ae10c5"
}
/********************************************************************************
* Copyright (c) 2022 STMicroelectronics and others.
* Copyright (c) 2022-2023 STMicroelectronics and others.
*

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

*******************************************************************************/
import axios, { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
import { deepClone } from 'fast-json-patch';

@@ -348,3 +348,3 @@ import WebSocket from 'isomorphic-ws';

} catch (error) {
if (isAxiosError(error)) {
if (axios.isAxiosError(error)) {
const message = error.response?.data ? error.response.data : error.message;

@@ -359,6 +359,2 @@ throw new ModelServerError(message, error.code);

function isAxiosError(error: any): error is AxiosError {
return error !== undefined && error instanceof Error && 'isAxiosError' in error && error['isAxiosError'];
}
/**

@@ -365,0 +361,0 @@ * Helper type for method overloads where on parameter could either be

/********************************************************************************
* Copyright (c) 2021-2022 STMicroelectronics and others.
* Copyright (c) 2021-2023 STMicroelectronics and others.
*

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

*******************************************************************************/
import axios, { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
import WebSocket from 'isomorphic-ws';

@@ -270,3 +270,3 @@ import URI from 'urijs';

} catch (error) {
if (isAxiosError(error)) {
if (axios.isAxiosError(error)) {
const message = error.response?.data ? error.response.data : error.message;

@@ -281,6 +281,2 @@ throw new ModelServerError(message, error.code);

function isAxiosError(error: any): error is AxiosError {
return error !== undefined && error instanceof Error && 'isAxiosError' in error && error['isAxiosError'];
}
/**

@@ -287,0 +283,0 @@ * Helper type for method overloads where on parameter could either be

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