@luminix/core 0.0.1-beta.19 → 0.0.1-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contracts/Builder.d.ts +0 -1
- package/dist/contracts/Collection.d.ts +0 -1
- package/dist/contracts/ModelCollection.d.ts +0 -1
- package/dist/contracts/Plugin.d.ts +0 -1
- package/dist/contracts/PropertyBag.d.ts +0 -1
- package/dist/contracts/Relation/BelongsTo.d.ts +0 -1
- package/dist/contracts/Relation/BelongsToMany.d.ts +0 -1
- package/dist/contracts/Relation/HasMany.d.ts +0 -1
- package/dist/contracts/Relation/HasOne.d.ts +0 -1
- package/dist/contracts/Relation/HasOneOrMany.d.ts +0 -1
- package/dist/contracts/Relation/MorphMany.d.ts +0 -1
- package/dist/contracts/Relation/MorphOne.d.ts +0 -1
- package/dist/contracts/Relation/MorphOneOrMany.d.ts +0 -1
- package/dist/contracts/Relation/MorphTo.d.ts +0 -1
- package/dist/contracts/Relation/MorphToMany.d.ts +0 -1
- package/dist/contracts/Relation.d.ts +0 -1
- package/dist/facades/App.d.ts +0 -1
- package/dist/facades/Auth.d.ts +0 -1
- package/dist/facades/Error.d.ts +0 -1
- package/dist/facades/Log.d.ts +0 -1
- package/dist/facades/Model.d.ts +0 -1
- package/dist/facades/Route.d.ts +0 -1
- package/dist/helpers/app.d.ts +0 -1
- package/dist/helpers/auth.d.ts +0 -1
- package/dist/helpers/config.d.ts +0 -1
- package/dist/helpers/error.d.ts +0 -1
- package/dist/helpers/log.d.ts +0 -1
- package/dist/helpers/model.d.ts +0 -1
- package/dist/helpers/route.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/mixins/BaseModel.d.ts +0 -1
- package/dist/mixins/HasEvents.d.ts +0 -1
- package/dist/mixins/Reducible.d.ts +0 -1
- package/dist/support/collection.d.ts +0 -1
- package/dist/support/model.d.ts +0 -1
- package/dist/types/App.d.ts +0 -1
- package/dist/types/Auth.d.ts +0 -1
- package/dist/types/Builder.d.ts +0 -1
- package/dist/types/Collection.d.ts +0 -1
- package/dist/types/Config.d.ts +0 -1
- package/dist/types/Error.d.ts +0 -1
- package/dist/types/Event.d.ts +0 -1
- package/dist/types/Model.d.ts +0 -1
- package/dist/types/PropertyBag.d.ts +0 -1
- package/dist/types/Reducer.d.ts +0 -1
- package/dist/types/Relation.d.ts +0 -1
- package/dist/types/Route.d.ts +0 -1
- package/package.json +1 -1
|
@@ -5,7 +5,6 @@ import { EventData } from '../types/Event';
|
|
|
5
5
|
import { Model, ModelPaginatedResponse, ModelQuery } from '../types/Model';
|
|
6
6
|
import { JsonValue } from '../types/Support';
|
|
7
7
|
import { Collection as CollectionInterface } from '../types/Collection';
|
|
8
|
-
|
|
9
8
|
type BuilderInterface = BuilderBase<Model, ModelPaginatedResponse>;
|
|
10
9
|
type BuilderEventMap = BuilderEvents<Model, ModelPaginatedResponse>;
|
|
11
10
|
declare class Builder implements BuilderInterface {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CollectionEvents, Operator, Collection as CollectionInterface, CollectionIteratorCallback, CollectionPipeCallback, CollectionSortCallback } from '../types/Collection';
|
|
2
2
|
import { JsonValue, Constructor, TypeOf } from '../types/Support';
|
|
3
3
|
import { Unsubscribe } from 'nanoevents';
|
|
4
|
-
|
|
5
4
|
export declare function collect<T = unknown, C extends typeof Collection<T> = typeof Collection<T>>(items?: T[], constructor?: C): CollectionInterface<T>;
|
|
6
5
|
export declare class Collection<T> implements CollectionInterface<T> {
|
|
7
6
|
#private;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Collection } from './Collection';
|
|
2
2
|
import { Model } from '../types/Model';
|
|
3
3
|
import { Collection as CollectionInterface } from '../types/Collection';
|
|
4
|
-
|
|
5
4
|
declare class ModelCollection extends Collection<Model> {
|
|
6
5
|
[Symbol.toStringTag]: string;
|
|
7
6
|
intersect(values: Collection<Model> | Model[]): CollectionInterface<Model>;
|
|
@@ -2,7 +2,6 @@ import { default as Relation } from '../Relation';
|
|
|
2
2
|
import { Model, ModelPaginatedResponse, RelationMetaData } from '../../types/Model';
|
|
3
3
|
import { AppFacades } from '../../types/App';
|
|
4
4
|
import { BuilderInterface as Builder } from '../../types/Builder';
|
|
5
|
-
|
|
6
5
|
type BuilderInterface = Builder<Model, ModelPaginatedResponse>;
|
|
7
6
|
export default class BelongsTo extends Relation {
|
|
8
7
|
protected meta: RelationMetaData;
|
|
@@ -4,7 +4,6 @@ import { AppFacades } from '../../types/App';
|
|
|
4
4
|
import { BuilderInterface as Builder } from '../../types/Builder';
|
|
5
5
|
import { Collection as CollectionInterface } from '../../types/Collection';
|
|
6
6
|
import { JsonObject } from '../../types/Support';
|
|
7
|
-
|
|
8
7
|
type BuilderInterface = Builder<Model, ModelPaginatedResponse>;
|
|
9
8
|
export default class BelongsToMany extends Relation {
|
|
10
9
|
protected meta: RelationMetaData;
|
|
@@ -2,7 +2,6 @@ import { AppFacades } from '../../types/App';
|
|
|
2
2
|
import { Model, RelationMetaData } from '../../types/Model';
|
|
3
3
|
import { default as HasOneOrMany } from './HasOneOrMany';
|
|
4
4
|
import { Collection as CollectionInterface } from '../../types/Collection';
|
|
5
|
-
|
|
6
5
|
export default class HasMany extends HasOneOrMany {
|
|
7
6
|
protected meta: RelationMetaData;
|
|
8
7
|
protected facades: AppFacades;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Model, RelationMetaData } from '../../types/Model';
|
|
2
2
|
import { AppFacades } from '../../types/App';
|
|
3
3
|
import { default as HasOneOrMany } from './HasOneOrMany';
|
|
4
|
-
|
|
5
4
|
export default class HasOne extends HasOneOrMany {
|
|
6
5
|
protected meta: RelationMetaData;
|
|
7
6
|
protected facades: AppFacades;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BuilderInterface as Builder } from '../../types/Builder';
|
|
2
2
|
import { Model, ModelPaginatedResponse } from '../../types/Model';
|
|
3
3
|
import { default as Relation } from '../Relation';
|
|
4
|
-
|
|
5
4
|
type BuilderInterface = Builder<Model, ModelPaginatedResponse>;
|
|
6
5
|
export default class HasOneOrMany extends Relation {
|
|
7
6
|
query(): BuilderInterface;
|
|
@@ -2,7 +2,6 @@ import { AppFacades } from '../../types/App';
|
|
|
2
2
|
import { Model, RelationMetaData } from '../../types/Model';
|
|
3
3
|
import { default as MorphOneOrMany } from './MorphOneOrMany';
|
|
4
4
|
import { Collection as CollectionInterface } from '../../types/Collection';
|
|
5
|
-
|
|
6
5
|
export default class MorphMany extends MorphOneOrMany {
|
|
7
6
|
protected meta: RelationMetaData;
|
|
8
7
|
protected facades: AppFacades;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AppFacades } from '../../types/App';
|
|
2
2
|
import { Model, RelationMetaData } from '../../types/Model';
|
|
3
3
|
import { default as MorphOneOrMany } from './MorphOneOrMany';
|
|
4
|
-
|
|
5
4
|
export default class MorphOne extends MorphOneOrMany {
|
|
6
5
|
protected meta: RelationMetaData;
|
|
7
6
|
protected facades: AppFacades;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BuilderInterface as Builder } from '../../types/Builder';
|
|
2
2
|
import { Model, ModelPaginatedResponse } from '../../types/Model';
|
|
3
3
|
import { default as HasOneOrMany } from './HasOneOrMany';
|
|
4
|
-
|
|
5
4
|
type BuilderInterface = Builder<Model, ModelPaginatedResponse>;
|
|
6
5
|
export default class MorphOneOrMany extends HasOneOrMany {
|
|
7
6
|
query(): BuilderInterface;
|
|
@@ -3,7 +3,6 @@ import { BuilderInterface as Builder } from '../../types/Builder';
|
|
|
3
3
|
import { Model, ModelPaginatedResponse, RelationMetaData } from '../../types/Model';
|
|
4
4
|
import { Collection } from '../../types/Collection';
|
|
5
5
|
import { default as BelongsToMany } from './BelongsToMany';
|
|
6
|
-
|
|
7
6
|
type BuilderInterface = Builder<Model, ModelPaginatedResponse>;
|
|
8
7
|
export default class MorphToMany extends BelongsToMany {
|
|
9
8
|
protected meta: RelationMetaData;
|
|
@@ -4,7 +4,6 @@ import { BuilderInterface as Builder, Scope as ScopeBase, ExtendedOperator } fro
|
|
|
4
4
|
import { Collection as CollectionInterface } from '../types/Collection';
|
|
5
5
|
import { RelationInterface as RelationBase } from '../types/Relation';
|
|
6
6
|
import { JsonValue } from '../types/Support';
|
|
7
|
-
|
|
8
7
|
type RelationInterface = RelationBase<Model, ModelPaginatedResponse>;
|
|
9
8
|
type BuilderInterface = Builder<Model, ModelPaginatedResponse>;
|
|
10
9
|
type Scope = ScopeBase<Model, ModelPaginatedResponse>;
|
package/dist/facades/App.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { default as Plugin } from '../contracts/Plugin';
|
|
|
3
3
|
import { AppConfiguration } from '../types/Config';
|
|
4
4
|
import { Unsubscribe } from 'nanoevents';
|
|
5
5
|
import { Constructor } from '../types/Support';
|
|
6
|
-
|
|
7
6
|
declare class App implements AppFacade {
|
|
8
7
|
private facades;
|
|
9
8
|
private booted;
|
package/dist/facades/Auth.d.ts
CHANGED
package/dist/facades/Error.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { default as PropertyBag } from '../contracts/PropertyBag';
|
|
2
2
|
import { ErrorFacade, ValidationError } from '../types/Error';
|
|
3
|
-
|
|
4
3
|
export declare const isValidationError: (error: unknown) => error is ValidationError;
|
|
5
4
|
declare class Error implements ErrorFacade {
|
|
6
5
|
private bags;
|
package/dist/facades/Log.d.ts
CHANGED
package/dist/facades/Model.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { AppFacade, GlobalModelEvents, ModelFacade as ModelFacadeInterface } fro
|
|
|
3
3
|
import { Unsubscribe } from 'nanoevents';
|
|
4
4
|
import { Reducer, ReducerCallback, Unsubscribe as UnsubscribeReducer } from '../types/Reducer';
|
|
5
5
|
import { Collection } from '../contracts/Collection';
|
|
6
|
-
|
|
7
6
|
declare class ModelFacade implements ModelFacadeInterface {
|
|
8
7
|
private readonly _schema;
|
|
9
8
|
private _models;
|
package/dist/facades/Route.d.ts
CHANGED
package/dist/helpers/app.d.ts
CHANGED
package/dist/helpers/auth.d.ts
CHANGED
package/dist/helpers/config.d.ts
CHANGED
package/dist/helpers/error.d.ts
CHANGED
package/dist/helpers/log.d.ts
CHANGED
package/dist/helpers/model.d.ts
CHANGED
package/dist/helpers/route.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ import { isModel } from './support/model';
|
|
|
14
14
|
import { isCollection } from './support/collection';
|
|
15
15
|
import { Reducible } from './mixins/Reducible';
|
|
16
16
|
import { HasEvents } from './mixins/HasEvents';
|
|
17
|
-
|
|
18
17
|
export { app, App, auth, collect, config, error, log, model, route, isCollection, isValidationError, isModel, Plugin, PropertyBag, Reducible, HasEvents, };
|
|
19
18
|
export type { AppFacade } from './types/App';
|
|
20
19
|
export type { AuthFacade } from './types/Auth';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BaseModel, Model as ModelInterface } from '../types/Model';
|
|
2
2
|
import { AppFacade, AppFacades } from '../types/App';
|
|
3
|
-
|
|
4
3
|
export declare function BaseModelFactory(app: AppFacade, abstract: string): typeof BaseModel;
|
|
5
4
|
export declare function ModelFactory(facades: AppFacades, abstract: string, CustomModel: typeof BaseModel): typeof ModelInterface;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Emitter } from 'nanoevents';
|
|
2
2
|
import { EventSourceEvents, EventSource } from '../types/Event';
|
|
3
3
|
import { Constructor } from '../types/Support';
|
|
4
|
-
|
|
5
4
|
export declare function isEventSource<T>(value: T): value is T & EventSource<any>;
|
|
6
5
|
export declare function HasEvents<T extends EventSourceEvents, U extends Constructor>(Base: U): {
|
|
7
6
|
new (...args: any[]): {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ReducerCallback, Reducer } from '../types/Reducer';
|
|
2
2
|
import { Constructor } from '../types/Support';
|
|
3
3
|
import { Collection } from '../types/Collection';
|
|
4
|
-
|
|
5
4
|
export declare function Reducible<T extends Constructor>(Base: T): {
|
|
6
5
|
new (...args: any[]): {
|
|
7
6
|
reducers: {
|
package/dist/support/model.d.ts
CHANGED
package/dist/types/App.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import { EventSource, Event } from './Event';
|
|
|
8
8
|
import { ErrorFacade } from './Error';
|
|
9
9
|
import { ReducibleInterface } from './Reducer';
|
|
10
10
|
import { Constructor } from './Support';
|
|
11
|
-
|
|
12
11
|
type Plugin = PluginInterface<AppFacade, AppFacades>;
|
|
13
12
|
export type GlobalModelEvents = {
|
|
14
13
|
'save': (e: ModelGlobalEvent) => void;
|
package/dist/types/Auth.d.ts
CHANGED
package/dist/types/Builder.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Event, EventSource } from './Event';
|
|
|
3
3
|
import { JsonObject, JsonValue } from './Support';
|
|
4
4
|
import { Operator, Collection } from './Collection';
|
|
5
5
|
import { PropertyBagEventMap } from './PropertyBag';
|
|
6
|
-
|
|
7
6
|
export type Scope<R, C> = (builder: BuilderInterface<R, C>) => BuilderInterface<R, C> | void;
|
|
8
7
|
export type ExtendedOperator = Operator | 'like' | 'notLike' | 'between' | 'notBetween' | 'isNull' | 'isNotNull';
|
|
9
8
|
export type BuilderInterface<R, C> = EventSource<BuilderEventMap<R, C>> & {
|
package/dist/types/Config.d.ts
CHANGED
package/dist/types/Error.d.ts
CHANGED
package/dist/types/Event.d.ts
CHANGED
package/dist/types/Model.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { Collection } from './Collection';
|
|
|
4
4
|
import { RelationInterface, BuilderInterface, Scope, ExtendedOperator } from './Relation';
|
|
5
5
|
import { JsonObject, JsonValue } from './Support';
|
|
6
6
|
import { RouteGenerator } from './Route';
|
|
7
|
-
|
|
8
7
|
export type RelationRepository = Record<string, RelationInterface<Model, ModelPaginatedResponse>>;
|
|
9
8
|
export type ModelEvents = {
|
|
10
9
|
'change': (e: ModelChangeEvent) => void;
|
package/dist/types/Reducer.d.ts
CHANGED
package/dist/types/Relation.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BuilderInterface, ExtendedOperator, Scope } from './Builder';
|
|
2
2
|
import { Collection } from './Collection';
|
|
3
3
|
import { Constructor, JsonValue } from './Support';
|
|
4
|
-
|
|
5
4
|
export type { BuilderInterface, ExtendedOperator, Scope, };
|
|
6
5
|
export type RelationInterface<R, C> = {
|
|
7
6
|
guessInverseRelation(): string;
|
package/dist/types/Route.d.ts
CHANGED