Initial commit: lang + logr libraries with SvelteKit scaffold
lang — type-safe i18n engine (zero-deps):
- Pure engine (createEngineLang) with explicit locale per call
- Svelte 5 reactive wrapper (createActiveLang) via $state
- Fallback chain, Intl.PluralRules, cross-key references, JSON round-trip
- Type-safe paths with inference from schema
logr — structured logger (zero-deps, decoupled from i18n):
- 6 levels (TRACE..FATAL) aligned with pino/Log4j/OpenTelemetry/Sentry
- Auto-generated entry.id (UUID v4 / hex fallback)
- globalContext, child(), time/timeEnd, lazy messages, source capture
- Dynamic transports with per-sink minLevel/filter, buffer + writeBatch
- Hybrid dispatch: sync loop, transports may be async
- Failure routing with deniedFor and cascade guard
- Adapters: console, http, callback, sentry, datadog, logtail, loki, otel
Test pages at /test/lang and /test/logr. 180 unit tests passing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
{
|
|
|
|
|
"extends": "./.svelte-kit/tsconfig.json",
|
|
|
|
|
"compilerOptions": {
|
|
|
|
|
"rewriteRelativeImportExtensions": true,
|
|
|
|
|
"allowJs": true,
|
|
|
|
|
"checkJs": true,
|
|
|
|
|
"esModuleInterop": true,
|
|
|
|
|
"forceConsistentCasingInFileNames": true,
|
|
|
|
|
"resolveJsonModule": true,
|
|
|
|
|
"skipLibCheck": true,
|
|
|
|
|
"sourceMap": true,
|
|
|
|
|
"strict": true,
|
|
|
|
|
"moduleResolution": "bundler"
|
|
|
|
|
},
|
|
|
|
|
"exclude": []
|
Initial commit: lang + logr libraries with SvelteKit scaffold
lang — type-safe i18n engine (zero-deps):
- Pure engine (createEngineLang) with explicit locale per call
- Svelte 5 reactive wrapper (createActiveLang) via $state
- Fallback chain, Intl.PluralRules, cross-key references, JSON round-trip
- Type-safe paths with inference from schema
logr — structured logger (zero-deps, decoupled from i18n):
- 6 levels (TRACE..FATAL) aligned with pino/Log4j/OpenTelemetry/Sentry
- Auto-generated entry.id (UUID v4 / hex fallback)
- globalContext, child(), time/timeEnd, lazy messages, source capture
- Dynamic transports with per-sink minLevel/filter, buffer + writeBatch
- Hybrid dispatch: sync loop, transports may be async
- Failure routing with deniedFor and cascade guard
- Adapters: console, http, callback, sentry, datadog, logtail, loki, otel
Test pages at /test/lang and /test/logr. 180 unit tests passing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
|
|
|
|
|
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
|
|
|
|
|
//
|
|
|
|
|
// To make changes to top-level options such as include and exclude, we recommend extending
|
|
|
|
|
// the generated config; see https://svelte.dev/docs/kit/configuration#typescript
|
|
|
|
|
}
|