tekir
All Packages
Utilitiesv0.1.5

@tekir/config

Typed config store with dot-notation access and auto-loading.

Installation

$bun add @tekir/config

Features

  • Dot-notation access: get('database.host')
  • Auto-loads config files from config/ directory
  • Register config objects programmatically
  • getAll() returns the full config map
  • Default values for missing keys

Quick Example

TypeScript
import { createConfigStore } from '@tekir/config'

const config = createConfigStore()
await config.loadDir('./config')

const port = config.get('app.port', 3000)
const dbHost = config.get('database.host', 'localhost')

Changelog

v0.1.5LatestSeptember 16, 2026
  • Published output now uses the shared Node-targeted ESM bundle pipeline with external dependencies and generated TypeScript declarations, while Bun consumers keep the native source export.
v0.1.4July 23, 2026
  • Package metadata now follows the shared compatible 0.1.x dependency range used by this coordinated Tekir release.
v0.1.3July 16, 2026
  • Deep configuration redaction now handles cycles, arrays, inherited properties, and falsy namespace values without leaking the original object.
v0.1.2June 13, 2026
  • getAll() now redacts sensitive keys by default. Values under keys like password, secret, token, apiKey, privateKey, credential, and dsn (case-insensitive, at any depth) come back as [REDACTED]. Pass getAll({ redact: false }) to opt back into raw values; the store itself is never mutated.
  • register(name, value, schema?) accepts an optional validator and throws at register time when the value fails it, so a bad config object surfaces immediately instead of later at read time.
  • get() now rejects __proto__, constructor, and prototype path segments and returns the default value, closing a prototype pollution vector. Config files load through file:// URLs so drive letters and UNC paths resolve correctly on Windows.
  • loadDir import failures are now reported with the file name instead of being swallowed.
  • Found and fixed with Fable.
v0.1.1April 27, 2026
  • Now installs alongside @tekir/runtime 0.1.1 so the SQLite auto-mkdir fix reaches downstream apps.
v0.1.0April 1, 2026
  • Initial release

Other Utilities packages