Core package for FuryStack with generic type and interface definitions and concepts.
In FuryStack, the preferred way to access data is via physical stores. A physical store is a minimal interface that a store should implement. A store is always bound to a collection with a specified type of entities. It can only do basic CRUD operations (create, get by ID, filter, delete, count). These stores should not have concepts about relations, indexes, or other storage-specific details. Data stores don't care about permission, role, or session checking.
The generic way to implement authentication and authorization logic is with an Identity Context – you can use it on both backend and frontend.
...yo...
Global Disposables is a list you can fill with disposables that will be disposed on app exit – this helps with graceful app shutdowns.
import { globalDisposables } from '@furystack/core/dist/create-physical-store-tests'
globalDisposables.add(myRootInjector)
There is a set of generic store tests you can use to test your custom store implementation, as the following example shows:
import { TestClass, createStoreTest } from '@furystack/core/create-physical-store-tests'
describe('myStore', () => {
createStoreTest({
createStore: () => new MyStoreImplementation(TestClass, ...ctorArgs),
typeName: 'MyStoreImplementation',
})
})