@flaky-tests/core
Core exports for the flaky-tests ecosystem.
Storage-agnostic types (IStore, Config, FailureKind), config
resolution, failure-pattern detection, retry/abort utilities, the
plugin-registry for store adapters, and the shared HTML report
generator. Consumed by @flaky-tests/plugin-bun,
@flaky-tests/plugin-vitest, and every @flaky-tests/store-* adapter.
New store backends integrate here by calling definePlugin() with a
name: 'store-<type>' — no change to core is required.
Classes
Section titled “Classes”Interfaces
Section titled “Interfaces”- BuildInsertFailureInputOpts
- BuildInsertRunInputOpts
- BuildUpdateRunInputOpts
- FailureRow
- FlakyPluginDescriptor
- GetRecentRunsOptions
- IStore
- ListFailuresOptions
- Logger
- ParameterizedQuery
- PatternRow
- RecentRun
- RetryOptions
- SchemaInspector
- SqliteMigration
- TestCredentials
Type Aliases
Section titled “Type Aliases”- Config
- FailureKind
- FlakyPattern
- GetNewPatternsOptions
- GitInfo
- InsertFailureInput
- InsertRunInput
- LogLevel
- RunCommand
- RunStatus
- StoreCallWrapper
- StoreModuleImporter
- UpdateRunInput
Variables
Section titled “Variables”- configSchema
- CREATE_SCHEMA_VERSION_TABLE
- DASHBOARD_WINDOW_DAYS
- DEFAULT_THRESHOLD
- DEFAULT_WINDOW_DAYS
- failureKindSchema
- flakyPatternSchema
- getNewPatternsOptionsSchema
- gitInfoSchema
- HOT_FILE_LIMIT
- INSERT_FAILURE_SQL
- INSERT_RUN_SQL
- INSERT_SCHEMA_VERSION_SQL
- insertFailureInputSchema
- insertRunInputSchema
- MAX_CLI_ERROR_MESSAGE_LENGTH
- MAX_FAILED_TESTS_PER_RUN
- MAX_PROMPT_STACK_LINES
- MS_PER_DAY
- RECENT_RUNS_LIMIT
- retryOptionsSchema
- runStatusSchema
- SCHEMA_VERSION_TABLE
- SELECT_APPLIED_MIGRATIONS_SQL
- SELECT_CURRENT_VERSION_SQL
- SELECT_RUN_STATUS_SQL
- SELECT_USER_TABLES_SQL
- SQLITE_MIGRATIONS
- storeConfigSchema
- UPDATE_RUN_RECONCILE_SQL
- UPDATE_RUN_SQL
- updateRunInputSchema
Functions
Section titled “Functions”- buildInsertFailureInput
- buildInsertRunInput
- buildListFailuresQuery
- buildNewPatternsQuery
- buildRecentRunsQuery
- buildUpdateRunInput
- captureGitInfo
- categorizeError
- createLogger
- createStoreFromConfig
- definePlugin
- detectBaselineVersion
- escapeHtml
- extractMessage
- extractStack
- generatePrompt
- getTestCredentials
- isRetryableError
- listRegisteredPlugins
- makeStoreWrapper
- mapRowToPattern
- parse
- parseArray
- pendingMigrations
- pragmaTableInfoSql
- publishRunIdForSubprocess
- raceAbort
- resetConfigForTesting
- resetPluginRegistryForTesting
- resolveConfig
- resolveLogLevel
- stripTimestampPrefix
- validateTablePrefix
- withRetry