@furystack/core
Advanced tools
Comparing version 14.0.3 to 14.0.4
@@ -10,7 +10,2 @@ # Change Log | ||
### [10.4.5](https://github.com/furystack/furystack/compare/@furystack/core@10.4.4...@furystack/core@10.4.5) (2022-02-02) | ||
@@ -20,7 +15,2 @@ | ||
### [10.4.4](https://github.com/furystack/furystack/compare/@furystack/core@10.4.2...@furystack/core@10.4.4) (2022-01-10) | ||
@@ -30,7 +20,2 @@ | ||
### [10.4.3](https://github.com/furystack/furystack/compare/@furystack/core@10.4.2...@furystack/core@10.4.3) (2022-01-10) | ||
@@ -40,7 +25,2 @@ | ||
### [10.4.2](https://github.com/furystack/furystack/compare/@furystack/core@10.4.1...@furystack/core@10.4.2) (2021-12-20) | ||
@@ -50,27 +30,14 @@ | ||
### [10.4.1](https://github.com/furystack/furystack/compare/@furystack/core@10.4.0...@furystack/core@10.4.1) (2021-12-08) | ||
### 🐛 Bug Fixes | ||
* **@furystack/core:** Store manager error details when failed to disposed a store ([267b846](https://github.com/furystack/furystack/commit/267b8464f18b3470c0400c229b526165e17bcef8)) | ||
- **@furystack/core:** Store manager error details when failed to disposed a store ([267b846](https://github.com/furystack/furystack/commit/267b8464f18b3470c0400c229b526165e17bcef8)) | ||
## [10.4.0](https://github.com/furystack/furystack/compare/@furystack/core@10.3.8...@furystack/core@10.4.0) (2021-11-30) | ||
### 🚀 What's new | ||
* **@furystack/core:** Advanced filters for InMemory store ([bc89ecc](https://github.com/furystack/furystack/commit/bc89ecc49781d9f6ec1b772662e00d3467b15227)) | ||
- **@furystack/core:** Advanced filters for InMemory store ([bc89ecc](https://github.com/furystack/furystack/commit/bc89ecc49781d9f6ec1b772662e00d3467b15227)) | ||
### [10.3.8](https://github.com/furystack/furystack/compare/@furystack/core@10.3.7...@furystack/core@10.3.8) (2021-11-29) | ||
@@ -80,7 +47,2 @@ | ||
### [10.3.7](https://github.com/furystack/furystack/compare/@furystack/core@10.3.6...@furystack/core@10.3.7) (2021-11-19) | ||
@@ -90,7 +52,2 @@ | ||
### [10.3.6](https://github.com/furystack/furystack/compare/@furystack/core@10.3.5...@furystack/core@10.3.6) (2021-11-09) | ||
@@ -100,7 +57,2 @@ | ||
### [10.3.5](https://github.com/furystack/furystack/compare/@furystack/core@10.3.4...@furystack/core@10.3.5) (2021-10-15) | ||
@@ -110,7 +62,2 @@ | ||
### [10.3.4](https://github.com/furystack/furystack/compare/@furystack/core@10.3.3...@furystack/core@10.3.4) (2021-10-05) | ||
@@ -120,7 +67,2 @@ | ||
### [10.3.3](https://github.com/furystack/furystack/compare/@furystack/core@10.3.2...@furystack/core@10.3.3) (2021-09-16) | ||
@@ -130,7 +72,2 @@ | ||
### [10.3.2](https://github.com/furystack/furystack/compare/@furystack/core@10.3.1...@furystack/core@10.3.2) (2021-08-27) | ||
@@ -140,7 +77,2 @@ | ||
### [10.3.1](https://github.com/furystack/furystack/compare/@furystack/core@10.3.0...@furystack/core@10.3.1) (2021-08-19) | ||
@@ -150,7 +82,2 @@ | ||
## [10.3.0](https://github.com/furystack/furystack/compare/@furystack/core@9.1.16...@furystack/core@10.3.0) (2021-08-19) | ||
@@ -160,9 +87,4 @@ | ||
## [10.2.0](https://github.com/furystack/furystack/compare/@furystack/core@9.1.16...@furystack/core@10.2.0) (2021-07-30) | ||
**Note:** Version bump only for package @furystack/core |
@@ -9,10 +9,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
let IdentityContext = class IdentityContext { | ||
async isAuthenticated() { | ||
return false; | ||
isAuthenticated() { | ||
return Promise.resolve(false); | ||
} | ||
async isAuthorized(..._roles) { | ||
return false; | ||
isAuthorized(..._roles) { | ||
return Promise.resolve(false); | ||
} | ||
async getCurrentUser() { | ||
throw Error('No IdentityContext'); | ||
getCurrentUser() { | ||
throw new Error('No IdentityContext'); | ||
} | ||
@@ -19,0 +19,0 @@ }; |
@@ -23,3 +23,3 @@ import type { Constructable } from '@furystack/inject'; | ||
cache: Map<T[TPrimaryKey], T>; | ||
get: (key: T[TPrimaryKey], select?: Array<keyof T>) => Promise<T | undefined>; | ||
get: (key: T[TPrimaryKey], select?: Array<keyof T>) => Promise<Awaited<T> | undefined>; | ||
private evaluateLike; | ||
@@ -26,0 +26,0 @@ private filterInternal; |
@@ -27,5 +27,5 @@ import { selectFields, isOperator, isLogicalOperator } from './models/physical-store.js'; | ||
cache = new Map(); | ||
get = async (key, select) => { | ||
get = (key, select) => { | ||
const item = this.cache.get(key); | ||
return item && select ? selectFields(item, ...select) : item; | ||
return Promise.resolve(item && select ? selectFields(item, ...select) : item); | ||
}; | ||
@@ -32,0 +32,0 @@ evaluateLike = (value, likeString) => { |
{ | ||
"name": "@furystack/core", | ||
"version": "14.0.3", | ||
"version": "14.0.4", | ||
"description": "Core FuryStack package", | ||
@@ -43,3 +43,3 @@ "type": "module", | ||
"devDependencies": { | ||
"@types/node": "^20.12.11", | ||
"@types/node": "^20.12.13", | ||
"typescript": "^5.4.5", | ||
@@ -49,6 +49,6 @@ "vitest": "^1.6.0" | ||
"dependencies": { | ||
"@furystack/inject": "^11.0.2", | ||
"@furystack/utils": "^7.0.1" | ||
"@furystack/inject": "^11.0.3", | ||
"@furystack/utils": "^7.0.2" | ||
}, | ||
"gitHead": "1045d854bfd8c475b7035471d130d401417a2321" | ||
} |
@@ -24,8 +24,7 @@ # @furystack/core | ||
Global Disposables is a list that you can fill with disposables that will be disposed on app exit - this helps graceful app shutdowns. | ||
```ts | ||
import { globalDisposables } from '@furystack/core/dist/create-physical-store-tests' | ||
globalDisposables.add(myRootInjector) | ||
``` | ||
@@ -40,10 +39,8 @@ | ||
describe('myStore', ()=>{ | ||
createStoreTest({ | ||
createStore: () => new MyStoreImplementation(TestClass, ...ctorArgs), | ||
typeName: 'MyStoreImplementation', | ||
}) | ||
describe('myStore', () => { | ||
createStoreTest({ | ||
createStore: () => new MyStoreImplementation(TestClass, ...ctorArgs), | ||
typeName: 'MyStoreImplementation', | ||
}) | ||
}) | ||
``` |
@@ -6,13 +6,13 @@ import { Injectable } from '@furystack/inject' | ||
export class IdentityContext { | ||
public async isAuthenticated() { | ||
return false | ||
public isAuthenticated() { | ||
return Promise.resolve(false) | ||
} | ||
public async isAuthorized(..._roles: string[]) { | ||
return false | ||
public isAuthorized(..._roles: string[]) { | ||
return Promise.resolve(false) | ||
} | ||
public async getCurrentUser<TUser extends User>(): Promise<TUser> { | ||
throw Error('No IdentityContext') | ||
public getCurrentUser<TUser extends User>(): Promise<TUser> { | ||
throw new Error('No IdentityContext') | ||
} | ||
} |
@@ -27,3 +27,3 @@ import type { Constructable } from '@furystack/inject' | ||
const created = entries.map((e) => { | ||
const entry = { ...e } as T | ||
const entry = { ...e } | ||
if (this.cache.has(entry[this.primaryKey])) { | ||
@@ -40,5 +40,5 @@ throw new Error('Item with the primary key already exists.') | ||
public cache: Map<T[TPrimaryKey], T> = new Map() | ||
public get = async (key: T[TPrimaryKey], select?: Array<keyof T>) => { | ||
public get = (key: T[TPrimaryKey], select?: Array<keyof T>) => { | ||
const item = this.cache.get(key) | ||
return item && select ? selectFields(item, ...select) : item | ||
return Promise.resolve(item && select ? selectFields(item, ...select) : item) | ||
} | ||
@@ -45,0 +45,0 @@ |
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
205480
45
Updated@furystack/inject@^11.0.3
Updated@furystack/utils@^7.0.2