Files
klz-cables.com/.pnpm-store/v10/files/1b/e414536c26cb7dd2d9fd6c786fd349cafbd495c8745927273578d67ac6d19a3d4a91deff080b014c758674acb99f3b8c8b581d4020efd9fcb3e57eb07c5843
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

75 lines
1.7 KiB
Plaintext

/**
*
* audit/common
*
*/
/**
* Audit requirement levels as per [RFC2119](https://www.rfc-editor.org/rfc/rfc2119).
*
* @category Audits
*/
export type AuditRequirement = 'MUST' | 'SHOULD' | 'MAY';
/**
* Audit name starting with the audit requirement level.
*
* @category Audits
*/
export type AuditName = `${AuditRequirement} ${string}`;
/**
* Actual audit test returning an result.
*
* The test function will throw only if the error is fatal.
*
* @category Audits
*/
export interface Audit {
/**
* Uniquely represents the audit. Helps with pinning audits
* without depending on the human readable audit name.
*/
id: string;
name: AuditName;
fn: () => Promise<AuditResult>;
}
/**
* Indicates that the audit was successful.
*
* @category Audits
*/
export interface AuditOk {
/**
* Uniquely represents the passing audit. Helps with pinning audits
* without depending on the human readable audit name.
*/
id: string;
name: AuditName;
status: 'ok';
}
/**
* Indicates that the audit failed.
*
* If the status is `warn`, the audit is not a requirement but rather a recommendation.
*
* On the other hand, if the status is `error`, the audit is a requirement and the source
* is therefore not compliant.
*
* @category Audits
*/
export interface AuditFail {
/**
* Uniquely represents the failing audit. Helps with pinning audits
* without depending on the human readable audit name.
*/
id: string;
name: AuditName;
status: 'notice' | 'warn' | 'error';
reason: string;
response: Response;
}
/**
* Result of the performed audit. See `AuditOk` and `AuditFail` for more information.
*
* @category Audits
*/
export type AuditResult = AuditOk | AuditFail;