@report-toolkit/inspector
Version:
See docs at [https://ibm.github.io/report-toolkit](https://ibm.github.io/report-toolkit)
43 lines (42 loc) • 2.03 kB
TypeScript
/**
* Provides functionality which checks [Node.js Diagnostic Reports]() for potential issues.
* @module @report-toolkit/inspector
*
*/
/**
*/
/**
*
* @param {Partial<ToReportFromObjectOptions>} [opts]
* @returns {import('rxjs').OperatorFunction<object,Readonly<import('@report-toolkit/common').Report>>}
*/
export function toReportFromObject({ showSecretsUnsafe }?: Partial<ToReportFromObjectOptions>): import('rxjs').OperatorFunction<object, Readonly<import('@report-toolkit/common').Report>>;
export { rules } from "./rules/index.js";
export function inspectReports(reports: import('rxjs').Observable<import('@report-toolkit/common').Report>): import('rxjs').OperatorFunction<RuleConfig, Message>;
export type RuleDefinition = {
/**
* - (schema for `meta` prop)
*/
meta: any;
/**
* - Async function which receives `Context` object
* and optional configuration
*/
inspect: (config?: any) => ((report: import("@report-toolkit/common/src/report").Report) => string | void | Partial<import("./message.js").MessageOptions> | Promise<string | Partial<import("./message.js").MessageOptions>> | (string | Partial<import("./message.js").MessageOptions>)[]) | import("./rule.js").RuleHandlerObject | Promise<((report: import("@report-toolkit/common/src/report").Report) => string | void | Partial<import("./message.js").MessageOptions> | Promise<string | Partial<import("./message.js").MessageOptions>> | (string | Partial<import("./message.js").MessageOptions>)[]) | import("./rule.js").RuleHandlerObject>;
/**
* - Unique rule ID
*/
id: string;
};
export type ToReportFromObjectOptions = {
/**
* - If `true`, do not redact secrets
*/
showSecretsUnsafe: boolean;
};
import { RuleConfig } from "./rule-config.js";
import { Message } from "./message.js";
import { createRule } from "./rule.js";
import { Rule } from "./rule.js";
import { createRuleConfig } from "./rule-config.js";
export { createRule, Rule, createRuleConfig, RuleConfig, Message };