@furystack/repository
Advanced tools
Comparing version 0.0.11 to 1.0.0
@@ -1,2 +0,2 @@ | ||
import { IPhysicalStore } from '@furystack/core'; | ||
import { PhysicalStore } from '@furystack/core'; | ||
import { Injector } from '@furystack/inject'; | ||
@@ -6,3 +6,3 @@ /** | ||
*/ | ||
export interface IAuthorizationResult { | ||
export interface AuthorizationResult { | ||
/** | ||
@@ -28,3 +28,3 @@ * Boolean that indicates if the opoeration is allowed or permitted | ||
*/ | ||
physicalStore: IPhysicalStore<T, TFilterType>; | ||
physicalStore: PhysicalStore<T, TFilterType>; | ||
/** | ||
@@ -36,3 +36,3 @@ * Authorizes the entity creation | ||
entity: T; | ||
}) => Promise<IAuthorizationResult>; | ||
}) => Promise<AuthorizationResult>; | ||
/** | ||
@@ -58,3 +58,3 @@ * modifies an entity before persisting on creation | ||
change: Partial<T>; | ||
}) => Promise<IAuthorizationResult>; | ||
}) => Promise<AuthorizationResult>; | ||
/** | ||
@@ -67,3 +67,3 @@ * Authorizes entity updates per loaded entity | ||
change: Partial<T>; | ||
}) => Promise<IAuthorizationResult>; | ||
}) => Promise<AuthorizationResult>; | ||
/** | ||
@@ -89,3 +89,3 @@ * modifies an entity before persisting on update | ||
injector: Injector; | ||
}) => Promise<IAuthorizationResult>; | ||
}) => Promise<AuthorizationResult>; | ||
/** | ||
@@ -97,3 +97,3 @@ * Authorizes entity removal per loaded entity | ||
entity: T; | ||
}) => Promise<IAuthorizationResult>; | ||
}) => Promise<AuthorizationResult>; | ||
/** | ||
@@ -111,3 +111,3 @@ * Callback that fires right after entity update | ||
injector: Injector; | ||
}) => Promise<IAuthorizationResult>; | ||
}) => Promise<AuthorizationResult>; | ||
/** | ||
@@ -119,3 +119,3 @@ * Authorizes entity retrival | ||
entity: T; | ||
}) => Promise<IAuthorizationResult>; | ||
}) => Promise<AuthorizationResult>; | ||
/** | ||
@@ -122,0 +122,0 @@ * Additional filter parsing to be appended per filter / query |
export * from './Repository'; | ||
export * from './DataSet'; | ||
export * from './DataSetSettings'; | ||
export * from './InjectorExtension'; | ||
import './InjectorExtension'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -15,3 +15,3 @@ "use strict"; | ||
this.dataSets = new Map(); | ||
this.logger = this.injector.logger.withScope('@furystack/repository/' + this.constructor.name); | ||
this.logger = this.injector.logger.withScope(`@furystack/repository/${this.constructor.name}`); | ||
} | ||
@@ -18,0 +18,0 @@ getDataSetFor(model) { |
{ | ||
"name": "@furystack/repository", | ||
"version": "0.0.11", | ||
"version": "1.0.0", | ||
"description": "Repository implementation for FuryStack", | ||
@@ -48,5 +48,5 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@furystack/core": "^4.0.8", | ||
"@furystack/http-api": "^3.1.4", | ||
"@furystack/inject": "^3.0.8", | ||
"@furystack/core": "^5.0.0", | ||
"@furystack/http-api": "^4.0.0", | ||
"@furystack/inject": "^4.0.0", | ||
"@sensenet/client-utils": "^1.5.1" | ||
@@ -60,3 +60,3 @@ }, | ||
"typings": "./dist/index.d.ts", | ||
"gitHead": "d6391577488cbe5410f76881689a9f0cba7bbcef" | ||
"gitHead": "f990a9bf0adf05b3bcbf307e1191be5b8ebb7c6b" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { IPhysicalStore } from '@furystack/core' | ||
import { PhysicalStore } from '@furystack/core' | ||
import { Injector } from '@furystack/inject' | ||
@@ -7,3 +7,3 @@ | ||
*/ | ||
export interface IAuthorizationResult { | ||
export interface AuthorizationResult { | ||
/** | ||
@@ -31,3 +31,3 @@ * Boolean that indicates if the opoeration is allowed or permitted | ||
*/ | ||
physicalStore: IPhysicalStore<T, TFilterType> | ||
physicalStore: PhysicalStore<T, TFilterType> | ||
@@ -37,3 +37,3 @@ /** | ||
*/ | ||
authorizeAdd?: (options: { injector: Injector; entity: T }) => Promise<IAuthorizationResult> | ||
authorizeAdd?: (options: { injector: Injector; entity: T }) => Promise<AuthorizationResult> | ||
@@ -53,3 +53,3 @@ /** | ||
*/ | ||
authorizeUpdate?: (options: { injector: Injector; change: Partial<T> }) => Promise<IAuthorizationResult> | ||
authorizeUpdate?: (options: { injector: Injector; change: Partial<T> }) => Promise<AuthorizationResult> | ||
@@ -63,3 +63,3 @@ /** | ||
change: Partial<T> | ||
}) => Promise<IAuthorizationResult> | ||
}) => Promise<AuthorizationResult> | ||
@@ -79,3 +79,3 @@ /** | ||
*/ | ||
authorizeRemove?: (options: { injector: Injector }) => Promise<IAuthorizationResult> | ||
authorizeRemove?: (options: { injector: Injector }) => Promise<AuthorizationResult> | ||
@@ -85,3 +85,3 @@ /** | ||
*/ | ||
authroizeRemoveEntity?: (options: { injector: Injector; entity: T }) => Promise<IAuthorizationResult> | ||
authroizeRemoveEntity?: (options: { injector: Injector; entity: T }) => Promise<AuthorizationResult> | ||
@@ -96,3 +96,3 @@ /** | ||
*/ | ||
authorizeGet?: (options: { injector: Injector }) => Promise<IAuthorizationResult> | ||
authorizeGet?: (options: { injector: Injector }) => Promise<AuthorizationResult> | ||
@@ -102,3 +102,3 @@ /** | ||
*/ | ||
authorizeGetEntity?: (options: { injector: Injector; entity: T }) => Promise<IAuthorizationResult> | ||
authorizeGetEntity?: (options: { injector: Injector; entity: T }) => Promise<AuthorizationResult> | ||
@@ -105,0 +105,0 @@ /** |
export * from './Repository' | ||
export * from './DataSet' | ||
export * from './DataSetSettings' | ||
export * from './InjectorExtension' | ||
import './InjectorExtension' |
@@ -1,2 +0,2 @@ | ||
import { DefaultFilter, IPhysicalStore, StoreManager } from '@furystack/core' | ||
import { DefaultFilter, PhysicalStore, StoreManager } from '@furystack/core' | ||
import { Constructable, Injectable, Injector } from '@furystack/inject' | ||
@@ -30,3 +30,3 @@ import { ScopedLogger } from '@furystack/logging' | ||
const physicalStore = | ||
(settings && settings.physicalStore) || (this.storeManager.getStoreFor(model) as IPhysicalStore<T, TFilter>) | ||
(settings && settings.physicalStore) || (this.storeManager.getStoreFor(model) as PhysicalStore<T, TFilter>) | ||
const name = (settings && settings.name) || model.name | ||
@@ -45,4 +45,4 @@ const instance = new DataSet({ | ||
constructor(private readonly storeManager: StoreManager, private readonly injector: Injector) { | ||
this.logger = this.injector.logger.withScope('@furystack/repository/' + this.constructor.name) | ||
this.logger = this.injector.logger.withScope(`@furystack/repository/${this.constructor.name}`) | ||
} | ||
} |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
60546
735
+ Added@furystack/core@5.1.3(transitive)
+ Added@furystack/http-api@4.2.4(transitive)
+ Added@furystack/inject@4.0.765.0.7(transitive)
+ Added@furystack/logging@2.0.91(transitive)
+ Added@furystack/utils@1.2.462.1.0(transitive)
- Removed@furystack/core@4.0.8(transitive)
- Removed@furystack/http-api@3.1.4(transitive)
- Removed@furystack/inject@3.0.8(transitive)
- Removed@furystack/logging@1.1.7(transitive)
Updated@furystack/core@^5.0.0
Updated@furystack/http-api@^4.0.0
Updated@furystack/inject@^4.0.0