New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@progress/jsdo-angular

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@progress/jsdo-angular - npm Package Compare versions

Comparing version 5.0.0 to 6.0.0-2018-09-26-00003

78

lib/progress.data.angular.js
"use strict";
/*
Progress Progress Data Source for Angular: 5.0.0
Progress Progress Data Source for Angular: 6.0.0

@@ -19,3 +19,3 @@ Copyright 2017-2018 Progress Software Corporation and/or its subsidiaries or affiliates.

progress.data.ng.ds.ts Version: v5.0.0
progress.data.ng.ds.ts Version: v6.0.0

@@ -37,5 +37,4 @@ Progress Data Source class for NativeScript, Angular. This will provide a seamless integration

var jsdo_core_1 = require("@progress/jsdo-core");
require("rxjs/add/observable/fromPromise");
require("rxjs/add/operator/catch");
var Observable_1 = require("rxjs/Observable");
var rxjs_1 = require("rxjs");
var operators_1 = require("rxjs/operators");
var DataSourceOptions = /** @class */ (function () {

@@ -252,3 +251,3 @@ function DataSourceOptions() {

if (this.readLocal && this._initFromServer) {
return Observable_1.Observable.create(function (observer) {
return rxjs_1.Observable.create(function (observer) {
var data = _this.getJsdoData();

@@ -295,3 +294,6 @@ observer.next({ data: data, total: data.length });

var data = _this.getJsdoData();
if ((_this._options.countFnName && _this._options.countFnName !== undefined)
// Only call count() function if paging is being used
// Paging is only used if the skip and top is being used during the fill.
if (typeof params !== "undefined" &&
(typeof _this._options.countFnName !== "undefined" && typeof params.skip !== "undefined" && typeof params.top !== "undefined")
&& !(params.skip === 0 && params.top > data.length)) { // Server-side operations

@@ -301,3 +303,3 @@ _this.getRecCount(_this._options.countFnName, { filter: result.request.objParam ? result.request.objParam.filter : undefined })

if (res === undefined && res == null) {
reject(new Error(_this.normalizeError(res, "Unexpected response from 'Count Function' Operation", "")));
reject(_this.normalizedErrorObj(res, "Unexpected response from 'Count Function' Operation", ""));
}

@@ -308,5 +310,5 @@ else {

}, function (error) {
reject(new Error(_this.normalizeError(error, "Problems invoking getRecCount function", "")));
reject(_this.normalizedErrorObj(error, "Problems invoking getRecCount function", ""));
}).catch(function (e) {
reject(new Error(_this.normalizeError(e, "Unknown error occurred calling count.", "")));
reject(_this.normalizedErrorObj(e, "Unknown error occurred calling count.", ""));
});

@@ -319,9 +321,9 @@ }

}).catch(function (result) {
reject(new Error(_this.normalizeError(result, "read", "")));
reject(_this.normalizedErrorObj(result, "read", ""));
});
});
obs = Observable_1.Observable.fromPromise(wrapperPromise);
obs.catch(function (e) {
obs = rxjs_1.from(wrapperPromise);
obs.pipe(operators_1.catchError(function (e) {
return [];
});
}));
return obs;

@@ -499,4 +501,4 @@ };

// Non-Submit case
if (result.info.batch.operations && result.info.batch.operations.length > 0) {
result.info.batch.operations.forEach(function (operation) {
if (result.request && result.request.batch.operations && result.request.batch.operations.length > 0) {
result.request.batch.operations.forEach(function (operation) {
_this._copyRecord(operation.response, responseData);

@@ -512,8 +514,8 @@ // In case of multiple operations we want to merge those records pertaining

}
else if (result.info.batch.operations.length === 0) {
else if (result.request && result.request.batch.operations.length === 0) {
resolve({});
}
else { // Reject promise if either of above cases are met
reject(new Error(_this
.normalizeError(result, "saveChanges", "Errors occurred while saving Changes.")));
else { // Reject promise if either of above cases are not met
reject(_this
.normalizedErrorObj(result, "saveChanges", "Errors occurred while saving Changes."));
}

@@ -525,10 +527,10 @@ }

}
reject(new Error(_this
.normalizeError(result, "saveChanges", "Errors occurred while saving Changes.")));
reject(_this
.normalizedErrorObj(result, "saveChanges", "Errors occurred while saving Changes."));
});
});
obs = Observable_1.Observable.fromPromise(promise);
obs.catch(function (e) {
obs = rxjs_1.from(promise);
obs.pipe(operators_1.catchError(function (e) {
return [];
});
}));
return obs;

@@ -598,6 +600,6 @@ };

catch (e) {
reject(new Error(_this.normalizeError(e, "getRecCount", "")));
reject(_this.normalizedErrorObj(e, "getRecCount", ""));
}
}).catch(function (result) {
reject(new Error(_this.normalizeError(result, "Error invoking the 'Count' operation", "")));
reject(_this.normalizedErrorObj(result, "Error invoking the 'Count' operation", ""));
});

@@ -647,2 +649,24 @@ });

};
/**
* This method is called after an error has occurred on a jsdo operation, and is
* used to get an error object.
* @param {any} result Object containing error info returned after execution of jsdo operation
* @param {string} operation String containing operation performed when error occurred
* @param {string} genericMsg If multiple errors are found in result object, if specified,
* this string will be returned as part of the new error object. If not specified, first error
* string will be returned.
* @returns A single error object with all information
*/
DataSource.prototype.normalizedErrorObj = function (result, operation, genericMsg) {
var errorObj = {};
var eMsg = "";
var object = {};
if (result && result.jsdo && result.success == false) {
object = result.request;
}
eMsg = this.normalizeError(result, operation, genericMsg);
errorObj = new Error(eMsg);
errorObj.info = object;
return errorObj;
};
DataSource.prototype._copyRecord = function (source, target) {

@@ -649,0 +673,0 @@ var field;

@@ -1,9 +0,12 @@

=========================================================================
== NOTICE file corresponding to section 4 d of ==
== the Apache License, Version 2.0, ==
== in this case for the Progress JSDO protocol ==
=========================================================================
Progress JSDO protocol
Copyright (C) [2013 - 2018] Progress Software Corporation
=========================================================================
== NOTICE file corresponding to section 4 d of ==
== the Apache License, Version 2.0, ==
== in this case for the Progress Data Source for Angular v6.0 ==
=========================================================================
Progress Data Source for Angular v6.0
Copyright © 2018 Progress Software Corporation or one of its subsidiaries or affiliates. All Rights Reserved.
For license information see the LICENSE file which accompanies this NOTICE.txt file.
Any open source software that may be delivered by Progress Software Corporation embedded in or in association with Progress JSDO protocol is provided pursuant to the open source license applicable to the software and subject to the disclaimers and limitations on liability set forth in such license.
Any open source software that may be delivered by Progress Software Corporation embedded in or in association with Progress Data Source for Angular v6.0 is provided pursuant to the open source license applicable to the software and subject to the disclaimers and limitations on liability set forth in such license.
{
"name": "@progress/jsdo-angular",
"version": "5.0.0",
"version": "6.0.0-2018-09-26-00003",
"description": "The Progress Data Source is a TypeScript implementation - Progress Data Source class for NativeScript, Angular. This will provide a seamless integration between OpenEdge (Progress Data Object) with Angular.",

@@ -36,9 +36,9 @@ "main": "lib/progress.data.angular.js",

"dependencies": {
"@angular/core": "^5.2.1",
"@progress/jsdo-core": "^5.0.0",
"base-64": "^0.1.0",
"rxjs": "^5.5.6"
"@progress/jsdo-core": "^6.0.0-2018-09-26-00003"
},
"peerDependencies": {},
"peerDependencies": {
"@angular/core": "^6.1.0",
"rxjs": "^6.0.0"
},
"optionalDependencies": {}
}
import { progress } from "@progress/jsdo-core";
import "rxjs/add/observable/fromPromise";
import "rxjs/add/operator/catch";
import { Observable } from "rxjs/Observable";
import { Observable } from "rxjs";
export declare class DataSourceOptions {

@@ -28,3 +26,9 @@ jsdo: progress.data.JSDO;

private _initFromServer;
private _convertFields;
private _convertTypes;
private useArrays;
constructor(options: DataSourceOptions);
_convertStringToDate(data: any, fieldName: any, targetFieldName?: any): void;
_convertDataTypes(data: any): any;
_initConvertTypes(): void;
/**

@@ -89,7 +93,7 @@ * Calls the jsdo.fill() retrieving data from the backend service

* First, retrieves data from JSDO local memory
* Then makes a copy of it, to ensure jsdo memory is only manipulated thru Data Source API
* Then makes a copy of it, to ensure jsdo memory is only manipulated thru DataSource API
* Returns array of record objects
* @returns Array<object>
*/
private getJsdoData();
private getJsdoData;
/**

@@ -101,3 +105,3 @@ * This method is used for fetching the 'count' of records from backend

*/
private getRecCount(name, object);
private getRecCount;
/**

@@ -112,5 +116,16 @@ * This method is called after an error has occurred on a jsdo operation, and is

*/
private normalizeError(result, operation, genericMsg);
private _copyRecord(source, target);
private normalizeError;
/**
* This method is called after an error has occurred on a jsdo operation, and is
* used to get an error object.
* @param {any} result Object containing error info returned after execution of jsdo operation
* @param {string} operation String containing operation performed when error occurred
* @param {string} genericMsg If multiple errors are found in result object, if specified,
* this string will be returned as part of the new error object. If not specified, first error
* string will be returned.
* @returns A single error object with all information
*/
private normalizedErrorObj;
private _copyRecord;
/**
* This method is responsible for building a valid responseObject when multiple records

@@ -121,3 +136,3 @@ * are involved in transaction

*/
private _buildResponse(source, target);
private _buildResponse;
}
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