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

@sap/wing-service-explorer

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap/wing-service-explorer - npm Package Compare versions

Comparing version 1.6.10 to 1.7.2

dist/lib/apiHubExplorer.js.map

1

dist/lib/apiHubExplorer.js

@@ -138,1 +138,2 @@ "use strict";

APIHubExplorer.API_MGMT_API_KEY_URL = "/api/1.0/apikey/self?userConsent=true";
//# sourceMappingURL=apiHubExplorer.js.map

@@ -209,1 +209,2 @@ "use strict";

CatalogExplorer.ODATA_CATALOG_SERVICE_TITLE = "Title";
//# sourceMappingURL=catalogExplorer.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=connectionDetails.js.map

@@ -28,1 +28,2 @@ "use strict";

};
//# sourceMappingURL=defaultLogger.js.map

@@ -45,1 +45,2 @@ "use strict";

ExtensionFactoryExplorer.XF_SYSTEM_PROPERTY = "XFSystemName";
//# sourceMappingURL=extensionFacotryExplorer.js.map

@@ -19,1 +19,2 @@ "use strict";

};
//# sourceMappingURL=messages.js.map

@@ -21,1 +21,2 @@ "use strict";

Object.defineProperty(exports, "MetadataFactory", { enumerable: true, get: function () { return metadataFactory_1.MetadataFactory; } });
//# sourceMappingURL=index.js.map

6

dist/lib/metadata/metadataExplorer.d.ts

@@ -24,9 +24,11 @@ import { IChildLogger } from "@vscode-logging/types";

abstract getEntitySetTypeNavigationProperties(entitySetName: string): EntitySetNavigationPropertyType[];
abstract getProtocolType(): string;
protected getEntityType(entitySetName: string): any;
protected getNavigationPropertyTypeShortName(navigationPropertyTypeFullName: string): string;
protected getSchema(schemaWithContainer: boolean): any;
protected getFirstSchemaWithEntityContainer(): any;
protected getEntityTypesFromAllSchemas(): any[];
protected getEntitySetByName(entitySetName: string): any;
private getEntitySets;
private getFirstEntitySets;
private getEntityTypeShortName;
private isComplexPropertyType;
}

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

