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

@travetto/model

Package Overview
Dependencies
Maintainers
1
Versions
371
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/model - npm Package Compare versions

Comparing version 0.0.25 to 0.0.26

2

package.json

@@ -23,3 +23,3 @@ {

},
"version": "0.0.25"
"version": "0.0.26"
}

@@ -5,7 +5,5 @@ import { Class } from '@travetto/registry';

type SelectFieldFn = 'max' | 'min' | 'avg' | 'sum' | 'count';
type _SelectClause<T> = {
[P in keyof T]?:
T[P] extends object ? _SelectClause<RetainFields<T[P]>> : { alias: string, calc: SelectFieldFn } | 1 | 0 | boolean;
T[P] extends object ? _SelectClause<RetainFields<T[P]>> : (1 | 0 | boolean);
};

@@ -19,3 +17,3 @@

[P in keyof T]?:
T[P] extends object ? _SortClause<RetainFields<T[P]>> : (boolean | 1 | -1);
T[P] extends object ? _SortClause<RetainFields<T[P]>> : (1 | -1 | boolean);
}

@@ -22,0 +20,0 @@

@@ -41,3 +41,3 @@ import { ModelQuery, Query, PageableModelQuery, GroupClause, WhereClause } from '../../model';

[SORT, this.processSortClause.bind(this)],
[GROUP_BY, this.processGroupByClause.bind(this)]
// [GROUP_BY, this.processGroupByClause.bind(this)]
] as [

@@ -215,3 +215,4 @@ keyof Query<any>,

state.log(`Only true, false 0, and 1 are allowed for including/excluding fields`);
} else if (actual === 'string') {
} else {
/*if (actual === 'string') {
if (!/[A-Za-z_$0-9]/.test(value)) {

@@ -227,6 +228,7 @@ state.log(`Only A-Z, a-z, 0-9, '$' and '_' are allowed in aliases for selecting fields`);

} else {
// or { alias: string, calc?: string }
// console.log('Yay');
}
}
state.log(`Only true, false -1, and 1 or { alias: string, calc?: string } are allowed for selecting fields`);
*/}
state.log(`Only true, false, 0, and 1 are allowed for selecting fields`);
}

@@ -233,0 +235,0 @@ });

@@ -27,3 +27,3 @@ import { Class, ChangeEvent } from '@travetto/registry';

abstract getById<T extends ModelCore>(cls: Class<T>, id: string): Promise<T>;
abstract getByQuery<T extends ModelCore>(cls: Class<T>, query: PageableModelQuery<T>, failOnMany?: boolean): Promise<T>;
abstract getByQuery<T extends ModelCore>(cls: Class<T>, query: ModelQuery<T>, failOnMany?: boolean): Promise<T>;
abstract getAllByQuery<T extends ModelCore>(cls: Class<T>, query: PageableModelQuery<T>): Promise<T[]>;

@@ -30,0 +30,0 @@ abstract getCountByQuery<T extends ModelCore>(cls: Class<T>, query: ModelQuery<T>): Promise<number>;

@@ -14,3 +14,3 @@ import { SortClause } from '../model';

collection: string;
defaultSort?: SortClause<any>;
defaultSort?: SortClause<any>[];
indicies: IndexConfig<any>[] = [];

@@ -17,0 +17,0 @@ discriminator?: string;

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