Quik Framework :: Core
- Codename: Berlin
- Version: 0.2.0-beta.76
- License: Check license here
Provides core framework utilities, configuration management, and default features such as logging and internationalization. The module exports helpers and registers default implementations used across the framework.
Installation
npm install @quik/core
Usage
Access configuration and shared services:
import { getConfig, getI18n, getLogger } from '@quik/core';
getConfig().set('app.name', 'Quik App');
const name = getConfig().string('app.name');
getLogger().info(`Starting ${ name }`);
getI18n().translate('app.welcome');
API Highlights
getConfig()returns the configuration store.getEnv()reads environment variables with helpers.getLogger()andgetI18n()access default logger/i18n providers.getTelemetry()accesses the active telemetry provider.getCache()accesses the active cache provider (backed by@quik/cachewhen loaded).initUpdatableFeature()registers default feature implementations.FeatureFlagStoretoggles runtime feature flags.FeatureFlagStore.loadFromConfig(flags)bulk-loads flags from a plain object (call withgetConfig().object("featureFlags", {})).QObjectbase class exposes protected span helpers:startSpan(),endSpan(),recordSpanError(),setSpanAttribute().QHTTPStatus.TOO_MANY_REQUESTS(429) is available for rate-limit responses.
Testing & Coverage
See the root instructions for details on running pnpm run test:coverage and accessing coverage artifacts.
API Reference
Generated API documentation is available in the core API section.