getEntitySetNames() {
const entitySetNames = _.map(this.getEntitySets(), "Name");
const entitySetNames = _.map(this.getFirstEntitySets(), "Name");
this.logger.info(this.getEntitySetNames.name, { entitySetNames });

@@ -43,3 +43,3 @@ return entitySetNames;

getEntityType(entitySetName) {
const entitySets = this.getEntitySets();
const entitySets = this.getFirstEntitySets(); // get the first schema that contain EntitySets
const entitySet = _.find(entitySets, (entSet) => {

@@ -56,7 +56,4 @@ return entSet.Name === entitySetName;

this.logger.debug(this.getEntityType.name, { entitySetTypeFullName, entitySetTypeShortName });
const entityTypesSchema = this.getSchema(false);
let entityTypes = _.get(entityTypesSchema, MetadataExplorer.ENTITY_TYPE_RELATIVE_PATH, []);
if (!Array.isArray(entityTypes)) {
entityTypes = [entityTypes];
}
const entityTypes = this.getEntityTypesFromAllSchemas();
// find the first entityType
const entityType = _.find(entityTypes, (entType) => {

@@ -89,22 +86,35 @@ return entType.Name === entitySetTypeShortName;

}
getSchema(schemaWithContainer) {
getFirstSchemaWithEntityContainer() {
// get all schemas
const schemas = _.get(this.metadataJson, MetadataExplorer.SCHEMA_PATH, []);
// takes the schema with EntityContainer
return Array.isArray(schemas)
? _.find(schemas, (schema) => {
const containsEntityContainer = _.get(schema, "EntityContainer", "");
return schemaWithContainer ? containsEntityContainer : !containsEntityContainer;
return _.isEmpty(containsEntityContainer) === false;
})
: schemas;
}
getEntityTypesFromAllSchemas() {
let schemas = _.get(this.metadataJson, MetadataExplorer.SCHEMA_PATH, []);
if (!Array.isArray(schemas)) {
schemas = [schemas];
}
const entityTypeArrays = _.map(schemas, (schema) => {
return _.get(schema, MetadataExplorer.ENTITY_TYPE_RELATIVE_PATH, []);
});
return _.flatten(entityTypeArrays);
}
getEntitySetByName(entitySetName) {
const entitySets = this.getEntitySets();
const entitySets = this.getFirstEntitySets();
return _.find(entitySets, ["Name", entitySetName]);
}
getEntitySets() {
const entitySetsSchema = this.getSchema(true);
let entitySets = _.get(entitySetsSchema, MetadataExplorer.ENTITY_SET_RELATIVE_PATH, []);
// get the first schema that contain EntitySets
getFirstEntitySets() {
const firstSchemaWithEntityContainer = this.getFirstSchemaWithEntityContainer();
let entitySets = _.get(firstSchemaWithEntityContainer, MetadataExplorer.ENTITY_SET_RELATIVE_PATH, []);
if (!Array.isArray(entitySets)) {
entitySets = [entitySets];
}
this.logger.trace(this.getEntitySets.name, { entitySets });
this.logger.trace(this.getFirstEntitySets.name, { entitySets });
return entitySets;

@@ -146,1 +156,2 @@ }

MetadataExplorer.ENTITY_TYPE_PROPERTY_PATH = "Property";
//# sourceMappingURL=metadataExplorer.js.map

@@ -59,2 +59,7 @@ export interface EntitySetPropertyType {

getEntitySetTypeNavigationProperties(entitySetName: string): EntitySetNavigationPropertyType[];
/**
* Returns protocol version.
*
*/
getProtocolType(): string;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=metadataExplorerType.js.map
import { IChildLogger } from "@vscode-logging/types";
import { MetadataExplorerType } from "./metadataExplorerType";
export declare enum ProtocolType {
ODATAV4 = "odatav4",
ODATAV2 = "odatav2"
}
export declare class MetadataFactory {

@@ -4,0 +8,0 @@ private static readonly VERSION4;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MetadataFactory = void 0;
exports.MetadataFactory = exports.ProtocolType = void 0;
const fast_xml_parser_1 = require("fast-xml-parser");

@@ -9,2 +9,7 @@ const _ = require("lodash");

const v4MetadataExplorer_1 = require("./v4MetadataExplorer");
var ProtocolType;
(function (ProtocolType) {
ProtocolType["ODATAV4"] = "odatav4";
ProtocolType["ODATAV2"] = "odatav2";
})(ProtocolType = exports.ProtocolType || (exports.ProtocolType = {}));
class MetadataFactory {

@@ -72,1 +77,2 @@ constructor(logger) {

MetadataFactory.VERSION4 = 4;
//# sourceMappingURL=metadataFactory.js.map

@@ -8,2 +8,3 @@ import { IChildLogger } from "@vscode-logging/types";

getEntitySetTypeNavigationProperties(entitySetName: string): V2EntitySetNavigationPropertyType[];
getProtocolType(): string;
private getNavigationProperties;

@@ -10,0 +11,0 @@ private getNavigationPropertyEntitySet;

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

const defaultLogger_1 = require("../defaultLogger");
const metadataFactory_1 = require("./metadataFactory");
class V2MetadataExplorer extends metadataExplorer_1.MetadataExplorer {

@@ -32,2 +33,5 @@ constructor(metadataJson, logger) {

}
getProtocolType() {
return metadataFactory_1.ProtocolType.ODATAV2;
}
getNavigationProperties(entitySetName) {

@@ -62,3 +66,3 @@ const entityType = this.getEntityType(entitySetName);

getAssociationSets() {
const entitySetsSchema = this.getSchema(true);
const entitySetsSchema = this.getFirstSchemaWithEntityContainer();
let associationSets = _.get(entitySetsSchema, metadataExplorer_1.MetadataExplorer.ASSOCIATION_SET_RELATIVE_PATH, []);

@@ -93,1 +97,2 @@ if (!Array.isArray(associationSets)) {

exports.V2MetadataExplorer = V2MetadataExplorer;
//# sourceMappingURL=v2MetadataExplorer.js.map

@@ -8,2 +8,3 @@ import { IChildLogger } from "@vscode-logging/types";

getEntitySetTypeNavigationProperties(entitySetName: string): V4EntitySetNavigationPropertyType[];
getProtocolType(): string;
}

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

const defaultLogger_1 = require("../defaultLogger");
const metadataFactory_1 = require("./metadataFactory");
class V4MetadataExplorer extends metadataExplorer_1.MetadataExplorer {

@@ -32,3 +33,7 @@ constructor(metadataJson, logger) {

}
getProtocolType() {
return metadataFactory_1.ProtocolType.ODATAV4;
}
}
exports.V4MetadataExplorer = V4MetadataExplorer;
//# sourceMappingURL=v4MetadataExplorer.js.map

@@ -88,1 +88,2 @@ "use strict";

MockService.MOCK_FILES_DEFAULT_PATH = "./";
//# sourceMappingURL=mockService.js.map

@@ -65,1 +65,2 @@ "use strict";

exports.SAPSystemsExplorer = SAPSystemsExplorer;
//# sourceMappingURL=sapSystemsExplorer.js.map

@@ -185,1 +185,2 @@ "use strict";

ServiceExplorer.MOCK_FILES_PATH = "MOCK_FILES_PATH";
//# sourceMappingURL=serviceExplorer.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=serviceExplorerType.js.map

@@ -38,1 +38,2 @@ "use strict";

ServiceURLExplorer.ODATA_GEN_USAGE = "odata_gen";
//# sourceMappingURL=serviceURLExplorer.js.map

@@ -26,1 +26,2 @@ "use strict";

exports.UserAuthenticationDetails = UserAuthenticationDetails;
//# sourceMappingURL=userAuthenticationDetails.js.map
{
"name": "@sap/wing-service-explorer",
"version": "1.6.10",
"version": "1.7.2",
"description": "Provide the ability to explore SAP services",

@@ -5,0 +5,0 @@ "license": "See LICENSE.txt",

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