You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

furystack-core

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

furystack-core - npm Package Compare versions

Comparing version

to
1.0.0-alpha-11

dist/Endpoint/ActionOwnerAbstract.d.ts

2

dist/api/filter/ODataFilterExpression.d.ts

@@ -80,3 +80,3 @@ import { ODataFilterBuilder } from './ODataFilterBuilder';

*/
static FromString<T>(): ODataFilterExpression<T>;
static FromString<T>(filterExpression: string): ODataFilterExpression<T>;
}

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

NotEquals(field, value) {
this.value = `${field} ne ${this.getFilterValueSegment(value)}'`;
this.value = `${field} ne ${this.getFilterValueSegment(value)}`;
return this.Finialize();

@@ -99,3 +99,3 @@ }

const builder = ODataFilterBuilder_1.ODataFilterBuilder.Create();
build(ODataFilterBuilder_1.ODataFilterBuilder.Create());
build(builder);
this.value = `not (${builder.toString()})`;

@@ -111,4 +111,5 @@ return this.Finialize();

const builder = ODataFilterBuilder_1.ODataFilterBuilder.Create();
build(ODataFilterBuilder_1.ODataFilterBuilder.Create());
this.value = `(${builder.toString()})`;
build(builder);
const filterString = builder.filterBuilderRef.filterSegments.map((a) => a.toString()).join(' ');
this.value = `(${filterString})`;
return this.Finialize();

@@ -128,3 +129,3 @@ }

*/
static FromString() {
static FromString(filterExpression) {
throw new Error('Implement me pls :(');

@@ -131,0 +132,0 @@ }

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

this['@odata.count'] = count;
this['@odata.context'] = context;
this['@odata.nextlink'] = nextlink;
}

@@ -9,0 +11,0 @@ }

{
"name": "furystack-core",
"version": "1.0.0-alpha-10",
"version": "1.0.0-alpha-11",
"description": "FuryStack framework, Core package",

@@ -42,3 +42,3 @@ "main": "dist/index.js",

"chai": "^3.5.0",
"codecov": "^1.0.1",
"codecov": "^2.1.0",
"istanbul": "^0.4.5",

@@ -45,0 +45,0 @@ "mocha": "^3.3.0",

# furystack-core
[![Greenkeeper badge](https://badges.greenkeeper.io/FuryTechs/furystack-core.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/FuryTechs/furystack-core.svg?branch=master)](https://travis-ci.org/FuryTechs/furystack-core)

@@ -5,0 +7,0 @@ [![codecov](https://codecov.io/gh/FuryTechs/furystack-core/branch/master/graph/badge.svg)](https://codecov.io/gh/FuryTechs/furystack-core)

@@ -43,3 +43,3 @@ import { ODataFilterBuilder } from './ODataFilterBuilder';

public NotEquals<K extends keyof T>(field: K, value: any) {
this.value = `${field} ne ${this.getFilterValueSegment(value)}'`;
this.value = `${field} ne ${this.getFilterValueSegment(value)}`;
return this.Finialize();

@@ -110,3 +110,3 @@ }

const builder = ODataFilterBuilder.Create<T>();
build(ODataFilterBuilder.Create<T>());
build(builder);
this.value = `not (${builder.toString()})`;

@@ -123,4 +123,5 @@ return this.Finialize();

const builder = ODataFilterBuilder.Create<T>();
build(ODataFilterBuilder.Create<T>());
this.value = `(${builder.toString()})`;
build(builder);
const filterString = builder.filterBuilderRef.filterSegments.map((a) => a.toString()).join(' ');
this.value = `(${filterString})`;
return this.Finialize();

@@ -142,3 +143,3 @@ }

*/
public static FromString<T>(): ODataFilterExpression<T> {
public static FromString<T>(filterExpression: string): ODataFilterExpression<T> {
throw new Error('Implement me pls :(');

@@ -145,0 +146,0 @@ }

@@ -7,3 +7,5 @@ export class CollectionResult<T> {

this['@odata.count'] = count;
this['@odata.context'] = context;
this['@odata.nextlink'] = nextlink;
}
}

@@ -56,18 +56,27 @@ import { ModelDescriptorStore } from '../model/ModelDescriptorStore';

*/
public EntitySet<T>(entityTypeClass: { new (): T }, entitySetName: string): EndpointEntitySet {
public EntitySet<T>(entityTypeClass: { new (): T }, entitySetName?: string): EndpointEntitySet {
const entityTypeName = ModelDescriptorStore.GetName(entityTypeClass);
if (!entitySetName) {
const entitySetsWithType = this.EntitySets.filter((a) =>
a.EndpointEntityType.Name === entityTypeName);
if (entitySetsWithType.length === 1) {
return entitySetsWithType[0];
} else {
throw Error(`Cannot get EntitySet for type ${entityTypeName}. There are '${entitySetsWithType.length}' sets defined with the same on this endpoint`);
}
}
const existing = this.EntitySets.find((s) => s.Name === entitySetName);
const entityTypeName = ModelDescriptorStore.GetName(entityTypeClass);
if (existing) {
if (existing.EndpointEntityType.Name !== entityTypeName) {
throw new Error(`Mismatch on registering entitySet '${entitySetName}', with type '${entityTypeName}.
Already registered to type '${existing.EndpointEntityType.Name}'`);
throw new Error(`Mismatch on registering entitySet '${entitySetName}', with type '${entityTypeName}. Already registered to type '${existing.EndpointEntityType.Name}'`);
}
return existing;
}
const entityType = this.EntityTypes.find((e) => e.Name === entityTypeName);
let entityType = this.EntityTypes.find((e) => e.Name === entityTypeName);
if (!entityType) {
throw new Error(`Entity type not yet added for type '${entityTypeName}', please add it first.`);
entityType = this.EntityType(entityTypeClass);
}

@@ -74,0 +83,0 @@ const newEntitySet = new EndpointEntitySet(entitySetName, entityType);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet