@outcode/bug-reporter-core
v1.0.0
Published
Framework-agnostic core for an in-app bug reporter: types, submit API, offline retry queue, log-capture breadcrumbs, theming, and a pluggable ClickUp repository. No React / React Native.
Downloads
318
Maintainers
Readme
@outcode/bug-reporter-core
Framework-agnostic core for the OutCode Bug Reporter.
No React or React Native — just types, the submit API, theming tokens, the offline retry queue, log/breadcrumb
capture, and pluggable backend repositories (ClickUp included). Used by the
web and
native UI packages, and usable standalone
in any JS/TS runtime with fetch.
Install
npm install @outcode/bug-reporter-coreWhat's inside
- Types —
BugReporterConfig,CreateReportParams,IBugReporterRepository, severity/type/theme types submitReport(config, options)— routes to arepositoryor POSTs toapiUrlClickUpBugReporterRepository— creates a task (priority from severity, type → tag, screenshot attachment, markdown body with merged context + breadcrumbs)installLogCapture()— rolling buffer of recentconsolewarnings/errors + last failedfetchReportQueue/getReportQueue()— offline retry queue over any storage adapter- Theme tokens —
THEMES,resolveTheme()(Indigo / Noir / Mint) - Taxonomy + annotation model —
SEVERITIES,REPORT_TYPES,ANNOTATION_TOOLS,Annotation
Example: a custom backend
import type { IBugReporterRepository, CreateReportParams, BugReportResponse } from '@outcode/bug-reporter-core';
class MyRepository implements IBugReporterRepository {
async createReport(params: CreateReportParams): Promise<BugReportResponse> {
const res = await fetch('https://api.example.com/bugs', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(params),
});
return { success: res.ok, id: (await res.json()).id };
}
}License
MIT © OutCode Software
