Socket
Socket
Sign inDemoInstall

breeze-client

Package Overview
Dependencies
Maintainers
5
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

breeze-client - npm Package Compare versions

Comparing version 1.5.8 to 1.5.9

20

breeze.dataService.webApi.js

@@ -58,18 +58,18 @@ (function (factory) {

proto._prepareSaveResult = function (saveContext, data) {
// if lower case then all properties are already in there 'correct' case
// and the entityType name is already a client side name.
if (data.entities) {
// data: { entities: array of entities, keyMappings array of keyMappings
// where: keyMapping: { entityTypeName: ..., tempValue: ..., realValue ... }
return data;
} else {
// else if coming from .NET
// use the jsonResultAdapter to extractResults and extractKeyMappings
var jra = saveContext.dataService.jsonResultsAdapter || this.jsonResultsAdapter;
var entities = jra.extractSaveResults(data) || [];
var keyMappings = jra.extractKeyMappings(data) || [];
if (keyMappings.length) {
// HACK: need to change the 'case' of properties in the saveResult
// but KeyMapping properties internally are still ucase. ugh...
var keyMappings = data.KeyMappings.map(function (km) {
keyMappings = keyMappings.map(function (km) {
if (km.entityTypeName) return km; // it's already lower case
var entityTypeName = MetadataStore.normalizeTypeName(km.EntityTypeName);
return { entityTypeName: entityTypeName, tempValue: km.TempValue, realValue: km.RealValue };
});
return { entities: data.Entities, keyMappings: keyMappings };
}
return { entities: entities, keyMappings: keyMappings };
};

@@ -76,0 +76,0 @@

@@ -16,2 +16,3 @@ // Type definitions for Breeze 1.5.x

// Updated Jun 29 2016 - Marcel Good (www.ideablade.com)
// Updated Jul 15 2016 - Added methods to JsonResultsAdapter - Steve Schmitt

@@ -226,2 +227,4 @@ export namespace core {

extractResults: (data: {}) => {};
extractSaveResults: (data: {}) => any[];
extractKeyMappings: (data: {}) => KeyMapping[];
visitNode: (node: {}, queryContext: QueryContext, nodeContext: NodeContext) => { entityType?: EntityType; nodeId?: any; nodeRefId?: any; ignore?: boolean; };

@@ -231,2 +234,4 @@ constructor(config: {

extractResults?: (data: {}) => {};
extractSaveResults: (data: {}) => any[];
extractKeyMappings: (data: {}) => KeyMapping[];
visitNode: (node: {}, queryContext: QueryContext, nodeContext: NodeContext) => { entityType?: EntityType; nodeId?: any; nodeRefId?: any; ignore?: boolean; };

@@ -246,2 +251,3 @@ });

nodeType: string;
propertyName: string;
}

@@ -736,2 +742,3 @@

static importMetadata(exportedString: string): MetadataStore;
static normalizeTypeName(typeName: string): string;
importMetadata(exportedString: string, allowMerge?: boolean): MetadataStore;

@@ -805,3 +812,3 @@ isEmpty(): boolean;

}
export class Predicate {

@@ -914,6 +921,12 @@ constructor();

entities: Entity[];
keyMappings: any;
keyMappings: KeyMapping[];
XHR: XMLHttpRequest;
}
export interface KeyMapping {
entityTypeName: string;
tempValue: any;
realValue: any;
}
export class ValidationError {

@@ -1004,3 +1017,3 @@ key: string;

/** Run this validator against the specified value.
/** Run this validator against the specified value.
@param value {Object} Value to validate

@@ -1056,3 +1069,3 @@ @param additionalContext {Object} Any additional contextual information that the Validator can make use of.

/**
Initializes a single adapter implementation. Initialization means either newing a instance of the
Initializes a single adapter implementation. Initialization means either newing a instance of the
specified interface and then calling "initialize" on it or simply calling "initialize" on the instance

@@ -1062,3 +1075,3 @@ if it already exists.

@param adapterName {String} - The name of a previously registered adapter to initialize.
@param isDefault=true {Boolean} - Whether to make this the default "adapter" for this interface.
@param isDefault=true {Boolean} - Whether to make this the default "adapter" for this interface.
@return {an instance of the specified adapter}

@@ -1089,5 +1102,5 @@ **/

Method use to register implementations of standard breeze interfaces. Calls to this method are usually
made as the last step within an adapter implementation.
made as the last step within an adapter implementation.
@param interfaceName {String} - one of the following interface names "ajax", "dataService" or "modelLibrary"
@param adapterCtor {Function} - an ctor function that returns an instance of the specified interface.
@param adapterCtor {Function} - an ctor function that returns an instance of the specified interface.
**/

@@ -1098,3 +1111,3 @@ export function registerAdapter(interfaceName: string, adapterCtor: Function): void;

//static setProperties(config: Object): void; //deprecated
/**
/**
Set the promise implementation, if Q.js is not found.

@@ -1101,0 +1114,0 @@ @param q - implementation of promise. @see http://wiki.commonjs.org/wiki/Promises/A

{
"name": "breeze-client",
"version": "1.5.8",
"version": "1.5.9",
"description": "Breeze Javascript client",

@@ -5,0 +5,0 @@ "main": "breeze.debug",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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