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

@farris/bef

Package Overview
Dependencies
Maintainers
10
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@farris/bef - npm Package Compare versions

Comparing version 0.0.11-201811291600 to 0.0.11-201812051153

22

bundles/index.umd.js

@@ -515,3 +515,3 @@ (function (global, factory) {

this.httpClient = httpClient;
this.baseUri = "/" + beUri;
this.baseUri = serverUri + "/" + beUri;
this.sessionService = new BefSessionService(httpClient, serverUri, beUri);

@@ -956,4 +956,5 @@ }

*/
BefRepository.prototype.removeById = function (id) {
BefRepository.prototype.removeById = function (id, ifSave) {
var _this = this;
ifSave = (ifSave === undefined) ? true : ifSave;
// 服务器端删除

@@ -963,3 +964,11 @@ var delete$ = this.restService.delete(id);

return delete$.pipe(switchMap.switchMap(function () {
return _this.applyChangesById(id);
// 从实体集合中删除
_this.entityCollection.removeEntityById(id);
// 执行保存
if (ifSave === true) {
return _this.applyChangesById(id);
}
else {
return of.of(true);
}
}));

@@ -1006,5 +1015,10 @@ };

var entity = this.entityCollection.getEntityById(id);
if (entity.changes && entity.changes.length === 0) {
// 变更集不存在
if (!entity.changes) {
return of.of(true);
}
// 变更集为空
if (entity.changes.length === 0) {
return of.of(true);
}
var changeDetail = this.changeBuilder.build(entity.changes);

@@ -1011,0 +1025,0 @@ var update$ = this.restService.update(changeDetail);

@@ -502,3 +502,3 @@ import { InjectionToken, Injectable, Inject } from '@angular/core';

this.httpClient = httpClient;
this.baseUri = `/${beUri}`;
this.baseUri = `${serverUri}/${beUri}`;
this.sessionService = new BefSessionService(httpClient, serverUri, beUri);

@@ -917,3 +917,4 @@ }

*/
removeById(id) {
removeById(id, ifSave) {
ifSave = (ifSave === undefined) ? true : ifSave;
// 服务器端删除

@@ -923,3 +924,11 @@ const delete$ = this.restService.delete(id);

return delete$.pipe(switchMap(() => {
return this.applyChangesById(id);
// 从实体集合中删除
this.entityCollection.removeEntityById(id);
// 执行保存
if (ifSave === true) {
return this.applyChangesById(id);
}
else {
return of(true);
}
}));

@@ -965,5 +974,10 @@ }

const entity = this.entityCollection.getEntityById(id);
if (entity.changes && entity.changes.length === 0) {
// 变更集不存在
if (!entity.changes) {
return of(true);
}
// 变更集为空
if (entity.changes.length === 0) {
return of(true);
}
const changeDetail = this.changeBuilder.build(entity.changes);

@@ -970,0 +984,0 @@ const update$ = this.restService.update(changeDetail);

@@ -518,3 +518,3 @@ import { InjectionToken, Injectable, Inject } from '@angular/core';

this.httpClient = httpClient;
this.baseUri = "/" + beUri;
this.baseUri = serverUri + "/" + beUri;
this.sessionService = new BefSessionService(httpClient, serverUri, beUri);

@@ -959,4 +959,5 @@ }

*/
BefRepository.prototype.removeById = function (id) {
BefRepository.prototype.removeById = function (id, ifSave) {
var _this = this;
ifSave = (ifSave === undefined) ? true : ifSave;
// 服务器端删除

@@ -966,3 +967,11 @@ var delete$ = this.restService.delete(id);

return delete$.pipe(switchMap(function () {
return _this.applyChangesById(id);
// 从实体集合中删除
_this.entityCollection.removeEntityById(id);
// 执行保存
if (ifSave === true) {
return _this.applyChangesById(id);
}
else {
return of(true);
}
}));

@@ -1009,5 +1018,10 @@ };

var entity = this.entityCollection.getEntityById(id);
if (entity.changes && entity.changes.length === 0) {
// 变更集不存在
if (!entity.changes) {
return of(true);
}
// 变更集为空
if (entity.changes.length === 0) {
return of(true);
}
var changeDetail = this.changeBuilder.build(entity.changes);

@@ -1014,0 +1028,0 @@ var update$ = this.restService.update(changeDetail);

2

package.json
{
"name": "@farris/bef",
"version": "0.0.11-201811291600",
"version": "0.0.11-201812051153",
"description": "Farris Bef",

@@ -5,0 +5,0 @@ "main": "./bundles/index.umd.js",

@@ -86,3 +86,3 @@ import { HttpClient } from '@angular/common/http';

*/
removeById(id: string): Observable<boolean>;
removeById(id: string, ifSave?: boolean): Observable<boolean>;
/**

@@ -89,0 +89,0 @@ * 批量删除

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