Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | 10x 24x 45x 22x 12x | /**
* @module
*
* The domain layer: what this library does.
*
* @remarks
* Four things live here, and they are the only things in the package that
* *behave* — everything else is a shape, a constant, or a pure helper:
*
* - {@link Service} — the base a business service extends, and the `ok()` /
* `fail()` builders it gets from doing so.
* - {@link Logger} — structured, level-classified lines to the runtime's log
* stream.
* - {@link configure} and {@link resolve} — the configuration engine.
* - [`noop/`](./noop/index.ts) — implementations that satisfy a capability
* without providing it.
*
* ## The configuration engine
*
* ```
* Business service
* │
* ▼
* Adapters (bindings, services, middleware)
* │
* ▼
* resolve() ── reads the registry
* ▲
* │ seeded once at startup
* configure(defaults, overrides) ── called by the application
* ├── systemDefaults this package's half
* ├── an adapter's defaults the platform's half
* └── the application's own overrides
* ```
*
* Everything downstream asks {@link resolve} for a module's settings and gets
* one settled object back. Whether a value was defaulted or overridden is not
* visible to the caller, and does not need to be.
*
* The kernel owns `logging` and `security`; anything a platform resource settles
* belongs to an adapter package. The application joins the two halves when it
* calls {@link configure}, so supporting another platform edits nothing here.
*
* @example
* ```ts
* import { configure, resolve, systemDefaults } from '@bayudwiyansatria/core'
*
* configure({ ...systemDefaults, ...platformDefaults }, overrides)
*
* const { level, service } = resolve<LoggingSettings>('logging')
* ```
*
* @author Bayu Dwiyan Satria
* @version 1.0.0
* @since 1.0.0
*/
export { Service } from '@/core/Service'
export { Logger } from '@/core/Logger'
export { configure } from '@/core/configure'
export { resolve } from '@/core/resolve'
export { NoopCacheStore, NoopMessageQueue, NoopRateLimiter, NoopTelemetrySink } from '@/core/noop'
|